- Notifications
You must be signed in to change notification settings - Fork14
static site generator from markdown files(markdown 格式静态博客生成器)
License
FuGangqiang/mdblog.rs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
点击中文版 README进入中文文档。
Static site generator from markdown files with features:
- TeX style math support
- file path is the post url
- file name is the post title
- post can be hidden(link does not be insert into index/tag page)
you can check thedemo siteto learn the usages of mdblog.
mdblog
is implemented by rust language(2018 edition), so you need cargo command:
cargo +nightly install mdblog
mdblog
will be installed in your cargo binary directory(~/.cargo/bin/
).
mdblog
can be use as a command:
$ mdblog -hstatic site generator from markdown filesUSAGE: mdblog <SUBCOMMAND>FLAGS: -h, --help Prints help information -V, --version Prints version informationSUBCOMMANDS: build Build the blog static files help Prints this message or the help of the given subcommand(s) init Initialize the blog directory layout new Create a blog post serve Serve the blog, rebuild on change theme Blog theme operations
you can also check the subcommand usage:
$ mdblog serve -hServe the blog, rebuild on changeUSAGE: mdblog serve [OPTIONS]FLAGS: -h, --help Prints help information -V, --version Prints version informationOPTIONS: -p, --port <port> Serve the blog at http://127.0.0.1:<port> [default: 5000]
$ mdblog init myblog
blog directory(myblog
) layout is initialized:
myblog├── config.toml├── media├── posts│ ├── hello.md│ └── math.md└── _themes
config.toml
: blog config filemedia
: blog media directoryposts
: blog posts directoryposts/hello.md
: a markdown style post_themes
: blog themes directory
$ cd myblog$ mdblog build
the blog static files are build into the subdir_build
, the current blog directory(myblog
) layout is:
myblog├── config.toml├── media├── posts│ ├── hello.md│ └── math.md├── _themes└── _builds
_builds
: generated static-site top directory
$ mdblog serve
open the site index page automatically,and re-generate your static-site when you add or change content,
create a new post titledanother
:
$ mdblog new another
a new markdown fileposts/another.md
is created,you can edit it for the new post.
refresh the index page, you will find the new post.
site_url =""site_name ="Mdblog"site_motto ="Simple is Beautiful!"footer_note ="Keep It Simple, Stupid!"media_dir ="media"build_dir ="_build"theme ="simple"theme_root_dir ="_themes"rebuild_interval =2posts_per_page =20
About
static site generator from markdown files(markdown 格式静态博客生成器)
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.