nuxt-community / nuxtent-module

Seamlessly use content files in your Nuxt.js sites.
https://nuxtent-module.netlify.com/guide
MIT License
390 stars 50 forks source link
automatic-navigation content-management nuxt nuxt-module

Deprecated :warning:

Nuxtent has been deprecated, please checkout Nuxt Content: https://content.nuxtjs.org




Nuxtent

Seamlessly use content files in your Nuxt.js sites.

https://nuxtent-module.netlify.com/guide

📖 Release Notes

This is a work in progress from integrating nuxtdown features and fixing critical bugs. DO NOT USE IN PRODUCTION

Summary

The goal of Nuxtent is to make using Nuxt for content heavy sites as easy as using Jekyll, Hugo, or any other static site generator.

Nuxtent mainly does this in two ways:

  1. By compiling all the data from markdown or yaml files based on configured rules.

  2. By providing helpers for dynamically accessing this data inside Nuxt pages.
    But, we didn't just want to make Nuxtent as good as a static site generator–we wanted to make it better.
    So, along with that, Nuxtent also supports:

  3. The usage of content files in both static sites and dynamic applications.

  4. The usage of Vue components inside markdown files.

  5. Automatic content navigation, between pages via path and within pages via anchors.

There you go: five reasons to give Nuxtent a try, and maybe even star and share it. :smirk:

Features

v3.X goals

Simple yet flexible API

Nuxtent was created to integrate with Nuxt (otherwise, you're just building another Jekyll-like tool, with the same amount of mental overhead).

Nuxtent's API is simple yet flexible. All you have to do is

Here's a basic example:

// nuxtent.config.js
module.exports = {
  content: {
    page: '/_post',
    permalink: ':year/:slug'
  }
}
// pages/_post.vue
export default {
  asyncData: async ({ app, route }) => ({
    post: await app.$content('posts').get(route.path)
  })
}

The response for each item is:


{

}

Quick Start

If you're starting a new site, you can use the nuxtent-starter template.

$ vue init nuxt-community/nuxtent-template my-site
$ cd my-site
# install dependencies
$ npm install # Or yarn install

Or if you already have your nuxt project:

Installation

npm install nuxtent --save

Then, under nuxt.config.js install the module:

modules: [
   'nuxtent'
 ]

Documentation

Documentation available at: https://nuxtent-module.netlify.com/guide (built with Nuxtent).

Sites built with Nuxtent

Have a site using Nuxtent? Fork the repo and add it to the list below!

Personal Sites

Documentation Sites

Corporate Sites

License

MIT License

Copyright (c) 2017 Nuxt Community