Skip to main content

Marmite is the easiest static site generator.

Project description

Marmite

marmite

Marmite [Markdown makes sites] is a very! simple static site generator.

AGPL License Crates.io Version Docs and Demo

Create blog

I'm a big user of other SSGs but it is frequently frustrating that it takes so much setup to get started.
Just having a directory of markdown files and running a single command sounds really useful.
— Michael, marmite user.

How it works

It does "one" simple thing only:

  • Reads all .md files on the input directory.
  • Using CommonMark parse it to HTML content.
  • Extract optional metadata from frontmatter or filename.
  • Generated html file for each page.
  • Outputs the rendered static site to the output folder.

It also handles generating or copying static/ and media/ to the output dir.

Before you start, you should know

  1. Marmite is meant to be simple, don't expect complex features
  2. Marmite is for bloggers, so writing and publishing articles in chronological order is the main use case.
  3. The generated static site is a flat HTML site, no subpaths, all content is published in extension ending URLS ex: ./{name}.html|rss|json
  4. There are only 2 taxonomies tags: (to group similar content together) and stream: (to separate content in a different listing)
  5. Marmite uses the date: attribute to differentiate posts from pages

Features

  • Everything embedded in a single binary.
  • Zero-Config to get started.
    • optionally fully configurable
  • Common-mark + Github Flavoured Markdown + Extensions.
  • Raw HTML allowed.
  • Emojis :smile:, spoiler ||secret||.
  • Wikilinks [[name|url]] and Obsidian links [[page]].
  • Backlinks.
  • Tags.
  • Multi authors.
    • Author profile page
  • Multi streams.
    • Separate content in different listing
  • Pagination.
  • Static Search Index.
  • RSS Feeds.
    • Multiple feeds (index, tags, authors, streams)
  • Built-in HTTP server.
  • Auto rebuild when content changes.
  • Built-in theme
    • Light and Dark modes.
    • Multiple colorschemes
    • Fully responsive
    • Spotlight Search.
    • Easy to replace the index page and add custom CSS/JS
    • Easy to customize the templates
    • Math and Mermaid diagrams.
    • Build-time syntax highlighting via arborium.
    • Commenting system integration.
    • Banner images and og: tags.
  • CLI to start a new theme from scratch

Installation

Install with cargo

cargo binstall marmite

or

cargo install marmite

Or download the pre-built binary from the releases

Alternative installation methods

Package managers

Homebrew (macOS/Linux)

brew install marmite

View formula

Arch Linux (AUR)

yay -S marmite-bin

View package

FreeBSD

pkg install marmite

View port

Or use docker

[!IMPORTANT]
The directory containing your marmite project must be mapped to containers /input
If running inside the directory use $PWD:/input The result will be generates in a site folder inside the input dir.

Build

$ docker run -v $PWD:/input ghcr.io/rochacbruno/marmite
Site generated at: site/

Serve (just add port mapping and the --serve)

$ docker run -p 8000:8000 -v $PWD:/input ghcr.io/rochacbruno/marmite --serve

[!INFO]
By default will run :latest, Add :x.y.z with the version you want to run.

Usage

It's simple, really!

$ marmite folder_with_markdown_files path_to_generated_site
Site generated at path_to_generated_site/

CLI

❯ marmite --help
Marmite is the easiest static site generator.

Usage: marmite [OPTIONS] <INPUT_FOLDER> <OUTPUT_FOLDER>

Arguments:
  <INPUT_FOLDER>   Input folder containing markdown files
  <OUTPUT_FOLDER>  Output folder to generate the site

Options:
      --serve            Serve the site with a built-in HTTP server
      --watch            Detect changes and rebuild the site automatically
      --bind <BIND>      Address to bind the server [default: localhost:8000]
      --config <CONFIG>  Path to custom configuration file [default: marmite.yaml]
      --debug            Print debug messages Deprecated: Use -vv for debug messages
      --init-templates   Initialize templates in the project
      --start-theme      Initialize a theme with templates and static assets
      --generate-config  Generate the configuration file
  -v, --verbose...       Verbosity level (0-4) [default: 0 warn] options: -v: info,-vv: debug,-vvv: trace,-vvvv: trace all
  -h, --help             Print help
  -V, --version          Print version

