Generator

    Sphido

    https://sphido.org/

    Sphido is pure static site generator written with speed, simplicity and flexibility in mind.

    Installation

    $ npm i @sphido/core @sphido/frontmatter @sphido/marked @sphido/meta @sphido/nunjucks

    Usage

    const globby = require('globby')
    const { getPages } = require('@sphido/core')
    const { save } = require('@sphido/nunjucks')
    ;(async () => {
    // 1. get list of pages
    const pages = await getPages(
    await globby('content/**/*.md'),
    ...[
    require('@sphido/frontmatter'),
    require('@sphido/marked'),
    require('@sphido/meta'),
    { save },
    ]
    )
    // 2. save them (with default template)
    for await (const page of pages) {
    await page.save(page.dir.replace('content', 'public'))
    }
    })()

    See more examples on GitHub.

    Supports

    • YAML front-matter
    • html/markdown source
    • custom extenders
    • Nunjucks templates
    ;