New Site

hugo new site "${DIRNAME}"
cd "${DIRNAME}"
sed -re 's!^(baseURL *= *)".*"$!\1"/"!' -i config.toml

Install a Theme

For example, use terminal.

Note

Some themes require additional configuration in config.toml

Note

Some themes require additional configuration in page front matter

Terminal

Note

Use type: posts in content

git clone https://github.com/panr/hugo-theme-terminal.git ./themes/terminal
sed -re '/^title/{s/$/\ntheme = "terminal"/}' -i config.toml

cat <<"EOF" >>./config.toml
[params]
fullWidthTheme = false
centerTheme = true
themeColor = "green"
EOF

Base16

Note

Put posts in ./content/post/${NAME}.md

git clone https://github.com/htdvisser/hugo-base16-theme.git ./themese/base16
sed -re '/^title/{s/$/\ntheme = "base16"/}' -i config.toml