3.0.2 • Published 12 months ago

steelsky v3.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

STEEL SKY

A very lightweight, no BS static site generator written in NodeJS.

Automatically converts an arbitrary directory structure containing markdown and other static assets into a static site with no external dependencies.

Features

  • Handles bulk conversion of Markdown files to HTML
  • Preserves original arbitrary directory structure
  • Supports arbitrary static assets
  • Simple vanilla HTML/CSS "templating" system
    • Add your own front-end frameworks!
  • No lock-in
    • Your original markdown files stay perfectly intact and portable
  • Automatically generates a JSON site index file
    • Useful for site searches ect.
  • Generated files have no external dependencies and can work fully offline
  • As minimalist as possible while remaining functional and modern

Depends On

  • Showdown
  • Showdown-highlight

Install

npm install steelsky

Initialize

You can init a new SteelSky project in an empty directory like this:

steelsky init

How it Works

A basic SteelSky directory structure looks like this:

root/
--sscfg.json
--source/
----PageA.md
----PageB.md
----PageC.html
----Images/
------Image.jpg
---- ...
--layout/
----header.html
----footer.html
----theme.css
--build/
---- ...

When you run the steelsky command you will get some output in your ./build directory like this:

build/
--PageA.md
--PageB.md
--PageC.html
--Images/
----Image.jpg
-- ...

These files can be served with any web server software you want. Such as Apache or NGinx.

Config

SteelSky uses a very simple config file:

{
    "sourcePath": "./source",
    "layoutPath": "./layout",
    "highlightStyle": "monokai-sublime",
    "outPath": "./build/"
}

Each property is required and there are no other properties which are not listed here.

Meta Data

Each markdown file in your source directory can optionally contain a SteelSky meta element.

<steelsky>
{
  "title":"Home",
  "description":"The home page."
}
</steelsky>

This can contain any valid JSON data but it usually has the following properties:

  • title
  • description

This JSON object is added into the meta property of this pages entry in the automatically generated listing.json file. This data is also available to any JS running on the page itself via the ssmeta object which is automatically added to any page with this meta element.

Note: Ensure that you have valid JSON here or you will cause JS errors when your page is rendered by the browser!

Why did I write this?

Over the years I've had my site running on several different systems. Off the top of my head:

I won't go into to detail about why each one of these systems wasn't what I was looking for because ultimately they all had the same problem. They are all much more complex than then need to be.

What I was looking for a was a system that would offer these features:

  • Turn Markdown into valid HTML
  • Handle syntax highlighting
  • Handle indexing/listing files

I think that a static site generator should be as simple as possible only doing the bare minim required to generate the site.

3.0.2

12 months ago

3.0.1

12 months ago

2.1.0

12 months ago

2.0.3

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago