Setting up Hugo & Congo
I mainly follow the steps in the Congo theme installation document to setup and configure the site. I also refer to Hugo Getting started document.
Here are the main steps I have taken to set up this site. You will need git
and hugo
ready.
I installed Hugo with homebrew
.
- Initialize a local repository to work on
# Create a base hugo directory structure hugo new site my-site # Initialize it as a git repository cd my-site git init
- Install Congo theme as git submodule
# Install theme data to themes/congo git submodule add -b stable https://github.com/jpanther/congo.git themes/congo
- Copy the default configuration files from
themes/congo/config/_default
intoconfig/_default
for customization.mkdir config cp -r themes/congo/config/_default config
- Add a new line:
theme="congo"
to theconfig/_default/hugo.toml
file to use Congo theme - Start local server and visit http://localhost:1313/If you see something like this, you are good to go.
hugo server
Initial view of a Hugo-Congo site
Some Tips #
- Site configurations are in
config/_default/
folder:hugo.toml
: basic settinglanguage.en.toml
: site title and author informationmenu.en.toml
: navigation bar itemsparams.toml
: customize site appearance such as color scheme, article informationtaxonomies.toml
: enable tags for example by adding a linetags = 'tags'
to this file
- Write your posts and pages in the
content/
folder- Hugo is a static site generator and the
content
directory is like the root of your site. - A post can be a single markdown file or a bundle where you put a index.md and associated assets images together under a directory.
- Read more about Page bundle here.
- Hugo is a static site generator and the
- Site favicon goes to the
static/
folder- See the document
- Hugo builds generate your web site into the
public
folder- You should not use this folder.