|
@@ -21,7 +21,8 @@ extension. These file paths are made available to the template renderer, for inc
|
|
|
|
|
|
|
|
Markdown is compiled using `marked` with the `marked-code-preview` extension enabled, then passed to the template
|
|
Markdown is compiled using `marked` with the `marked-code-preview` extension enabled, then passed to the template
|
|
|
renderer in the `content` property. Images referenced in markdown are automatically processed and converted to responsive
|
|
renderer in the `content` property. Images referenced in markdown are automatically processed and converted to responsive
|
|
|
-srcsets if matching images are found in the images task.
|
|
|
|
|
|
|
+srcsets if matching images are found in the images task. Raw HTML in markdown is stripped by default; set
|
|
|
|
|
+`opts.markdown.allowHtml` to `true` to allow it.
|
|
|
|
|
|
|
|
Once the markdown content and template have been rendered out, the resulting `.html` file is minified and output to `dist/`,
|
|
Once the markdown content and template have been rendered out, the resulting `.html` file is minified and output to `dist/`,
|
|
|
with the matching path (e.g. `markdown/recipes/soup.md` would be rendered to `dist/recipes/soup.html`).
|
|
with the matching path (e.g. `markdown/recipes/soup.md` would be rendered to `dist/recipes/soup.html`).
|
|
@@ -50,8 +51,8 @@ Cache files are stored in `.cache/` by default and can be disabled by setting `c
|
|
|
|
|
|
|
|
If output file checks are skipped with `ignoreExisting`, only files that have changed inputs will be output.
|
|
If output file checks are skipped with `ignoreExisting`, only files that have changed inputs will be output.
|
|
|
|
|
|
|
|
-You can get additional detail on state cache misses by setting `opts.includeStateValues` to `true`, at the cost of
|
|
|
|
|
-considerably larger cache files.
|
|
|
|
|
|
|
+`opts.includeStateValues` controls whether cache files store state values for debugging. It defaults to `true` and can be
|
|
|
|
|
+set to `false` to reduce cache file size.
|
|
|
|
|
|
|
|
## Configuration
|
|
## Configuration
|
|
|
|
|
|
|
@@ -83,11 +84,14 @@ opts: {
|
|
|
cacheDir: '.cache',
|
|
cacheDir: '.cache',
|
|
|
clean: true,
|
|
clean: true,
|
|
|
ignoreExisting: false,
|
|
ignoreExisting: false,
|
|
|
- includeStateValues: false,
|
|
|
|
|
|
|
+ includeStateValues: true,
|
|
|
logLevel: 'debug',
|
|
logLevel: 'debug',
|
|
|
include: {
|
|
include: {
|
|
|
styles: [{ pattern: '~/.rhedyn/styles/*.scss' }]
|
|
styles: [{ pattern: '~/.rhedyn/styles/*.scss' }]
|
|
|
},
|
|
},
|
|
|
|
|
+ markdown: {
|
|
|
|
|
+ allowHtml: false
|
|
|
|
|
+ },
|
|
|
site: {
|
|
site: {
|
|
|
name: "My Website",
|
|
name: "My Website",
|
|
|
shortName: "My Site",
|
|
shortName: "My Site",
|
|
@@ -226,12 +230,15 @@ async function myAction({ config, jobConfig, meta }) {
|
|
|
|
|
|
|
|
The following actions are available from `actions`:
|
|
The following actions are available from `actions`:
|
|
|
- `compileSass`: Compiles SCSS files to compressed CSS
|
|
- `compileSass`: Compiles SCSS files to compressed CSS
|
|
|
|
|
+- `renderMarkdownToHtml`: Parses markdown into HTML and returns it as task detail
|
|
|
|
|
+- `renderTemplate`: Renders Handlebars templates with the current task state
|
|
|
- `renderIndex`: Renders index pages and index list pages
|
|
- `renderIndex`: Renders index pages and index list pages
|
|
|
- `renderMarkdownWithTemplate`: Renders markdown with Handlebars templates, includes frontmatter support
|
|
- `renderMarkdownWithTemplate`: Renders markdown with Handlebars templates, includes frontmatter support
|
|
|
- `optimiseSvg`: Optimizes SVG files using SVGO
|
|
- `optimiseSvg`: Optimizes SVG files using SVGO
|
|
|
- `copy`: Copies files without processing
|
|
- `copy`: Copies files without processing
|
|
|
- `imageToWebP`: Converts images to WebP with multiple sizes for responsive images
|
|
- `imageToWebP`: Converts images to WebP with multiple sizes for responsive images
|
|
|
- `generateFavicons`: Generates favicon sets and web app manifests
|
|
- `generateFavicons`: Generates favicon sets and web app manifests
|
|
|
|
|
+- `generateTaxonomy`: Builds grouped/sorted lists from state inputs
|
|
|
|
|
|
|
|
**Resources and Cross-Task References:**
|
|
**Resources and Cross-Task References:**
|
|
|
|
|
|
|
@@ -245,14 +252,28 @@ Some examples can be found in `src/actions/`, and you can find utility functions
|
|
|
The default configuration includes:
|
|
The default configuration includes:
|
|
|
|
|
|
|
|
1. **Parallel processing group:**
|
|
1. **Parallel processing group:**
|
|
|
|
|
+ - `images`: Converts JPG images to WebP with multiple sizes
|
|
|
- `styles`: Compiles SCSS files to CSS
|
|
- `styles`: Compiles SCSS files to CSS
|
|
|
- `icons`: Optimizes SVG icons
|
|
- `icons`: Optimizes SVG icons
|
|
|
- - `images`: Converts JPG images to WebP with multiple sizes
|
|
|
|
|
- `static files`: Copies static files
|
|
- `static files`: Copies static files
|
|
|
- `favicons`: Generates favicon sets from source images
|
|
- `favicons`: Generates favicon sets from source images
|
|
|
|
|
|
|
|
-2. **Sequential processing:**
|
|
|
|
|
- - `pages`: Renders Markdown files with Handlebars templates (runs after the parallel group to access processed resources)
|
|
|
|
|
|
|
+2. **Sequential tasks:**
|
|
|
|
|
+ - `blog-markdown`: Parses blog markdown into HTML detail
|
|
|
|
|
+ - `markdown`: Parses general markdown into HTML detail
|
|
|
|
|
+
|
|
|
|
|
+3. **Parallel processing group:**
|
|
|
|
|
+ - `author-taxonomy`: Builds author groupings from blog entries
|
|
|
|
|
+ - `tag-taxonomy`: Builds tag groupings from blog entries
|
|
|
|
|
+ - `blog-latest`: Builds a sorted list of recent blog entries
|
|
|
|
|
+ - `includes`: Renders template includes to HTML
|
|
|
|
|
+
|
|
|
|
|
+4. **Parallel processing group:**
|
|
|
|
|
+ - `render pages`: Renders standard pages from markdown state
|
|
|
|
|
+ - `render blog pages`: Renders blog pages from blog markdown state
|
|
|
|
|
+ - `render author indexes`: Renders author index pages and index list
|
|
|
|
|
+ - `render tag indexes`: Renders tag index pages and index list
|
|
|
|
|
+ - `render blog home`: Renders the blog index page
|
|
|
|
|
|
|
|
## Logging
|
|
## Logging
|
|
|
|
|
|