Generate static blog from markdown files in your git repository.
- Clone this repo
- Install dependencies
go get
- Run the CLI tool
go run main.go -r <repo-url> -t <token> -o <output-dir> -n <blog-name> -th <theme-name>
Example
go run main.go -r https://github.com/madeindra/markdownblog-example -o generated -n "Example Blog" -th examples
CLI Flags:
-h
or--help
: Show help-r
or--repo
: The URL of the git repository (Github only, must be a public repo if no token is provided)-t
or--token
: The access token for the git repository-o
or--output
: The output directory for the generated blog-n
or--name
: The name of the blog, will be used as the title of the blog-th
or--theme
: The name of the theme to be used for the blog (will find this in thethemes
directory)
- Create a new folder in
themes
directory. The name of the folder will be the name of the theme. - Inside the theme folder, create a
templates
folder and anassets
folder. - Create a
template.html
file in thetemplates
folder. (Seethemes/examples/template.html
for reference) - Put all your static files (css, js, images) in the
assets
folder.
- Generate from a Github repo (public & private)
- Generate from a Gitlab repo (public & private)
- Branch selection
- Generate from a source directory
- Add more themes