how to build your own blog using hugo.
documentations Link to heading
https://gohugo.io/getting-started/usage/ https://learn.netlify.com/en/
setup Link to heading
-
install hugo following offical install guide.
download packages from Hugo Release and put executale filehugoinPATH. -
execute
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
config.toml. -
wirte you first blog.
hugo new content/first.md, will gen a markdown file incontent. you can usehugo server -wto start a server locally, and visit localhost:1313 for preview. -
execute
hugo, this will genmdfiles in dircontenttohtmlfiles in dirpublic. -
put your
publicdirectory in a nginx.
menu Link to heading
directorys in directory content will display as menu in the left. and file named _index.md is the default page of the directory.
example Link to heading
you can visit my github repo hugo-blog, the article itself is generated by this repo.
change theme Link to heading
you can change your styles by changing different themes. themes could be found at http://themes.gohugo.io.
overall Link to heading
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 public.