Welcome to Shonku’s documentation!¶
Contents:
Installation¶
Install golang¶
Download golang from here , extract go directory under your home directory.
$ mkdir ~/gocode
Now write the following lines in your ~/.bashrc file.
export PATH=$PATH:~/go/bin
export GOPATH=~/gocode/
export GOROOT=~/go/
and then
$ source ~/.bashrc
Install the dependencies¶
After golang installation, get the dependent libraries.
$ go get github.com/russross/blackfriday
$ go get github.com/gorilla/feeds
Rebuilding bindata for default theme¶
In case you make any changes to the default theme, you want those changes inside the binary file also. For that issue the following command before building the binary.
$ go-bindata assets/... templates/
Note
Remember to install go-bindata from here.
Usage¶
Creating new site¶
First go to an empty directory and run the following command.
$ ./shonku.bin -new_site
This will create the required files and directories for shonku to run.
Writing a new post¶
To write a new blog post do the following command.
$ ./shonku.bin -new
Enter the title of the post: Hello World
Your new post is ready at ./posts/hello-world.md
As the output shows your first blog post is ready. Make the changes as you want in that file.
Note
Remember to keep a blank line at the end of each post or page.
Building your post¶
Just run the following command.
$ ./shonku.bin
{SITE AUTHOR SITE TITLE http://localhost/ Copyright 2014 yourdisqus author@email Description of the site URL for logo [{/pages/about-me.html About} {/categories/ Categories} {/archive.html Archive}]}
Building post: ./posts/hello-world.md
You can check the output directory for the finished blog post.
Force rebuild of the whole site¶
$ ./shonku.bin -force
The above command will rebuild the whole site. You may want to use this command when you make any change to your theme or configuration file.
Configuration¶
Shonku works based on a JSON configuration file based on the primary directory. It is conf.json. Various values of the file is explained below.
- “Author” - is the site author’s name.
- “Title” - is the title of the blog.
- “URL” - is the url of the blog. Remember to give the trailing slash in the url.
- “Description” - long description of the site.
- “Logo” - Url of the logo for the blog.
- “Content_footer” - footer text
- “Email” - Author’s email.
- “Disqus” - your disqus name for dynamic comments.
- “Links” - For the links in the header of each page.