Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Awesome static site generator, powered by asimov.js and asimov-server

License

Notifications You must be signed in to change notification settings

microsoftarchive/asimov-static

 
 

Repository files navigation

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.

About

Awesome static site generator, powered by asimov.js and asimov-server

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 98.4%
  • CSS 1.5%
  • Makefile 0.1%