asimov-static

2.2.3 • Public • Published

asimov-static

NPM version Build Status Code Climate Dependency Status

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 with ENV=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

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.

Readme

Keywords

none

Package Sidebar

Install

npm i asimov-static

Homepage

asimovjs.org

Weekly Downloads

3

Version

2.2.3

License

none

Last publish

Collaborators

  • adamrenklint
  • raymondmayjr
  • mlabod