Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Releases: nuxt-community/nuxtent-module

v0.2.73

08 Aug 23:51
Compare
Choose a tag to compare
  • added hot reload guard so that hmr endpoints do not return 404 (fix #42)
  • Static assets are not requested or generated in dynamic build anymore (Fix #41)

Fetch and generate away!

04 Aug 23:45
Compare
Choose a tag to compare

New Addition

  • Added nuxtent generate command for static builds. This builds on top of nuxt generate to run the serverMiddleware during the static build. Now payload backup, which was causing problems, is not required. (Fixes #22)

Note: nuxtent-generate requires version 1.0.0 of Nuxt, but that version is not yet compatible with markdown components.

Bonus Features

  • With $content.query you can now query which data you'd like included in the page. For example, query({ exclude: 'body').
  • New request methods: $content.getOnly, which fetches specified number of pages, and $content.getBetween, which fetches pages before and after a certain page.

Additions

  • If you have multiple content types, content-api now responds with all the registered content endpoints, so that you can see if the content is being compiled and loaded, or not. (Inspired by #36)

API changes:

  • routes is now generate and accepts a string of request methods or an object with a req.method and optional req.query or req.args params. The page path for dynamic routes is now specified under the page property. (The generate property is now optional and only required for static builds.)

So the following:

content: {
  routes: [ 
    {
      path: 'path/to/_page',
       method: 'get' 
     }
   ]
}

Changes to this:

content: {
   page: 'path/to/_page',
  generate: [  
     'get' 
  ]
}

Up and running, just not fully generating

02 Aug 20:06
Compare
Choose a tag to compare

New features:

  • path is now added to page content data. This is different from permalink, as it specifies the entire file's url path, including any nested route paths.

API changes:

  • No need to mentally serialize the route name yourself anymore.routes now accepts the page route path rather than the name.
  • baseURL is now a string. You can dynamically set it using env variables.

Fixes:

  • Fix for multiple content types that which causing route paths to conflict (Fixes #31).

Notes:

Currently there are two live versions of sites using Nuxtent nuxtent docs and ency docs, which were used for testing.

However, these sites were deployed as apps, because npm run generate does not run serverMiddleware and payload passed to nested routes does not persist if page is refreshed. Thus, we will need to submit issue for Nuxt to run it or build on top of Nuxt's generate command. Resolution will be tracked in issue #22.

The other problem is that the usage of Nuxtent markdown components are only fully compatible with alpha 3 version of Nuxt until issue #34 is fixed.

0.2.35

26 Jul 16:12
Compare
Choose a tag to compare

Fixes:

  • Added special handling of index route for static route generation.

0.2.33

26 Jul 03:00
Compare
Choose a tag to compare

Fix:

  • Improved anchor regex so that it doesn't capture markdown links with anchors (Fixes #30)

Get them all - just not everywhere

26 Jul 00:20
Compare
Choose a tag to compare

Fixes

  • Fixed getAll so that payload is passed to route upon static generation. But discovered bug (or feature?) in Nuxt that causes conflict when a payload is passed to top route and a separate payload is passed to its children (#22). Until this is fixed, all features of Nuxtent will only be available in running apps.
  • Made sure API request is made for server builds. Added option to pass iS_STATIC=true so that it is not requested in static server build. (Fixes #29)

API changes

  • routeName is now used as routes, which is an array that accepts object route configurations. Each object requires the route's name as route.name and the API request method as route.method.
  • permalink now only specifics the ending url params, as the content path will be prefixed by the page directory it is found under if any. This was necessary in order to have get and getAll payloads work together.

Caught the bug, under the section

24 Jul 04:20
Compare
Choose a tag to compare
  • Fixed loader handling of directory options when root files have nested sections, which made it try to fetch
  • Adding to the above fix, improved loader regex matching of section, to only get closest subsection, so that users can nest content as they please.

On road to HMR

24 Jul 03:13
Compare
Choose a tag to compare

Features:

  • HMR status: Made page fetch fresh content every time in development mode. Just need to find a way to make async data prefetch content... Currently, HMR only works for markdown components because they use loaders.

Fixes:

  • Made mardown-it anchor plugin only create anchors for configured heading level.
  • Made it so anchors are only parsed in md files, not ymal files.

0.2.17

23 Jul 01:26
Compare
Choose a tag to compare
  • Improve regex matching for components and anchor headings. (Fixes #19)

Anchor up!

22 Jul 23:10
Compare
Choose a tag to compare

New feature:

  • Effortless content navigation: Along with a page's permalink, content data now also have the anchor property, which represents the heading anchors extracted from md files. By default, H1 is converted to anchors, but you can configure this via the anchorsLevel property under the config's content property. (#13)

API changes:

  • parser configuration property is renamed to parsers.

Fixes:

  • Added v-pre to markdown component code snippets so that mustache tags are not compiled (Fixes #18)