ahub

0.0.7 • Public • Published

ahub

npm npm Build Status Coverage Status

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

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)

Readme

Keywords

Package Sidebar

Install

npm i ahub

Weekly Downloads

7

Version

0.0.7

License

MIT

Unpacked Size

30.5 kB

Total Files

7

Last publish

Collaborators

  • kthjm