-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Initial version (manual mode only):
-
Manual mode (does not run during
npm build) -
Just a collection of
.jsscripts which generate basic directory listings as JSON files into your src at expected locations -
The create-modulo template
- Will include a light index.js that imports Modulo in Node so scripts can use templating or modulo utilities as expected, and run as registered commands
- Will include a one that regenerates "articles" as an example, and also
- Will include documentation on how to regenerate OR edit with Decap (two options, since "manual" mode)
-
Include instructions on how to make automatic, if you want (basically include in
npm buildscript)
Second version:
- include helpers to make it automatic during development as well (e.g. watching for file changes, and outputting to a
gen-build)
One approach that could be useful in the time being, esp. as a static file based replacement for directory listings:
- Add scripts to generate files, can be simple node js scripts in a "gen-scripts/" directory
- Add another directory, perhaps:
gen-build/ - Conventionally, the scripts in
gen-scripts/should be run likenode gen-scripts/index.js - This gets overlayed with
src/during development / build (just like the current__dirlistsystem) - Related: Add an example 404.html page
This will create json listings that are "defaults". It's also possible it'd be better these get generated into the same directory, e.g. src/ and gen-build/ be merged, so that DecapCMS plays well. Maybe two modes: "Manual mode" (default, scripts output to src), and "Auto-overlay mode" (uses gen-build)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request