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.0.tar.gz (292.9 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.0-py3-none-win_amd64.whl (18.0 MB view details)

Uploaded Python 3Windows x86-64

marmite-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

marmite-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (18.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

marmite-0.3.0-py3-none-macosx_11_0_arm64.whl (18.9 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

marmite-0.3.0-py3-none-macosx_10_12_x86_64.whl (18.0 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: marmite-0.3.0.tar.gz
  • Upload date:
  • Size: 292.9 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.0.tar.gz
Algorithm Hash digest
SHA256 9e5b74775ec52712024ee36882dce003dbe158601d1d7dfcc0707e4d61ea24c3
MD5 9488c05455c085c2938950149b8e8b74
BLAKE2b-256 af7c74306654d6343265996503de1eec8373328de4d6c07e89da422b331b9f49

See more details on using hashes here.

File details

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

File metadata

  • Download URL: marmite-0.3.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 18.0 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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 16567c1c4fb6adf8aa3e16ccc46b2c6ecab2931f8ab3188ff87eafb3b08bd51c
MD5 ab990e599a5d7dacf2dee95e7b9d9b07
BLAKE2b-256 43f39b986b82464481da5f30e31d8ff482fd74b4b2a52e8adb0ba8cf19dc13b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4d1145b7041c3d3beb2c982cfecddd46cd0614f3f60a72d9e7a48b972ea74616
MD5 bf5d2ed7a18daddc5524c7e7516d5915
BLAKE2b-256 7218149b83f381ff464bd84f7fb3cb54b6cb6be37033cd019cf8c753658fd57c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.3.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5ee0248ffacf50f224604ed5077869b68c145011d53c3a9458ba9cd10e991784
MD5 ef0eafcf392f48ce581ba704600575f5
BLAKE2b-256 d4d23efdade238b30e38cc436c2b9e7f9d4dcdb85cd03e71f0e2724a70531a72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 07633a16744b1cbda254eb8020306f298844416590e4951850cd712024e65fe7
MD5 3c7cd2c80b2873c8e37ac1472c3f540f
BLAKE2b-256 4096931f1a103fadd1fbad4f2f0c09ff73438f740d9d7d72fdc95ea9c27cd347

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.3.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4c200aecf848d878bbddbc274c5640747c092dcb21887d54c96809e62eebe52b
MD5 91c2c227d8a2e9666159c010a64be52f
BLAKE2b-256 5ee2aa44ddacd764756ba63dc2c39ce83f9e15d39ddbd041b50d45e881044710

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