Skip to content

davidthewatson/doc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Doc: A Bun-based SSG

What?

Doc is an SSG that takes MD input and renders HTML output.

  1. Github Flavored MarkDown (GFM)
  2. Jinja lite structure (includes)
  3. Pico (CSS) style

When?

Started January 2025

Why?

  1. My Python Static Jinja code was crufty, slow, legacy.
  2. Latency is the Mother of invention.
  3. Bun is fun!

How

  1. bun.sh
  2. GitHub-flavored Markdown
  3. Jinja lite (includes) for structure
  4. Pico Cascading Style Sheets (CSS) for style
  5. Automated tests for sanity

Getting Started

Prerequisites

Installation

  1. Clone the repo:

    git clone https://github.com/davidthewatson/doc.git
    cd doc
  2. Install dependencies:

    bun install

Usage

  1. Setup .env file for your site:

    export SITEROOT=~/github/davidthewatson.github.io
    export SRC=$SITEROOT/src
    export STATIC=$SITEROOT/static
    export DOCS=$SITEROOT/docs
    source .env
    
  2. Run the build script:

    bun run build
  3. Run the tests:

    bun run tests/runTests.js

Future now

  1. Tests return short output
  2. Refactor js to ts
  3. Refactor style
  4. Done for now.

License

This project is licensed under the BSD 3-clause License - see the LICENSE file for details.

Copyright (c) 2025, David Watson

About

Static Site Generator (SSG) in bun (https://bun.sh/)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published