how to build your own blog using hugo.
install hugo following offical install guide.
download packages from Hugo Release and put executale file
hugo new site sitename, To create a new site. directory structure will like this:
. ├── archetypes ├── assets ├── config.toml ├── content ├── data ├── layouts ├── static └── themes
download theme from github. unzip the archive and copy files to you site dir, overwriting directory and files of the same name. you can change your website config by changing
wirte you first blog.
hugo new content/first.md, will gen a markdown file in
content. you can use
hugo server -wto start a server locally, and visit localhost:1313 for preview.
hugo, this will gen
mdfiles in dir
htmlfiles in dir
publicdirectory in a nginx.
directorys in directory
content will display as menu in the left. and file named
_index.md is the default page of the directory.
you can visit my github repo hugo-blog, the article itself is generated by this repo.
you can change your styles by changing different themes. themes could be found at http://themes.gohugo.io.
overall, you can easily create your own doc/blog by follow command:
# create a new site hugo new site mysite cd mysite/ # create your first page hugo new first.md # build page hugo
then you can find your site in directory