@khazl/ssg
static site generator
Last updated 9 months ago by khazl .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @khazl/ssg 
SYNC missed versions from official npm registry.

ssg

This repository contains a static site generator. Or at least its beginnings :-)

Installation

Simply install this repository globally with the following command:

npm install -g @khazl/ssg

Requirements / Project Structure

You need two directories:

  • ./content: Here you'll keep all your content.
  • ./templates: Here you'll keep your template(s) and the styling.

An example for the structure could looks like this:

.
└── content
|   └── index.md            // <- https://example.com/index.html
|   └── about-me.md         // <- https://example.com/about-me.html
|   └── blog
|       └── first-post.md   // <- https://example.com/blog/first-post.html
└── templates
    └── _default.hbs        // <- default template
    └── about-me.hbs        // <- specific template for about-me.md
    └── default.scss        // <- https://example.com/default.css
      

Content

Each Markdown file in the content directory represents one site.

Templates

The templates directory MUST contain a _default.hbs file as well as a default.scss file.

If some content sites should use a special template, this can easily be created.
For this you just have to create a hbs file with the same name as the content file.

Example

For an example, please check the linked Git repository

Usage

Navigate into your project directory and generate the static sites with:

ssg-generate

Now you should see a build directory. There you will find all your generated sites.

Planned Features

  • Automated navigation generation.
  • Parameter to make the CLI tool more flexible.
  • Advanced template placeholder for more sophisticated layouts.
  • Better asset management / support.
  • ...

Current Tags

  • 1.0.5                                ...           latest (9 months ago)

6 Versions

  • 1.0.5                                ...           9 months ago
  • 1.0.4                                ...           9 months ago
  • 1.0.3                                ...           9 months ago
  • 1.0.2                                ...           9 months ago
  • 1.0.1                                ...           9 months ago
  • 1.0.0                                ...           9 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 6
Last Month 2
Dependencies (6)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |