ahub
v0.0.7
Published
Generate site that is just a hub.
Downloads
3
Readme
ahub
Generate site that is not blog but a hub.
yarn add -D ahub
yarn ahub init [src] [dest]
yarn ahub serve
Directory Structure
_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
[page].json
Transformed to html
.
_favicons.[ext]
Passed to favicons
as source.
_image/
Optimized.
png
jpg
svg
gif
[page].json
{
"inherit": false,
"lang": "",
"head": {},
"body": {}
}
head
title
text for <title>{title}</title>
.
og
Whether to add prefix to <head>
.
ga
GA_TRACKING_ID for gtagjs.
tags
Array to contain tuple for html-tag
params.
body
{
"background": "",
"color": "",
"icon": "",
"title": "",
"href": "",
"description": "" // able to use html.
"links": {
"background": "",
"color": "",
"rowLength": 2,
"contents": [
{
"title": "",
"image": "",
"href": "", // target="_blank"
"hub": "" // target="_self"
}
]
}
}
inherit
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
ahub.config.js
module.exports = {
src: '',
dest: '',
ignored: [],
sitemap: {},
favicons: {},
chokidar: {},
browsersync: {}
}
common
src
dest
ignored
command: build
command: serve
CLI
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]
License
MIT (http://opensource.org/licenses/MIT)