mdblog 0.5.0

create static site blog from markdown files.
Documentation

Mdblog

Create static site blog from markdown files with features:

  • markdown format
  • TeX style math support
  • post tags index
  • hidden post
  • post title is the title of markdown file
  • post url is some to path of markdown file

Install

mdblog is implemented by rust language, so you need cargo command:

cargo install mdblog

mdblog will be installed in your cargo binary directory(~/.cargo/bin/).

CLI

mdblog can be use as a command:

$ mdblog -h
Usage:
    mdblog init <blog>
    mdblog build
    mdblog serve [-p <port>]
    mdblog -v | --version
    mdblog -h | --help

Options:
    -h, --help          Display this message
    -v, --version       Print version info and exit
    -p, --port <port>   Serve with port number

init blog

$ mdblog init myblog

blog directory(myblog) layout is initialized:

$ tree myblog
myblog
├── Config.toml
├── media
├── posts
│   └── hello.md
└── _themes
    └── simple
        ├── static
        │   ├── favicon.png
        │   ├── logo.png
        │   ├── main.css
        │   └── main.js
        └── templates
            ├── base.tpl
            ├── index.tpl
            ├── post.tpl
            └── tag.tpl

6 directories, 10 files

build blog

$ cd myblog
$ mdblog build

the blog static files are build into the subdir _build, the current blog directory(myblog) layout is:

$ tree .
.
├── _builds
│   ├── blog
│   │   ├── posts
│   │   │   └── hello.html
│   │   └── tags
│   │       ├── hello.html
│   │       └── world.html
│   ├── index.html
│   ├── media
│   └── static
│       ├── favicon.png
│       ├── logo.png
│       ├── main.css
│       └── main.js
├── Config.toml
├── media
├── posts
│   └── hello.md
└── _themes
    └── simple
        ├── static
        │   ├── favicon.png
        │   ├── logo.png
        │   ├── main.css
        │   └── main.js
        └── templates
            ├── base.tpl
            ├── index.tpl
            ├── post.tpl
            └── tag.tpl

12 directories, 18 files

serve blog

$ mdblog serve

Config.toml

footer_note = "Keep It Simple, Stupid!"
site_logo = "/static/logo.png"
site_motto = "Simple is Beautiful!"
site_name = "Mdblog"
theme = "simple"