Live reload in development

When running with --serve --watch, Marmite exposes a WebSocket-based live reload helper. Add this snippet to your base template so the browser refreshes after each rebuild:

<script src="/__marmite__/livereload.js"></script>

Getting started

Read a tutorial on how to get started https://marmite.blog/getting-started.html and create your blog in minutes.

Docs

Read more on how to customize templates, add comments etc on https://marmite.blog/

That's all!

Marmite is very simple.

If this simplicity does not suit your needs, there are other awesome static site generators.

Here are some that I recommend:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

marmite-0.3.1.tar.gz (295.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

marmite-0.3.1-py3-none-win_amd64.whl (17.9 MB view details)

Uploaded Python 3Windows x86-64

marmite-0.3.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

marmite-0.3.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (17.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

marmite-0.3.1-py3-none-macosx_11_0_arm64.whl (18.8 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

marmite-0.3.1-py3-none-macosx_10_12_x86_64.whl (17.8 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file marmite-0.3.1.tar.gz.

File metadata

  • Download URL: marmite-0.3.1.tar.gz
  • Upload date:
  • Size: 295.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for marmite-0.3.1.tar.gz
Algorithm Hash digest
SHA256 7d96915183a787dc303fa5c88daa2e3d2c44adad8ba0738ad3e9bb8ccedb3082
MD5 bdf665296fc2a4420ff30cc29878335a
BLAKE2b-256 55e45132360d730605b0dc1490631110fc65c6391ab63e569594e569e0a25387

See more details on using hashes here.

File details

Details for the file marmite-0.3.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: marmite-0.3.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 17.9 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for marmite-0.3.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 315c6e08d68c0fae778c55db60ccc71211fd5d3a4e1d2a077b3bbde6ebe186ae
MD5 42f2e6884fa5deabd15aff7dd05daf43
BLAKE2b-256 1177adbd4e6123c804ce4b13a35716da896500fd3d27882aec56856e9947549c

See more details on using hashes here.

File details

Details for the file marmite-0.3.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for marmite-0.3.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a50af8a5b2deb91d206fc22f84128b2e7886538056a76059c8211125a0700bc5
MD5 d6bcf411997bf8eea8c45809a73f6e04
BLAKE2b-256 e675512a279513bed701d89767f444542032073c5a5958207c09467c5cd7691d

See more details on using hashes here.

File details

Details for the file marmite-0.3.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for marmite-0.3.1-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 80ffe394415e86b786454a65a6ff3ab5fc037e5a66812d208da6fd65438b50b0
MD5 45693d024fe0c2ebab9b012d532eec5d
BLAKE2b-256 1cad552d2ed405f50bf2a5f8de6a1fd6d10f184a4afcd4f6b03a49175d9d6215

See more details on using hashes here.

File details

Details for the file marmite-0.3.1-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for marmite-0.3.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0f303ade61d7ac5d57024cb19cd4b7c4898ca38a9ffe21a36be54589446e4d93
MD5 1cc9bf72a04c058dc9dd3896edf7a3fc
BLAKE2b-256 77ec0afe8cc1db0cfe1d57c1a714bb4976b3a5aac2d0dda3cd5e9f08f5f0224d

See more details on using hashes here.

File details

Details for the file marmite-0.3.1-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for marmite-0.3.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0bcfcaae7526af07d96612f14f18e595181a0ff5ab25b69fd2c7dfa78f3f1f98
MD5 1381e99e421ec26e67bc17987697241f
BLAKE2b-256 a9252a8e849f0f6cf715ef0dbac315a1e370f58259aed3a8718023f04dcf8eb7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page