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

Playground

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.2.tar.gz (344.3 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.2-py3-none-win_amd64.whl (18.2 MB view details)

Uploaded Python 3Windows x86-64

marmite-0.3.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.7 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

marmite-0.3.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (18.4 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

marmite-0.3.2-py3-none-macosx_11_0_arm64.whl (19.1 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

marmite-0.3.2-py3-none-macosx_10_12_x86_64.whl (18.2 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: marmite-0.3.2.tar.gz
  • Upload date:
  • Size: 344.3 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.2.tar.gz
Algorithm Hash digest
SHA256 c9c5758bb568c8f3d0618792019246badd5fd3c59e312e2355dbc3666a51af2d
MD5 eeeccb95fcd734e9db4ff89059d83da1
BLAKE2b-256 4d3389b9329d69d75e7c278989ab42fe28603541a5afe198bfb02fc6e0832773

See more details on using hashes here.

File details

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

File metadata

  • Download URL: marmite-0.3.2-py3-none-win_amd64.whl
  • Upload date:
  • Size: 18.2 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.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 d8a16676a2a1031fd088b0f9e1710e30fff5c1527be974539e420b4da51de295
MD5 2f535dedc86e32f1a9e643d406f16706
BLAKE2b-256 5a8b07e3aa6d893242975e7e6b539dd0ebc87aa016af68b459ff9f1b6ee503df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.3.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8789fa8f37e18b751e9443ca23d31838da0a8daf07d7ce14f89c41e61a4338e8
MD5 0d6ad8aa832037471b378dac83b6f8bc
BLAKE2b-256 12606d6cde561dc453865a02e2440bd23ac5794fb15bd8e5d1754e2a2eb67f1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.3.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 27f0c1f236906cb893a39f8624ba4d53ef224ac650162a18652f0e79faaa30b7
MD5 b462b014ddb40c70026c49d8bd6705f9
BLAKE2b-256 aa46af26d9bbf713ac0d95032d3e3f88708d4e439c7d34dd34423d0bfde589a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.3.2-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d832414db9527b7316bb0c7f8215e32f26724f8e782c93c378568e7633ddccf4
MD5 2727c7e9fabbf2be51fb31fc951f4a93
BLAKE2b-256 4d6dfb48bb41a1d218eaed5b1b89173e20d243c5a18c7f8393682ba67d89f798

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.3.2-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9cc639f2544439d7777b34c4f0a2c389a7ab461021ad856977b82105e296332a
MD5 fb4529f2fb47b890c34c3c0bdad2302c
BLAKE2b-256 24b6e801ae95aeee451f9c4bc8c304006696bd9dd30301fc02fb0d3ac036d9ca

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