# http-server-md-template-blank
Blank template skeleton for http-server-md, used to populate new template
modules by sermit init-template
.
README & DOCS TODO
pnpm add http-server-md-template-blank
pnpm gen-readme // update README.md
pnpm docs // update DOCUMENTATION.md
pnpm test // lint & mocha
pnpm update-deps // bump all deps
See CHANGELOG.md for more information.
Distributed under the MIT license. See LICENSE.md for more information.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
The standalone JSDoc reference can be found in DOCUMENTATION.md
- http-server-md-template-blank
Blank template skeleton for http-server-md, serving as a reference for the required structure.
Used by the
sermit
CLI app to create an empty template repo via theinit-template
command.
- ASSETS_BUILD_PATH
Artifacts are stored in & resolved from the
public/
folder within the project root by default.- ASSETS
Static asset (files & folders) definition. Sources prefixed with
~
are resolved withrequireDynamicModule
.{ 'dest/path': 'src/path' }
- STYLES_BUILD_PATH
Artifacts are stored in & resolved from the
public/
folder within the project root by default.- STYLES
SCSS style definition, { dest: src }
- NAME
Unique name to identify template; should form the package name when prefixed with
http-server-md-template-
.- PUBLIC_PATH
Absolute path to rendered resources folder, ready for serving.
- INCLUDE_PATH
Nunjucks templates are in
res/templates
within the template root by default.- TEMPLATE
Recommended filename
- TEMPLATE
Recommended filename
- getConfig([userConfig]) ⇒
Sermit~Config
Combine the provided & default configurations as-needed.
- genImageMarkdown(params) ⇒
string
Generate a markdown string to display an image at
relPath
.- genRawSrcMarkdown(params) ⇒
string
Generate a markdown string to render raw file contents.
- renderPageDirectory(templateConfig) ⇒
Sermit~Renderer
Directory listing renderer.
- renderPageFile(templateConfig) ⇒
Sermit~FileRenderer
Single file renderer.
Blank template skeleton for http-server-md, serving as a reference for the required structure.
Used by the sermit
CLI app to create an empty template repo via the
init-template
command.
Artifacts are stored in & resolved from the public/
folder within the
project root by default.
Static asset (files & folders) definition. Sources prefixed with ~
are
resolved with requireDynamicModule
.
{ 'dest/path': 'src/path' }
Artifacts are stored in & resolved from the public/
folder within the
project root by default.
SCSS style definition, { dest: src }
Unique name to identify template; should form the package name when prefixed
with http-server-md-template-
.
Absolute path to rendered resources folder, ready for serving.
Nunjucks templates are in res/templates
within the template root by
default.
Recommended filename
Recommended filename
Combine the provided & default configurations as-needed.
Kind: global function
Returns: Sermit~Config
- config
Param | Type | Default | Description |
---|---|---|---|
[userConfig] | Sermit~Config |
{} |
provided configuration |
Generate a markdown string to display an image at relPath
.
Kind: global function
Returns: string
- md
Param | Type | Description |
---|---|---|
params | object |
params |
params.relPath | string |
path relative to content root path. |
params.name | string |
image alt text. |
Generate a markdown string to render raw file contents.
Kind: global function
Returns: string
- md
Param | Type | Description |
---|---|---|
params | object |
params |
params.srcPath | string |
path to file, resolvable locally via fs |
Directory listing renderer.
Kind: global function
Returns: Sermit~Renderer
- renderer
Param | Type | Description |
---|---|---|
templateConfig | Config |
template config data. |
Single file renderer.
Kind: global function
Returns: Sermit~FileRenderer
- renderer
Param | Type | Description |
---|---|---|
templateConfig | Config |
template config data. |