My Hugo Timeline, A New Hugo Module
What follows is an excerpt from this blog’s README.md
file.
I’ve successfully added the code to drive a new /timeline
page as part of this blog, but I did so “locally”, and now I’d like to repeat the process but using the aforementioned SummittDweller/hugo-timeline module.
I used guidance found in Hugo Modules: Getting Started to make this happen, like so:
╭─mark@Marks-Mac-Mini ~/GitHub/blogs-SummittDweller ‹main›
╰─$ brew install go
╭─mark@Marks-Mac-Mini ~/GitHub/blogs-SummittDweller ‹main›
╰─$ brew upgrade # This is not "required", but probably overdue.
╭─mark@Marks-Mac-Mini ~/GitHub/blogs-SummittDweller ‹main*›
╰─$ mkdir content/timeline/.out-of-the-way # vvv Moving existing local stuff out of the way vvv
╭─mark@Marks-Mac-Mini ~/GitHub/blogs-SummittDweller ‹main*›
╰─$ mv -f layouts/partials/hugo-timeline* content/timeline/.out-of-the-way/.
╭─mark@Marks-Mac-Mini ~/GitHub/blogs-SummittDweller ‹main*›
╰─$ mv -f layouts/shortcodes/hugo-timeline* content/timeline/.out-of-the-way/.
╭─mark@Marks-Mac-Mini ~/GitHub/blogs-SummittDweller ‹main*›
╰─$ mv -f static/css/hugo-timeline* content/timeline/.out-of-the-way/.
╭─mark@Marks-Mac-Mini ~/GitHub/blogs-SummittDweller ‹main*›
╰─$ hugo mod init github.com/SummittDweller/blogs-SummittDweller
go: creating new go.mod: module github.com/SummittDweller/blogs-SummittDweller
go: to add module requirements and sums:
go mod tidy
Next, to pull in SummittDweller/hugo-timeline as a module I turned to the config.yml
file and guidance found in Hugo Modules: everything you need to know!. Additions to config.yml
are: