/entu-cms

Entu CMS

Primary LanguageJavaScript

npm version Dependency Status

Entu CMS

  • Simple file based CMS.
  • Generate static HTML files from Jade templates.
  • Pass data to templates with Yaml files.
  • Use locale identificator in filenames to generate locale specific content.
  • ...

Installation

npm install -g npm-cms

Usage

npm-cms ./config.yaml
config.yaml
locales:
  - en
  - et
source: ./source
build: ./build
timeout: 10
jade:
  basedir: ./source/_templates
  pretty: false
  • locales: List of locale folders to generate. You can put locale identificator to filename (like index__.en__.jade or index__.et__.yaml) for locale speciffic content.
  • source: Folder with source files.
  • build: Folder to put generated HTML.
  • timeout: Seconds to sleep after each run.
  • jade.basedir: Jade basedir for simpler include/extend
  • jade.pretty: Boolean to set if output HTML is prettified or not.
Source folder like this ...
|-- source
    |-- _template
        |-- layout.jade
        |-- mixins.jade
    |-- testpage1
        |-- index.en.yaml
        |-- index.et.yaml
        |-- index.jade
    |-- testpage2
        |-- index.en.jade
        |-- index.et.jade
        |-- index.yaml
        |-- testpage2en
            |-- index.en.jade
            |-- index.en.yaml
    |-- index.jade
... will be converted to buld folder like this
|-- build
    |-- en
        |-- index.html
        |-- testpage1
            |-- index.html
        |-- testpage2
            |-- index.html
            |-- testpage2en
                |-- index.html
    |-- et
        |-- index.html
        |-- testpage1
            |-- index.html
        |-- testpage2
            |-- index.html