An open API service indexing awesome lists of open source software.

https://github.com/gethinode/mod-compatibility

A Hugo module to add backwards compability with Hugo <0.141.0 to your Hinode site
https://github.com/gethinode/mod-compatibility

Last synced: 20 days ago
JSON representation

A Hugo module to add backwards compability with Hugo <0.141.0 to your Hinode site

Awesome Lists containing this project

README

        

# Hinode Module - Compatibility


A Hugo module to add backwards compability with Hugo <0.141.0 to your Hinode site





















## About

![Logo](https://raw.githubusercontent.com/gethinode/hinode/main/static/img/logo.png)

> [!CAUTION]
> Use this module only when using Hinode [v0.28.2](https://github.com/gethinode/hinode/releases/tag/v0.28.2) or later in combination with Hugo <[v0.141.0](https://github.com/gohugoio/hugo/releases/tag/v0.141.0).

Hinode is a clean blog theme for [Hugo][hugo], an open-source static site generator. Hinode is available as a [template][repository_template], and a [main theme][repository]. Hugo [v0.141.0](https://github.com/gohugoio/hugo/releases/tag/v0.141.0) introduced a new [try](https://gohugo.io/functions/go-template/try/) mechanism to improve error handling. This is a breaking change with older Hugo versions.

This module includes several partials and render hooks to improve compatibility with Hinode sites that are still using an older Hugo version. Specifically, this module was introduced to ensure Hinode is compatible with CloudCannon's [Bookshop](https://github.com/CloudCannon/bookshop) component framework. The [embedded Hugo renderer](https://github.com/CloudCannon/bookshop/releases/tag/v3.11.0) still uses Hugo v0.136.1 under the hood.

## Contributing

This module uses [semantic-release][semantic-release] to automate the release of new versions. The package uses `husky` and `commitlint` to ensure commit messages adhere to the [Conventional Commits][conventionalcommits] specification. You can run `npx git-cz` from the terminal to help prepare the commit message.

## Configuration

Mount this module last in the site's module configuration to replace Hinode's partials and render hooks that are incompatible with Hugo <v0.141.0. The following module configuration is an example (define the configuration in e.g. `hugo.toml`).

```toml
[module]
[module.hugoVersion]
extended = true
min = "0.120.0"
max = "0.140.2"
[[module.imports]]
path = "github.com/gethinode/hinode"
[[module.imports]]
path = "github.com/gethinode/mod-compatibility"
```

[hugo]: https://gohugo.io
[hinode_docs]: https://gethinode.com
[repository]: https://github.com/gethinode/hinode.git
[repository_template]: https://github.com/gethinode/template.git
[conventionalcommits]: https://www.conventionalcommits.org
[husky]: https://typicode.github.io/husky/
[semantic-release]: https://semantic-release.gitbook.io/