Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

A collection of Github Actions/Workflows to optimise your work with GoHugo.

License

Notifications You must be signed in to change notification settings

davidsneighbour/hugo-workflows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNB-Hugo/TEMPLATES DNB-Hugo/TEMPLATES

David's Neighbour GoHugo Component / Workflows

A collection of Github Actions/Workflows to optimise your work with GoHugo.

This is not a copy/paste repository but a collection of workflows I am using on my own projects. You can copy and paste, then read through the scripts and setups and adapt to your own requirements. I try to explain the procedures as verbose as possible. Feel free to open an issue if you require more information or a specific workflow that I did not include yet.

❗work in progress. open a PR or an issue with questions.

Setup Workflows

  • Feature: This workflow checks for the latest published Hugo version and opens a PR to update your netlify.toml with the latest Hugo version.
  • COPY/PASTEable: No, change to your required setup
  • Requirements: bin/update-hugo-on-netlify.sh and workflow configuration
  • Schedule: daily at midnight (default), try weekly or monthly
  • Reasoning: Hugo every now and then receives updates with new features and bug fixes. Netlify offers Hugo, but without configuration of the Hugo version to use it will fall back to a very old version (one that does not offer pipes or any of the newer features added in the past two three years).

The workflows configuration sets the cron variable of the schedule to daily runs at midnight of your repositories timezone. Use crontab.guru to create a setup that fits your needs. I would suggest a weekly (@weekly) or monthly (@monthly) run.

Have a look into the bin/update-hugo-on-netlify.sh and update the template according to your netlify.toml setup. The important thing is to keep the line HUGO_VERSION = "${1/v/""}" in all sections where you require to set the Hugo version.

Read more about how to use Hugo on Netlify.


Code Quality Workflows

https://imgs.xkcd.com/comics/code_quality.png

To be written.

Other GoHugo components by @davidsneighbour

Component Description
hugo-auditor
hugo-debug 🧙‍♂️
hugo-errors
hugo-feeds Implements various configurable feed formats.
hugo-functions
hugo-giscus The Giscus comment system layout for GoHugo.
hugo-head A GoHugo theme component that solves the old question of "What tags belong into the <head> tag of my website?"
hugo-hooks GoHugo's missing hook system for template extensions.
hugo-humans Your site is made by humans. Humans.txt is naming them.
hugo-internals Better internal templates for GoHugo
hugo-netlification a collection of tools that optimize your site on Netlify
hugo-opensearch configuration for Open Search
hugo-pictures
hugo-pwa Automatically turns your site into a PWA
hugo-renderhooks render hooks for Markdown markup
hugo-robots configure the content of your robots.txt with front matter
hugo-schema
hugo-search-algolia
hugo-security
hugo-sitemap
hugo-social
hugo-workflows A collection of Github Actions/Workflows to optimise your work with GoHugo.
hugo-youtube A shortcode and partial for lite youtube embeds.

About

A collection of Github Actions/Workflows to optimise your work with GoHugo.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages