Hugo-Internals

This module attempts to replace internal templates used by Hugo with custom ones and other modules and plugins that add identical features more sophisticated or up-to-date. Internal templates of Hugo are highly opiniated, often out of time and not suitable for use in the production environment of a website. The layouts in this repo and it’s modules replace them with our own better setup.

Add this module
[[module.imports]]
path = "github.com/davidsneighbour/hugo-internals"
disable = false
ignoreConfig = false
ignoreImports = false
Latest Version v1.0.4 (2022-08-03)
Fix to this version
hugo mod get github.com/davidsneighbour/[email protected]

Setup

Installing

First enable modules in your own repository if you didn’t do that already:

1hugo mod init github.com/username/reponame

Then add this module to your required modules in config.toml.

1[module]
2[[module.imports]]
3path = "github.com/davidsneighbour/hugo-internals"
4disable = false
5ignoreConfig = false
6ignoreImports = false

The next time you run hugo it will download the latest version of this module and its dependencies.

Updating

1# update this module only
2hugo mod get -u github.com/davidsneighbour/hugo-internals
3# update all modules
4hugo mod get -u ./...

Replacements

hugo-robots — Creating a robots.txt

This component uses hugo-robots to create a robots.txt without much configuration. The only step to take is that robots.txt generation needs to be enabled in your configuration, eg. config.toml:

1enableRobotsTXT = true

Read more about detailled setup options at the documentation.

hugo-sitemap — Add a configurable sitemap

hugo-youtube — Add youtube videos via shortcode

Contribute

If you are developing or maintaining a Hugo component or module that replaces one of the internal features of Hugo then feel free to add an issue or a pull request adding your work.