fastpress

fast and simple static site generator

Getting Started

Install

$ npm i -D @iolo/fastpress

Build

$ npx fastpress build
$ npx fastpress watch

preview with local http server

$ npx serve out/

see serve

publish to github pages

$ npx gh-pages -d out/

see gh-pages

Configuration

module.exports = {
  baseDir: '.', // absolute or relative to config file
  outDir: 'out', // absolute or relative to baseDir
  staticDir: 'static', // absolute or relative to baseDir
  contentDir: 'content', // absolute or relative to baseDir
  layoutDir: 'layout', // absolute or relative to baseDir
  site: {
    url: 'https://iolo.github.io',
    title: 'Iolo\'s Personal Homepage',
    description: 'Ho eyo he hum!',
    image: '/banner.png',
  },
}

Directory Structure

+ content/
  - index.md
  + about/
    - index.md
  + posts/
    - index.md
    + slug
      - index.md
  + ...
+ static/
  - favicon.ico
  - style.css
  - script.js
  - logo.png
  - ... 
+ layout/
  - default.ejs
  - page.ejs
  - post.ejs
  - posts.ejs
  - tags.ejs
  - ...

Front Matter

Custom Layout

see ejs


May the SOURCE be with you…