Update Server:
apt update && apt upgrade -y
Install Hugo:
wget https://github.com/gohugoio/hugo/rele...
dpkg -i hugo_0.79.0_Linux-64bit.deb
hugo version
Create a Website:
hugo new site example.com
cd example.com
hugo new main.md
nano content/main.md
Add the following lines at the end of file:
Test Page
This is my first test page.
Download and Install a Theme:
cd themes
wget https://github.com/digitalcraftsman/h...
apt install unzip -y
unzip master.zip
mv hugo-strata-theme-master hugo-strata-theme
##### I'm replacing angled bracket with square bracket ########
cat hugo-strata-theme/exampleSite/config.toml ] ../config.toml
nano ../config.toml
Change the base URL and define your page name as shown below:
baseurl = "/"
[[menu.main]]
name = "main"
url = "main"
weight = 5
nano /root/example.com/layouts/index.html
Add the following lines:
{{ define "main" }}
{{ if not .Site.Params.about.hide }}
{{ partial "about" . }}
{{ end }}
{{ if not .Site.Params.portfolio.hide }}
{{ partial "portfolio" . }}
{{ end }}
{{ if not .Site.Params.recentposts.hide }}
{{ partial "recent-posts" . }}
{{ end }}
{{ if not .Site.Params.contact.hide }}
{{ partial "contact" . }}
{{ end }}
{{ end }}
Build Your Website:
cd /root/example.com
hugo
hugo server --bind=0.0.0.0 --baseUrl=http://server_ip -D -F
Watch video How to install Hugo in ubuntu online without registration, duration hours minute second in high quality. This video was added by user Quickloss3 29 January 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 640 once and liked it 14 people.