 
$\int_0^\infty f(x) dx$
$$ \int_0^\infty f(x) dx $$
This article describes how to install, upgrade the theme, and write new articles.
Installation
Create a New Site from Scratch
1$ hugo new site myblog
2$ cd myblog
3$ git init
4$ git submodule add https://github.com/razonyang/hugo-theme-bootstrap themes/hugo-theme-bootstrap
5$ cp -a themes/hugo-theme-bootstrap/exampleSite/* .
6$ hugo server
If you’re using Windows, use
xcopy .\themes\hugo-theme-bootstrap\exampleSite /Einstead.
Install on an existing site
 1$ cd myblog
 2$ git submodule add https://github.com/razonyang/hugo-theme-bootstrap themes/hugo-theme-bootstrap
 3$ mkdir config
 4$ cp -a themes/hugo-theme-bootstrap/exampleSite/config/* ./config
 5$ cp -r themes/hugo-theme-bootstrap/exampleSite/content/about/ \
 6  themes/hugo-theme-bootstrap/exampleSite/content/archives/ \
 7  themes/hugo-theme-bootstrap/exampleSite/content/categories/ \
 8  themes/hugo-theme-bootstrap/exampleSite/content/contact/ \
 9  themes/hugo-theme-bootstrap/exampleSite/content/offline/ \
10  themes/hugo-theme-bootstrap/exampleSite/content/search/ \
11  themes/hugo-theme-bootstrap/exampleSite/content/series/ \
12  themes/hugo-theme-bootstrap/exampleSite/content/tags/ \
13  ./content
14$ hugo server
If you’re making a fresh clone, you will be need to update your submodule via
git submodule update --init --recursiveor clone with submodulegit clone --recursive <repo>.
Upgrade
1$ cd themes/hugo-theme-bootstrap
2$ git fetch
3$ git checkout [version]
4$ cd ../../
5$ git add themes/hugo-theme-bootstrap
6$ git commit -m 'Upgrade the theme'
- Replace the [version]with the latest version. The version can be listed bygit tag -l | sort -rV.
- You can also checkout the masterbranch for getting the latest commit.
Write Articles
Suppose the default language is
en.
1$ hugo new posts/new-post/index.md
The command above create a new post written in English. Similarly, we can create a post written in Simplified Chinese:
1$ hugo new posts/new-post/index.zh-cn.md
Please remind that, the created posts are generally in draft state. You’ll need to specify the
-Dparameter of the commandhugo serverfor previewing. Similarly, you need to change thedrafttofalseor removedraftparameter if you want to publish the article.
You can place your posts anywhere, such as
blog, what you need to do is just append theblogto themainSectionsparameter:mainSections = ["posts", "blog"].
Comments