Hugo

This blog is generated using Hugo and so far I like it. Hugo is a framework for building websites, a static site generator (SSG). The abundance of themes can be a little overwhelming.

About Hugo

Categories

Commands

Content Management

Contribute

Documentation

Functions

Getting Started

Hosting & Deployment

Modules

Pipes

Installation

Maintenance

My Showcase

Release Notes

Showcase

Templates

Tools

Troubleshooting

Variables

Further Reading

Showcase

Showcase

Hugo Functions

Go templates are lightweight but extensible. Go itself supplies built-in functions, including comparison operators and other basic tools. These are listed in the Go template documentation. Hugo has added additional functions to the basic template logic.

Functions

Hugo New Content

Can I bypass ‘hugo new content’?

I use VS Code as my IDE of choice. Often, when starting a new page (or post) for Hugo, I would like to copy a current page and modify the copy rather than starting from an empty new page. I can do that easily from within the IDE without having to access a command line to issue a command like hugo new folder/folder2/folder3/filename.md

Why can’t I just create a .md file using VS in any subfolder of the content folder?

[Read More]

Draft True

In my setup hugo new filename creates a file with front matter that says draft: true

When ready to publish I had been changing the true to false draft: false I discovered today that removing the ‘draft: true’ line entirely has the same effect with less typing required.

Highlight

 1author = "Ian Sweeney"
 2baseURL = 'https://spr12ian.github.io'
 3copyright = 'Ian Sweeney'
 4enableEmoji = true
 5enableInlineShortcodes = true
 6ignoreErrors = ["error-remote-getjson"]
 7languageCode = 'en-GB'
 8pluralizelisttitles = false
 9sectionPagesMenu = 'main'
10theme = "beautifulhugo"
11title = 'My UK Gadgets & Me'
12
13DefaultContentLanguage = "en"
14
15[taxonomies]
16category = "categories"
17tag = "tags"
18series = "series"
19
20[pagination]
21pagerSize = 10
22
23[privacy]
24
25[privacy.vimeo]
26disabled = false
27simple = true
28
29[privacy.twitter]
30disabled = false
31enableDNT = true
32simple = true
33
34[privacy.instagram]
35disabled = false
36simple = true
37
38[privacy.youtube]
39disabled = false
40privacyEnhanced = true
41
42[services]
43
44[services.instagram]
45disableInlineCSS = true
46
47[services.twitter]
48disableInlineCSS = true

hugo.toml

As at 2023-07-30 my hugo.toml file looks like:

author = "Ian Sweeney"
baseURL = 'https://spr12ian.github.io'
copyright = 'Ian Sweeney'
enableEmoji = true
enableInlineShortcodes = true
ignoreErrors = ["error-remote-getjson"]
languageCode = 'en-GB'
pluralizelisttitles = false
sectionPagesMenu = 'main'
theme = "beautifulhugo"
title = 'My UK Gadgets & Me'

DefaultContentLanguage = "en"

[taxonomies]
category = "categories"
tag = "tags"
series = "series"

[pagination]
pagerSize = 10

[privacy]

[privacy.vimeo]
disabled = false
simple = true

[privacy.twitter]
disabled = false
enableDNT = true
simple = true

[privacy.instagram]
disabled = false
simple = true

[privacy.youtube]
disabled = false
privacyEnhanced = true

[services]

[services.instagram]
disableInlineCSS = true

[services.twitter]
disableInlineCSS = true