Install Hugo with LoveIt theme
Hugo with LoveIt theme installation
Hugo
Install
download the tar ball from https://github.com/gohugoio/hugo/releases
|
|
Extract to ~/bin
|
|
Check the version
|
|
Site
-
Create a new site named it as chaos in my case.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
$ cd ~/Hugo/Sites $ hugo new site chaos Congratulations! Your new Hugo site is created in /home/dyiwu/Hugo/Sites/chaos. Just a few more steps and you're ready to go: 1. Download a theme into the same-named folder. Choose a theme from https://themes.gohugo.io/, or create your own with the "hugo new theme <THEMENAME>" command. 2. Perhaps you want to add some content. You can add single files with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>". 3. Start the built-in live server via "hugo server". Visit https://gohugo.io/ for quickstart guide and full documentation.
Theme
Install
```
$ cd ~/Hugo/Sites/chaos
$ git clone https://github.com/dillonzq/LoveIt.git themes/LoveIt
$ cp themes/LoveIt/exampleSite/config.toml .
```
Update theme
```
$ cd ~/Hugo/Sites/chaos/themes/LoveIt
$ git pull
```
Deploy to github
-
Create two repostories on github, named it as chaos and dyiwu.github.io
-
Generate the web site which will be saved under ~/Hugo/Sites/chaos/public directory.
1 2
$ cd ~/Hugo/Sites/chaos $ hugo
-
link the generated web site (/public) folder to github
1 2 3 4 5 6
$ cd ~/Hugo/Sites/chaos/public $ git init $ git remote add origin https://github.com/dyiwu/dyiwu.github.io.git $ git add . $ git commit -m "Initial commit" $ git push -u origin master
-
Link the whole chaos site to github
1 2 3 4 5 6
$ cd ~/Hugo/Sites/chaos $ git init $ git remote add origin https://github.com/dyiwu/chaos.git $ git add . $ git commit -m "Initial commit" $ git push -u origin master
-
Web site will hosted on Github as https://dyiwu.github.io/
Maintance scripts
deploy_chaos.sh
Script to deploy chaos.git repo from local to github
|
|
deploy_public.sh
Script to deploy dyiwu.github.io.git from local to github
|
|
clone_chaos.sh
Script to clone chaos.git repo from github to local
|
|
clone_public.sh
Script to clone dyiwu.github.io.git repo from github to local
|
|
clone_theme.sh
Script to clone themes/LoveIt repo from github to local
|
|
update_theme.sh
Script to update themes/even
|
|
Customization and Tips
Summary Splitting
Add the <!--more-->
summary divider where you want to split the article.
Permlinks
Setup Permlinks in config.toml
|
|
Goldmark
- Configure Markup
Goldmark is from Hugo 0.60 the default library used for Markdown. By default, Goldmark does not render raw HTMLs and potentially dangerous links. If you have lots of inline HTML and/or JavaScript, you may need to turn this on by adding these into config.toml
|
|
firewall
Open firewall 1313/tcp port
|
|
Logo
The logo file logo.png must be put in the assets/images directory.
Use logo = “/images/logo.png” in the config file.
Tips
From the comments of https://hugoloveit.com/theme-documentation-basics/#22-install-the-theme
|
|