Skip to content

seanbreckenridge/markdown_stew

Repository files navigation

markdown_stew

A single-page HTML generator that takes .md, .txt or .html files as input, and creates a static file with no dependencies which lets you switch between rendered versions of those files.

So - it just throws all the files you give it into a single file, hence the name.

I use this for notes or documentation, where I want to be able to switch between a raw/rendered versions of the file, or create a page I can scroll through on my phone, but don't want to use a full-blown wiki or CMS.

As an example of the output, see here

Install

go install 'github.com/seanbreckenridge/markdown_stew/cmd/markdown_stew@latest'

Manually:

git clone https://github.com/seanbreckenridge/markdown_stew
cd ./markdown_stew
go build -o markdown_stew ./cmd/markdown_stew
# copy onto your $PATH somewhere
cp ./markdown_stew ~/.local/bin

If you want to hack on the template, see templ docs, make will update the generated golang template file index_templ.go

Usage

Usage: markdown_stew [flags] <files...>
  -dark-mode
    	default to dark mode
  -language string
    	language for HTML page (default "en")
  -title string
    	title to use

To re-render on save, I use entr:

ls *.md | entr -c sh -c 'markdown_stew *.md >out.html; reload-browser'

About

a single page HTML generator for notes/docs/markdown

Topics

Resources

Stars

Watchers

Forks