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.
    • Syntax Highlight.
    • 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.2.7.tar.gz (251.6 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.2.7-py3-none-win_amd64.whl (4.7 MB view details)

Uploaded Python 3Windows x86-64

marmite-0.2.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

marmite-0.2.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

marmite-0.2.7-py3-none-macosx_11_0_arm64.whl (4.5 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

marmite-0.2.7-py3-none-macosx_10_12_x86_64.whl (4.8 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for marmite-0.2.7.tar.gz
Algorithm Hash digest
SHA256 da17a0f1b68aa3ee8eae5fd4900cbcb1df495c155620df9630bf9ce564210c5d
MD5 a8c5d603a990dbcc5f9ab7c36fa0f68d
BLAKE2b-256 71ea5666a460a230f041a25fc96f32dd6aa6b3432bb6f3119c978398f1dd92df

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for marmite-0.2.7-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d8ce37097c2b5ec80f69b31f536999a83598585b97a794314977057106480c68
MD5 f35e2c2db894f4a63bd8df29701fdb2e
BLAKE2b-256 82c5b6f1494301aac7e12413ba8ccabb58a90ed63b249c098420155f881e7d9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.2.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c185cf36f8bd7453524f07559fcb54376b0c38ea9822491b3a53ac1ee11664ce
MD5 78d42ea4196f9800a333910560878c3d
BLAKE2b-256 b58a3ed75759b4f0e63525391e0836d4377a915f063e23a20ab4e2567ce62c19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.2.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 be82cf55af873c393ff1d7c9e62908d70d1f2e7b0b8224a754626ae9a0ac8638
MD5 4199c251bb339b147e02c9b5e8426a90
BLAKE2b-256 91911e1a81c053f7cb56235933703ebf0f9b6f36bb0640c4866b41c81e686542

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.2.7-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ae81a578218c1edf9d1ccd27a2c6d03b75ef3cfbd0140acb35d5c11fc546e6ab
MD5 776ee3e7e69814c2ce3c8b25895f21c2
BLAKE2b-256 004235049ee1744b389ed5fac384a1863052fe96a6ffe10daee645ccb9f1aa7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.2.7-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2eb69f277e4f1c3e66a22e67df09e2c0e638fb8ff228df4480186b98cf7f0c0d
MD5 102264facd9c8b7b4988cdf16a6be7d2
BLAKE2b-256 c24f9b03fc1d5c1655c48e1a74770ab1b4354d46b76cb2a4869c140ac6b36c1f

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