The way to blog with markdown.
If you or your company is benefitting from Markblog, consider becoming a sponsor. This way I can work on new features and continue to maintain it worry-free.
Markblog is a small cli
that converts markdown files into a lightweight blog.
It is not tied to any platform, and you own your files. In other words, you are the only one owning your content.
Markblog aims to be easy to use and uncomplicated.
- Install deno
deno install --allow-read --allow-write --unstable --allow-run --name markblog https://raw.githubusercontent.com/olaven/markblog/master/mod.ts
- Grab the location path at end of logging
- Update your path:
export PATH="<THE_LOCATION>:$PATH"
- Run
markblog init
in an empty folder. - Write posts in the generated
./posts
, in.md
-files. - Run
markblog build
to build pages.
See this guide for a git/CI-integrated setup. This is, of course, just one of the many ways you could use Markblog.
All kinds of contributions are welcome. Feature requests, bug reports, code, artwork, documentation, or just feedback in general.
Do not hesitate to post an issue 🍯
Versions are managed using Deno's version tool.
To update, use version patch
, version minor
or version major
according to semver.
This updates the VERSION
file and creates a git tag for the version.
markblog init
will set up everything (AKA 1 file and 1 folder 😅)- (optional) pass options customize. Make sure to use the same options when building!
markblog build
actually builds your webpage.- (optional) pass options customize.
markblog help
if you are stuck
Markblog automatically generates an rss-feed, feed.xml
if rss_options
is specified
in the options file. See the RSS-option under options for more details.
Options enable you to specify where Markblog should look for files
when generating your blog. There are default settings, and specifying
custom options can be emitted entirely. If however, you want to use custom options, provide ./options.json
at the
root of your blog directory. If you want options in a custom location, use
--options
-flag, like: --options path/to/options.json
.
As an example, custom location of posts and custom stylesheet for posts would look something like this:
{
"post_source": "./path/to/posts",
"post_style": "./path/to/custom/style.css",
}
- Title of blog
blog_title
- Title of the page, displayed in the browser tab
- "Blog" by default
- Source of posts
post_source
- the directory where Markblog will search for blog-posts
./posts
by default
- Destination of posts
post_destination
- The Directory where posts will go after building
./out
by default
- CSS stylesheet of posts
post_style
- The location of stylesheet for the posts, relative to
post_destination
../style.css
by default
- CSS stylesheet of index
index_style
- The location of stylesheet for the front page, relative to root folder
./style.css
by default
- Custom favicon
favicon
- Custom favicon
""
by default
- RSS feed
rss_options
- Specified necessary information for RSS. If present, feed is automatically generated.
title
,description
andlink
must be present, i.e.:{ "rss_options": { "title": "My amazing blog!", "description": "This is a blog about amazing stuff", "link": "https://amazing-example-blog.com" } }
- Git History Integration
git_history
- Integrates with git to 1) show the latest commit message of a post and 2) link to the latest changelog at the bottom of the page
enabled
specifies it is enabled or not.false
by default.host
specifies where the git repo is hosted, for correct links."none"
by default. Can be either"github"
,"sourcehut"
or"none"
. In the latter case, no links will be shown.{ "git_history": { "enabled": true, "host": "sourcehut", "username": "olaven", "repo_name": "markblog" } }