Name: ssbc-sitegen
Owner: Secure Scuttlebutt Consortium
Description: Tool to generate the GH pages for ssbc repos
Created: 2016-01-13 16:27:26.0
Updated: 2017-11-10 03:37:14.0
Pushed: 2016-01-19 16:53:46.0
Homepage: null
Size: 62
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A tool to generate the GH pages for ssbc repos. Requires the latest node because it uses es6 features, such as template-strings and generators.
~/ssbc-sitegen
.gh-pages
branch.~/ssbc-sitegen/index.js <repo>
Example:
/patchwork
checkout gh-pages
bc-sitegen/index.js patchwork
Each repo has a folder under ./repos
, plus an entry in the REPOS
constant in ./index.js
.
The JS files in the repo folder are templates.
The build-tool will iterate all .JS and .TXT files under ./repo/<repo>/*
and write the output to cwd.
The output-file is the file, minus the .js
or .txt
extension.
Therefore, index.html.js
will output index.html
.
The build-tool also iterates and outputs all JS files under ./common
.
Note, most templates will pull from markdown files in the cwd, such as README.md
.
The JS files are template files.
They should export a generator which yields the output.
They are passed the object that's exported by ./gen.js
, which gives them access to build utilities and partials.
The TXT files are copied without changes.