Generate site that is not blog but a hub.
yarn add -D ahub
yarn ahub init [src] [dest]
yarn ahub serve
_site // dest
├─ index.html
├─ page1/index.html
├─ _favicons/**
└─ _image/**
site // src
├─ index.json
├─ page1.json
├─ _favicons.[svg|png|jpg]
└─ _image/**
ahub.config.js
package.json
Transformed to html
.
Passed to favicons
as source.
Optimized.
png
jpg
svg
gif
{
"inherit": false,
"lang": "",
"head": {},
"body": {}
}
text for <title>{title}</title>
.
Whether to add prefix to <head>
.
GA_TRACKING_ID for gtagjs.
Array to contain tuple for html-tag
params.
{
"background": "",
"color": "",
"icon": "",
"title": "",
"href": "",
"description": "" // able to use html.
"links": {
"background": "",
"color": "",
"rowLength": 2,
"contents": [
{
"title": "",
"image": "",
"href": "", // target="_blank"
"hub": "" // target="_self"
}
]
}
}
Indicate whether to inherit the following properties from index.json
.
lang
head
body.background
body.color
body.links.background
body.links.color
body.links.rowLength
module.exports = {
src: '',
dest: '',
ignored: [],
sitemap: {},
favicons: {},
chokidar: {},
browsersync: {}
}
src
dest
ignored
Usage: ahub [options] [command]
Options:
-v, --version output the version number
-h, --help output usage information
Commands:
init [src] [dest]
create [options] <page...>
serve [options] [src] [dest]
build [options] [src] [dest]