0.0.7 • Published 7 years ago
ahub v0.0.7
ahub
Generate site that is not blog but a hub.
yarn add -D ahub
yarn ahub init [src] [dest]
yarn ahub serveDirectory 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.jsonpage.json
Transformed to html.
_favicons.ext
Passed to favicons as source.
_image/
Optimized.
pngjpgsvggif
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.
langheadbody.backgroundbody.colorbody.links.backgroundbody.links.colorbody.links.rowLength
ahub.config.js
module.exports = {
src: '',
dest: '',
ignored: [],
sitemap: {},
favicons: {},
chokidar: {},
browsersync: {}
}common
srcdestignored
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]