This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
wiki:qclug_presentations:hugo [2016/08/10 02:33] Aaron Johnson created |
wiki:qclug_presentations:hugo [2016/08/10 04:16] (current) Aaron Johnson |
||
---|---|---|---|
Line 2: | Line 2: | ||
{{wiki/qclug_presentations/hugo-qclug-aug-10-2016.pdf}} | {{wiki/qclug_presentations/hugo-qclug-aug-10-2016.pdf}} | ||
+ | |||
{{wiki/qclug_presentations/hugo-qclug-aug-10-2016.odp}} | {{wiki/qclug_presentations/hugo-qclug-aug-10-2016.odp}} | ||
====== Hugo - Self Hosted ====== | ====== Hugo - Self Hosted ====== | ||
+ | ===== Installation ===== | ||
+ | * Download the Hugo binary or package, your choice: | ||
+ | * https://github.com/spf13/hugo/releases | ||
+ | * Debian Packages: https://packages.debian.org/sid/hugo | ||
+ | * Ubuntu Packages: http://packages.ubuntu.com/yakkety/hugo | ||
+ | * RPM Packages (built by Copr): https://copr.fedorainfracloud.org/coprs/spf13/Hugo/ | ||
+ | * Tarballs for various arch: https://github.com/spf13/hugo/releases | ||
+ | * Extract tarball or install package | ||
+ | |||
+ | ===== Create site ===== | ||
+ | <code> | ||
+ | mkdir newsite | ||
+ | cd newsite | ||
+ | hugo new site . | ||
+ | hugo new post/welcome.md | ||
+ | git clone https://github.com/fredrikloch/hugo-uno.git themes/hugo-uno | ||
+ | </code> | ||
+ | |||
+ | ===== Run site with Hugo ===== | ||
+ | <code> | ||
+ | hugo server -w --bind 0.0.0.0 --baseURL http://hostname.domain.local --port 1313 --theme hugo-uno | ||
+ | </code> | ||
+ | |||
+ | ====== Hugo - Hosted on GitHub Pages (Personal/Organization) ====== | ||
+ | |||
+ | * Complete the steps above to generate your Hugo page | ||
* Create a free account at github.com | * Create a free account at github.com | ||
- | * Create an open source repository (must be open source if you want to use GitHub pages for free) | + | * Create two Public repositories (must be Public repositories if you want to use GitHub pages for free) |
+ | * **username.github.io** (it will host the public folder: the static website) | ||
+ | * **yourproject-hugo** (it will host Hugo’s content) | ||
+ | |||
+ | <code> | ||
+ | cd newsite | ||
+ | git init . | ||
+ | git remote add origin https://github.com/username/yourproject-hugo.git | ||
+ | rm -rf public | ||
+ | git submodule add -b master https://github.com/username/username.github.io.git public | ||
+ | hugo --baseURL http://username.github.io --theme hugo-uno | ||
+ | cd public | ||
+ | git add . | ||
+ | git commit -a -m "rebuilding site `date`" | ||
+ | git push origin master | ||
+ | cd .. | ||
+ | git add . | ||
+ | git commit -a -m "project repo for hugo site `date`" | ||
+ | git push origin master | ||
+ | </code> | ||
+ | |||
+ | ====== Credits ====== | ||
+ | Steps in this guide were taken from the following documentation/tutorials: | ||
+ | |||
+ | https://gohugo.io/tutorials/github-pages-blog | ||
+ | |||
+ | https://www.youtube.com/watch?v=w7Ft2ymGmfc | ||
- | ====== Hugo - Hosted on GitHub Pages ====== |