asimov-static v2.2.3
asimov-static
Static site generator for asimov.js and asimov-server
Made by Adam Renklint, Berlin 2014-2015. MIT licensed.
Install
$ npm install --save asimov-static
Usage
- Install the asimov cli
- Create a new asimov project
- Add pages in
/content
using mixed Markdown and YAML format - Add localized versions of page
- Add handlebars templates to
/site/templates
- The name of the page textfile defines which template is used
- Add styles to
/site/styles
and include with{{style "foo"}}
in your template - Add client side scripts with
{{script "foo"}}
, transpiled from es6/7 with Babel - Include any template as a partial with
{{import "bar"}}
, and pass data with{{import "bar" object}}
or{{import "bar" key="value"}}
- Start with
$ asimov
or$ asimov debug
- Prebuild entire site to
/public
withENV=prebuild
, for use as pure static site generator
Advanced usage
Configuration
- environment configs are loaded automatically
- asimov.js config declarations
- languages define available languages, defaults to
["en"]
- defaultLangCode default
"en"
- defaultLangFallback allow localized pages to fall back to parent page when an attribute is not translated or available, defaults to
TRUE
- languages define available languages, defaults to
Examples:
Develop
Testing
- Run unit tests with
$ asimov test
- Smoke tests are in
/content/test
, run$ asimov
to view
Publish new version
- Bump version in
package.json
, following semver - Make sure the README reflects the changes
- Update the changelog
- Run
$ make publish
Credits
Author: Adam Renklint. Contributors: Adam Schroder, Raymond May Jr., Marvin Labod, Aditya Yadav.
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago