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

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.6.tar.gz (51.8 MB 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.6-py3-none-win_amd64.whl (4.4 MB view details)

Uploaded Python 3Windows x86-64

marmite-0.2.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

marmite-0.2.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.5 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

marmite-0.2.6-py3-none-macosx_11_0_arm64.whl (4.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

marmite-0.2.6-py3-none-macosx_10_12_x86_64.whl (4.6 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: marmite-0.2.6.tar.gz
  • Upload date:
  • Size: 51.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for marmite-0.2.6.tar.gz
Algorithm Hash digest
SHA256 1cbb31f12fc309277153d91bcb27c63d2a690cb9fe7295df81309576caa1d3f6
MD5 b098b64453dc57265dfe8c8cbfd86d7f
BLAKE2b-256 f49233efb0d3e0bea507d5d0882cb9de133731a3b157ce178d37c90784906f23

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for marmite-0.2.6-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 df363e246b38d74f3491c2002bc00153b5bfa0bc7eb0042d5e1ead34e95158f0
MD5 da747735ec93a15f1547be0f8dd7c22d
BLAKE2b-256 951726558d41899aee56bb1ddc144391f372d17548be1318c44998396421bc1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.2.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 33442447b34dee731dff4b2c95e9386fa2356cf1896af6a0e184908fc0f31b26
MD5 6417058b22a4a17594a3e47a89df1286
BLAKE2b-256 b9113d3a59fd482ee528345a93fda26bd3d3a5828588844322412e0905ef245c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.2.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1dcdaea11089b88f02eddd8c86ba429b07e1c70d32f02d0776bc27d4ce961e33
MD5 fb7369cd1d753f9475ed2f2e1b444c42
BLAKE2b-256 172a9a164b967f61e77eac6f926446031aab0a9aec9c0af4834804afe199617a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.2.6-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2ade59d0af7f951479e2ca55659ec2ca0acb388addb9097db2a07bd3bd3836b9
MD5 8c7da99e0a8d216ca21801af39a66e9b
BLAKE2b-256 ab4c921d33184cdf3228faef8df14825a164295da85fe14d4518a8572f098564

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for marmite-0.2.6-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 efa977abd4494929d5024b3f0a0bf619748d3f0515665ea6f52e65343af29257
MD5 56f423c46d7a69fd5cc7ff6db08f391a
BLAKE2b-256 53ab69d2ebac0e7ac8740f0106dcf4efae71d05c2f87929d5d4ca269c1af9049

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