Releases: nuxt-community/nuxtent-module
v0.2.73
Fetch and generate away!
New Addition
- Added
nuxtent generatecommand for static builds. This builds on top ofnuxt generateto run theserverMiddlewareduring the static build. Nowpayloadbackup, 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.queryyou 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-apinow 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:
routesis nowgenerateand accepts a string of request methods or an object with areq.methodand optionalreq.queryorreq.argsparams. The page path for dynamic routes is now specified under thepageproperty. (Thegenerateproperty 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
New features:
pathis now added to page content data. This is different frompermalink, 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.
routesnow accepts the page routepathrather than thename. baseURLis now astring. You can dynamically set it usingenvvariables.
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
0.2.33
Get them all - just not everywhere
Fixes
- Fixed
getAllso 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 ofNuxtentwill only be available in running apps. - Made sure API request is made for server builds. Added option to pass
iS_STATIC=trueso that it is not requested in static server build. (Fixes #29)
API changes
routeNameis now used asroutes, which is an array that accepts object route configurations. Each object requires the route's name asroute.nameand the API request method asroute.method.permalinknow 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 havegetandgetAllpayloads work together.
Caught the bug, under the section
- 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
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-itanchor plugin only create anchors for configured heading level. - Made it so anchors are only parsed in
mdfiles, notymalfiles.
0.2.17
Anchor up!
New feature:
- Effortless content navigation: Along with a page's
permalink, content data now also have theanchorproperty, which represents the heading anchors extracted frommdfiles. By default, H1 is converted to anchors, but you can configure this via theanchorsLevelproperty under the config'scontentproperty. (#13)
API changes:
parserconfiguration property is renamed toparsers.
Fixes:
- Added v-pre to markdown component code snippets so that mustache tags are not compiled (Fixes #18)