npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flyo/nitro-nuxt

v2.1.2

Published

Flyo Nitro Nuxt Module

Readme

@flyo/nitro-nuxt

Nuxt 3 module for integrating Flyo Nitro CMS into a Nuxt application.

What This Module Adds

  • Registers Flyo plugin (@flyo/nitro-vue3) in your Nuxt app.
  • Auto-imports Flyo composables.
  • Injects Flyo config into runtimeConfig.public.flyo.
  • Optionally registers dynamic routes from Flyo config pages.

Requirements

  • Nuxt 3
  • Node.js 18.12+ (Nuxt recommendation)
  • A valid Flyo API token

Install

npm install @flyo/nitro-nuxt

Quick Start

Add the module in your nuxt.config.ts (or nuxt.config.js):

export default defineNuxtConfig({
	modules: [
		['@flyo/nitro-nuxt', {
			apiToken: process.env.FLYO_API_TOKEN
		}]
	]
})

Set your environment variable:

FLYO_API_TOKEN=your-token

Important:

  • apiToken is required. The module throws on startup if missing.

Required Page For Dynamic Routes

By default, registerPageRoutes is enabled and Flyo pages are registered dynamically. The module currently imports this page component for those routes:

  • ~/pages/cms.vue

Create pages/cms.vue in your Nuxt app if you keep dynamic route registration enabled.

If you do not want this behavior, disable it:

export default defineNuxtConfig({
	modules: [
		['@flyo/nitro-nuxt', {
			apiToken: process.env.FLYO_API_TOKEN,
			registerPageRoutes: false
		}]
	]
})

Module Options

All options are under module config key flyo.

  • apiToken: string default process.env.FLYO_API_TOKEN || ''
  • apiBasePath: string default process.env.FLYO_API_BASE_PATH || ''
  • liveEdit: boolean | string default process.env.FLYO_LIVE_EDIT || process.env.NODE_ENV !== 'production'
  • liveEditOrigin: string default process.env.FLYO_LIVE_EDIT_ORIGIN || 'https://flyo.cloud'
  • registerPageRoutes: boolean default true
  • defaultPageRoute: string default 'cms'

Environment Variables

  • FLYO_API_TOKEN
  • FLYO_API_BASE_PATH
  • FLYO_LIVE_EDIT
  • FLYO_LIVE_EDIT_ORIGIN

Auto-Imported Composables

This module auto-imports these composables:

  • useFlyoConfig()
  • useFlyoCurrentPage()
  • useFlyoEntity(uniqueId)
  • useFlyoPage(slug)
  • useFlyoSitemap()
  • editable(block) — returns data-flyo-uid attribute for live-edit support

Example:

<script setup lang="ts">
const { response: page } = await useFlyoCurrentPage()
</script>

<template>
	<pre>{{ page }}</pre>
</template>

Components Directory

The module registers a global components directory at:

  • ~/flyo

Place your Flyo block components there. Each component receives a block prop from the CMS.

Live-Edit Support for Blocks

When liveEdit is enabled (the default in non-production environments), the module automatically activates live-editing features — page reload on content changes, scroll-to-block, and hover-highlight with click-to-edit. No extra setup is needed in your layout or App.vue.

To make individual block components discoverable by the live editor, use the auto-imported editable helper to bind the block's data-flyo-uid attribute:

<script setup>
defineProps({ block: Object })
</script>

<template>
  <section v-bind="editable(block)" class="bg-gray-200 p-8 rounded-lg text-center">
    <h2 class="text-3xl font-bold mb-4">{{ block?.content?.title }}</h2>
    <p class="text-lg mb-6">{{ block?.content?.teaser }}</p>
  </section>
</template>

editable(block) returns { 'data-flyo-uid': block.uid } when the block has a uid, or an empty object otherwise. This is safe to include unconditionally — it has no effect when live-edit is disabled.

Local Development (This Repository)

Use these commands:

npm install
npm run test
npm run build

Playground

playground/ is a local Nuxt app for manual module testing. It depends on the local module via file:...

npm run playground:dev
npm run playground:build

CI And Releases

  • CI runs tests and build checks.
  • Publishing is handled by semantic-release in GitHub Actions.
  • Version bump is commit-message driven:
  • feat: ... -> minor
  • fix: ... -> patch
  • feat!: ... or BREAKING CHANGE: -> major

Releasing 2.0.0 Next

If you want the next automated release to be 2.0.0, make sure a 1.0.0 git tag exists in the repository history.

git tag 1.0.0
git push origin 1.0.0

Then merge a breaking-change commit, for example:

feat!: migrate module behavior for Nuxt 3.21

BREAKING CHANGE: dynamic cms route registration and runtime entrypoints changed.

Dry-run locally:

npm run release:dry-run

Docs

Flyo Nuxt docs