More Premium Hugo Themes Premium Nuxt Themes

Nuxt Route Meta

Adds Nuxt page data to route meta at build time. Also supports TypeScript.

Nuxt Route Meta

Adds Nuxt page data to route meta at build time. Also supports TypeScript.

Author Avatar Theme by dword-design
Github Stars Github Stars: 44
Last Commit Last Commit: Dec 6, 2025 -
First Commit Created: Dec 18, 2023 -
Nuxt Route Meta screenshot

Overview

The nuxt-route-meta module adds Nuxt page data to route meta at build time. This allows for accessing meta data at build time in the routes object itself, which is useful for postprocessing routes or for use with the @nuxtjs/sitemap module. This module parses the page files, extracts the meta data, and writes it to the meta field of each route corresponding to the page. It is compatible with Nuxt versions 2 and 3, and has built-in support for TypeScript.

Features

  • Parses Nuxt page files and extracts meta data
  • Writes meta data to route meta field at build time
  • Compatible with Nuxt versions 2 and 3
  • Built-in support for TypeScript

Installation

To install the nuxt-route-meta module, follow these steps:

  1. Add the module to your nuxt.config.js file:
module.exports = {
  modules: [
    'nuxt-route-meta',
  ],
}
  1. Add the required properties to your pages:
export default {
  meta: {
    // add your meta data here
  },
}

That’s it! You can now access the meta data in route.meta from anywhere in your application.

Summary

The nuxt-route-meta module is a useful tool for adding Nuxt page data to route meta at build time. It allows for accessing meta data in the routes object and is compatible with Nuxt versions 2 and 3. With built-in support for TypeScript, it provides an easy way to handle meta data for Nuxt projects.