Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
hinode_csp = "https://github.com/gethinode/mod-csp"
hinode_demo = "https://demo.gethinode.com/"
hinode_fr = "https://demo.gethinode.com/fr/"
hinode_mod_cookieyes = "https://github.com/gethinode/mod-cookieyes"
hinode_release_v0_22_0 = "https://github.com/gethinode/hinode/releases/tag/v0.22.0-beta7"
hinode_customization_demo = "https://customization-demo.gethinode.com/"
hinode_version_demo = "https://version-demo.gethinode.com/"
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/latest/about/integrations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Integrations
description: Hinode integrates with several libraries and third-party providers.
date: 2024-09-26
date: 2024-10-21
layout: docs
draft: true
---
Expand All @@ -10,4 +10,4 @@ draft: true

## Disclaimer

The names and visual logos referenced on this page may include trademarks and otherwise legally protected work. Hinode is not endorsed by or affiliated with any of the organizations or natural persons mentioned. We have been careful to respect the trademark policies and other applicable policies of the individual owners. If you believe this page contains errors or incorrect references, please {{< link issue_tracker >}}add an issue to our issue tracker{{< /link >}}.
The names and visual logos referenced on this page may include trademarks and otherwise legally protected work. Hinode is not endorsed by or affiliated with any of the organizations or natural persons mentioned. We have been careful to respect the trademark policies and other applicable policies of the original owners. If you believe this page contains errors or incorrect references, please {{< link issue_tracker >}}add an issue to our issue tracker{{< /link >}}.
6 changes: 3 additions & 3 deletions content/en/docs/latest/advanced-settings/scripts.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: Scripts
description: Bundle local and external JavaScript files by intent and rendering impact.
date: 2023-09-24
date: 2023-10-21
layout: docs
---

> [!IMPORTANT]
> Hinode release {{< release version="v0.27.0-beta" short="true" type="link" >}} has overhauled the build pipeline of scripts and modules. The bundled files now support categorization by intent.
> Hinode release {{< release version="v0.27.0" short="true" type="link" >}} has overhauled the build pipeline of scripts and modules. The bundled files now support categorization by intent.

Hinodes bundles JavaScript files to optimize the page loading speed. By utilizing [Hugo modules]({{% ref "overview" %}}), referenced JavaScript files are automatically ingested and version controlled. Since release {{< release version="v0.27.0-beta" short="true" type="link" >}}, Hinode also supports the grouping of scripts by their intent. Review the next sections to familiarize yourself with the build system.
Hinodes bundles JavaScript files to optimize the page loading speed. By utilizing [Hugo modules]({{% ref "overview" %}}), referenced JavaScript files are automatically ingested and version controlled. Since release {{< release version="v0.27.0" short="true" type="link" >}}, Hinode also supports the grouping of scripts by their intent. Review the next sections to familiarize yourself with the build system.

## Types of integrations

Expand Down
6 changes: 3 additions & 3 deletions content/en/docs/latest/advanced-settings/server-headers.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: Server headers
description: Configure the server headers to refine the content security policy.
date: 2024-10-12
date: 2024-10-21
layout: docs
aliases:
- "/docs/server/"
---

{{< release version="v0.27.0-beta3" >}}
{{< release version="v0.27.0" >}}

Hinode uses strict security policies to ensure the site is {{< link observatory >}}secure by default{{< /link >}}. If you want to include external resources, such as images and videos, you will need to explicitly add these sources to the server headers. If omitted, the browser will refuse to load these resources, resulting in broken links or missing elements. Review the next sections to learn how to configure your policies correctly.

Expand All @@ -16,7 +16,7 @@ Hinode uses strict security policies to ensure the site is {{< link observatory
> [!TIP]
> The {{< link hugo_server >}}server header configuration used by Hugo{{< /link >}} is similar to the configuration supported by Netlify. We can therefore reuse the same template code to configure both environments. This simplifies development and testing, and ensures the local development environment and production environment are comparable.

Since {{< release version="v0.27.0-beta3" short="true" type="link" >}}, Hinode includes {{< link "hinode_csp" >}} a module to generate the server headers automatically{{< /link >}}. It uses a feature from Hugo that enables the definition of a {{< link "hugo_custom_output" >}}custom output format{{< /link >}}. The main Hinode repository defines two custom output formats. The first one generates the server headers for a local web server provided by Hugo. The second output format defines a similar configuration for the deployment to Netlify.
Since {{< release version="v0.27.0" short="true" type="link" >}}, Hinode includes {{< link "hinode_csp" >}} a module to generate the server headers automatically{{< /link >}}. It uses a feature from Hugo that enables the definition of a {{< link "hugo_custom_output" >}}custom output format{{< /link >}}. The main Hinode repository defines two custom output formats. The first one generates the server headers for a local web server provided by Hugo. The second output format defines a similar configuration for the deployment to Netlify.

Add the following configuration to your main configuration (usually `hugo.toml`). The setting `root = true` ensures the output files are placed in the root of the build folder. Otherwise, Hugo would create a separate output for each one of the defined site languages.

Expand Down
18 changes: 6 additions & 12 deletions content/en/docs/latest/configuration/cookie-consent.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
---
title: Cookie consent (beta release)
title: Cookie consent
description: Configure cookie consent to comply with regulatory requirements.
date: 2024-09-24
date: 2024-10-21
layout: docs
---

> [!CAUTION]
> The support for cookie consent is still in beta-stage of development by the Hinode team. As a result, the implementation is subject to change.

{{< release version="v0.27.0-beta" >}}
{{< release version="v0.27.0" >}}

> [!IMPORTANT]
> The materials on this website are purely informative and represent a personal view; they do not constitute legal or other professional advice. Consult your professional adviser for legal or other advice.

Regulations such as GDPR (in the EU and UK) and CCPA/CPRA (California) require consent from users about the use of cookies. Without prior consent, the website should refrain from storing or accessing any cookies, unless they are absolutely essential. Site owners should also be able to share proof of the consents (consent logging) on request of the authorities. Lastly, certain countries put restrictions on where to geographically store the consent logs.

Since release {{< release version="v0.27.0-beta" short="true" type="link" >}} Hinode provides support to simplify the integration with cookie consent managers. Cookie consent management itself is not offered by Hinode, but should be relatively easy to implement by integrating with a third-party solution using the pointers in this section. Review the next paragraphs to familiarize yourself with the available options and configurations.
Since release {{< release version="v0.27.0" short="true" type="link" >}} Hinode provides support to simplify the integration with cookie consent managers. Cookie consent management itself is not offered by Hinode, but should be relatively easy to implement by integrating with a third-party solution using the pointers in this section. Review the next paragraphs to familiarize yourself with the available options and configurations.

## Categorizing scripts

Expand Down Expand Up @@ -84,14 +81,11 @@ You can modify this template to your needs. For example, {{< link "cookieyes_scr

## Using API calls

> [!NOTE]
> Hinode categorizes the cookie API as `functional` by default, as Hinode only uses these functions to store and retrieve user preferences. By design, the `hasConsent()` function always returns true. If the user has declined functional cookies, the entire function is not exposed.

Hinode uses several scripts to access and store the user's preferences, including the selected theme and language. Instead of assigning an entire script or script bundle to a category, you can also use predefined APIs. These APIs will give you fine-grained control on when to invoke a cookie consent check. Use the `get*` and `set*` functions to interact with the local storage and session storage respectively. The `hasConsent()` function is a placeholder that should be hooked to your cookie consent manager of choice.

The available functions are defined in `/assets/js/critical/functional/_cookie.js`:
The available functions are defined in `/assets/js/critical/_cookie.js`:

{{< file path="./_vendor/github.com/gethinode/hinode/assets/js/critical/functional/_cookie.js" full="false" >}}
{{< file path="./_vendor/github.com/gethinode/hinode/assets/js/critical/_cookie.js" full="false" >}}

Pending your cookie consent configuration, the API functions may not be available at all times. The following code illustrates how to test for the availability of the `getLocalStorage()` function:

Expand Down
12 changes: 6 additions & 6 deletions content/en/docs/latest/configuration/modules.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Modules
description: Customize and extend Hinode with Hugo modules.
date: 2024-09-24
date: 2024-10-21
layout: docs
---

Expand Down Expand Up @@ -50,9 +50,9 @@ The following table provides an overview of the available settings for each modu
| excludeSCSS | false | Excludes the module from the stylesheet processing pipeline. Use this setting to get more control of when and where to include the module's stylesheet. For example, the Bootstrap stylesheet is imported by the main stylesheet after initializing the theme variables, but before the custom component styles. |
| disableTemplate | false | Excludes all scripts files from processing as Hugo template. The scripts are bundled as-is instead. This only applies to optional modules. |
| localize | false | {{< release version="v0.25.0" short="true" size="sm" inline="true" >}} Triggers the creation of a language-specific bundle file. The language code is appended as suffix to the base name. For example, the English version of `js/main.bundle.js` becomes `js/main.bundle.en.js`. |
| category | other | {{< release version="v0.27.0-beta" short="true" size="sm" inline="true" >}} Assigns the module's scripts to a category used for cookie consent. Available values are `necessary`, `functional`, `analytics`, `performance`, `advertisement`, and `other`. See {{< link "cookie-consent" />}} for more details. |
| local | false | {{< release version="v0.27.0-beta" short="true" size="sm" inline="true" >}} Includes an external URL in local mode too. By default, external scripts are only included in the built site. |
| url | | {{< release version="0.27.0-beta" short="true" size="sm" inline="true" >}} Optional url for an external link. If set, the link is included in the page header or page body, pending `integration` type. See the {{< link "/docs/advanced-settings/scripts" >}}scripts documentation{{< /link >}} for more information. |
| category | other | {{< release version="v0.27.0" short="true" size="sm" inline="true" >}} Assigns the module's scripts to a category used for cookie consent. Available values are `necessary`, `functional`, `analytics`, `performance`, `advertisement`, and `other`. See {{< link "cookie-consent" />}} for more details. |
| local | false | {{< release version="v0.27.0" short="true" size="sm" inline="true" >}} Includes an external URL in local mode too. By default, external scripts are only included in the built site. |
| url | | {{< release version="0.27.0" short="true" size="sm" inline="true" >}} Optional url for an external link. If set, the link is included in the page header or page body, pending `integration` type. See the {{< link "/docs/advanced-settings/scripts" >}}scripts documentation{{< /link >}} for more information. |
<!-- markdownlint-disable MD037 -->

For example, Bootstrap uses the following configuration in its module configuration:
Expand All @@ -69,7 +69,7 @@ Several modules support additional, module-specific configurations. Review them

### CookieYes

{{< release version="v0.27.0-beta" >}}
{{< release version="v0.27.0" >}}

The `cookieyes` module requires the following settings:

Expand All @@ -95,7 +95,7 @@ The `fontawesome` module supports the following additional settings:

### Google Analytics

{{< release version="v0.27.0-beta" >}}
{{< release version="v0.27.0" >}}

> [!NOTE]
> By convention, Hinode uses kebab case as naming convention for module names. However, the module name in the site parameters is renamed to `GoogleAnalytics` to align with Hugo's privacy settings.
Expand Down
12 changes: 12 additions & 0 deletions data/releases.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# This file holds all entries for the release timeline

- title: Cookies
icon: fas cookie-bite
color: primary
date: 2024-10-21
badge: v0.27.0
url: v0.27.0
content: >-
This release simplifies the {{< link "docs/configuration/cookie-consent/" >}}integration with cookie consent managers
{{< /link >}}. A reference implementation for {{< link hinode_mod_cookieyes >}}CookieYes{{< /link >}} is available
as a separate module. This release also improves the management of content security policies. You can now define the
required policies in each individual module, and Hinode will {{< link "docs/advanced-settings/server-headers/" >}}
generate the required server headers{{< /link >}}.

- title: Render hooks
icon: fa file-lines
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ go 1.20

require (
github.com/airbnb/lottie-web v5.12.2+incompatible // indirect
github.com/gethinode/hinode v0.27.0-beta5 // indirect
github.com/gethinode/hinode v0.27.0 // indirect
github.com/gethinode/mod-bootstrap v1.3.1 // indirect
github.com/gethinode/mod-cookieyes/v2 v2.2.1 // indirect
github.com/gethinode/mod-csp v1.0.2 // indirect
github.com/gethinode/mod-cookieyes/v2 v2.2.2 // indirect
github.com/gethinode/mod-csp v1.0.3 // indirect
github.com/gethinode/mod-flexsearch/v2 v2.0.1 // indirect
github.com/gethinode/mod-fontawesome v1.10.0 // indirect
github.com/gethinode/mod-google-analytics v1.1.2 // indirect
github.com/gethinode/mod-google-analytics v1.1.3 // indirect
github.com/gethinode/mod-katex v1.1.2 // indirect
github.com/gethinode/mod-leaflet v1.2.0 // indirect
github.com/gethinode/mod-lottie v1.5.11 // indirect
github.com/gethinode/mod-simple-datatables v1.0.13 // indirect
github.com/gethinode/mod-simple-datatables v1.0.14 // indirect
github.com/gethinode/mod-utils/v2 v2.8.2 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 // indirect
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
Expand Down
10 changes: 10 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ github.com/gethinode/hinode v0.27.0-beta3 h1:3MBVjah9da5pmstqedWs7D91DjfJcAXTcLI
github.com/gethinode/hinode v0.27.0-beta3/go.mod h1:d9kWKiY4wYQYH9skMYRoRDzgVB8UzRAiabMzt5cvOFE=
github.com/gethinode/hinode v0.27.0-beta5 h1:dAq2Y+qc7zaoQG7dHPam9QXwuPBCMkBvPdZhdnHG054=
github.com/gethinode/hinode v0.27.0-beta5/go.mod h1:eu6ZqrJ8CVxwQR+EMWMqUsWiTXIFOvBeMhIFwjHGqeE=
github.com/gethinode/hinode v0.27.0 h1:swZxhrSl1EFrs5THenuw6/RDfXI4gU2P1tghJQaywyc=
github.com/gethinode/hinode v0.27.0/go.mod h1:uiMTMa+EUMB36nUAGWBU8B27imztTuCH2pWLMqGc7hM=
github.com/gethinode/mod-bootstrap v1.1.0 h1:BbalsW8kmFhv+J+dcc41TGcjIlM/p69AB0h0oGhAXIU=
github.com/gethinode/mod-bootstrap v1.1.0/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8=
github.com/gethinode/mod-bootstrap v1.1.1 h1:Tx4M5hGVOFrEaxnUONDAm6N9xuRi5UphKlT7F26HujU=
Expand Down Expand Up @@ -312,8 +314,12 @@ github.com/gethinode/mod-cookieyes/v2 v2.1.2 h1:hzGCbRbpNAVkLr+jFWpAQaXHG0lgK+Kg
github.com/gethinode/mod-cookieyes/v2 v2.1.2/go.mod h1:tULb7D7CoTycGUyL7ryqHJKaX11XuL2SN+XwP7/DI0Y=
github.com/gethinode/mod-cookieyes/v2 v2.2.1 h1:IIHsUu2g/W9rrloW1kBajijNwgQnic2kAGV6705LW0s=
github.com/gethinode/mod-cookieyes/v2 v2.2.1/go.mod h1:tULb7D7CoTycGUyL7ryqHJKaX11XuL2SN+XwP7/DI0Y=
github.com/gethinode/mod-cookieyes/v2 v2.2.2 h1:VNIdbZnzXw/0Jito/IcDNqQ9yRYLCGrDwyrMqtSJgE4=
github.com/gethinode/mod-cookieyes/v2 v2.2.2/go.mod h1:tULb7D7CoTycGUyL7ryqHJKaX11XuL2SN+XwP7/DI0Y=
github.com/gethinode/mod-csp v1.0.2 h1:KX8EeoCGbHhGSo5r0YIa9BmPZ6S6v7L9CChTejREkK4=
github.com/gethinode/mod-csp v1.0.2/go.mod h1:Nb22QMicoUHgZQUKP5TCgVrSI8K3KU7jLuLBShmotjg=
github.com/gethinode/mod-csp v1.0.3 h1:tRmnuVZ3UpCc9HR8qsAwbU0OJ/UsNVSbse0SZuwGcCg=
github.com/gethinode/mod-csp v1.0.3/go.mod h1:Nb22QMicoUHgZQUKP5TCgVrSI8K3KU7jLuLBShmotjg=
github.com/gethinode/mod-flexsearch v1.1.0 h1:7BCMyQDlYlskNXuazt8Jg/jg9WREexu2xVkYqThkAX4=
github.com/gethinode/mod-flexsearch v1.1.0/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
github.com/gethinode/mod-flexsearch v1.1.1 h1:zHypfKR/rWPAwqNXvo09Pp3vGqU4w3r7d2VtMudIzkI=
Expand Down Expand Up @@ -400,6 +406,8 @@ github.com/gethinode/mod-google-analytics v1.0.3 h1:QUm4AeBR6D9cLx26F6Cy5qQvQe/1
github.com/gethinode/mod-google-analytics v1.0.3/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
github.com/gethinode/mod-google-analytics v1.1.2 h1:mcoqaRRorut+PxYxJnOEMfKIlVIIOd6vxKhuEYTwFzw=
github.com/gethinode/mod-google-analytics v1.1.2/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
github.com/gethinode/mod-google-analytics v1.1.3 h1:24qxV5vKIex3zSdow+5r0o8rox1lrO31oGi0/XusBy4=
github.com/gethinode/mod-google-analytics v1.1.3/go.mod h1:dl628cFozpCvoIMCiV7ujzQipjxcm3eatXrSfLPWNII=
github.com/gethinode/mod-katex v1.0.2 h1:pIG4n3qLl/IVe7BEiwn+GL8r5lOCtF6FDxlcrPKdAXk=
github.com/gethinode/mod-katex v1.0.2/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-katex v1.0.3 h1:fvlUWqcUQqv2zRNM2kfmJ6GhXA816Tl1nfVrUkmBStI=
Expand Down Expand Up @@ -498,6 +506,8 @@ github.com/gethinode/mod-simple-datatables v1.0.12 h1:myyVp1ctQA6j+5UTWcDwQmy8ip
github.com/gethinode/mod-simple-datatables v1.0.12/go.mod h1:QuH7wz1igohzCgL76xI1960mFxPPrqgvGtLwR/0cFyQ=
github.com/gethinode/mod-simple-datatables v1.0.13 h1:3GTn46Zh56SFzCUP7CUSrmp/ZoiaVG19q4xdObSx6Pc=
github.com/gethinode/mod-simple-datatables v1.0.13/go.mod h1:a2qIdYegX5gBubGbspuHv/2UA/8O89oUG/U5hd7jLK8=
github.com/gethinode/mod-simple-datatables v1.0.14 h1:332WtbaQtTm7VP0b7zYfpogTBcOEetkJrNd01K4d/JE=
github.com/gethinode/mod-simple-datatables v1.0.14/go.mod h1:mP3yjAdVE1G6JHfv8VVsRmvaPlPwddXknI675AuVs2I=
github.com/gethinode/mod-utils v1.0.0 h1:cqHm2xS5uDiJzRm1KfHaNbq6uMVDKLhQa8/BuTZ1nhY=
github.com/gethinode/mod-utils v1.0.0/go.mod h1:ONJm3pHCq7nvaPNjusLZNCeCbhOhSBH4HVKHwK1FdYE=
github.com/gethinode/mod-utils v1.0.1 h1:jhZGlGFHHL1f5HXbBMXfiZ2gCz4TVafAzjnRPTIBSEE=
Expand Down
2 changes: 2 additions & 0 deletions hugo_stats.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@
"fa-circle-play",
"fa-code",
"fa-code-pull-request",
"fa-cookie-bite",
"fa-copy",
"fa-display",
"fa-ellipsis",
Expand Down Expand Up @@ -1200,6 +1201,7 @@
"fas-circle-info",
"fas-code",
"fas-code-pull-request",
"fas-cookie-bite",
"fas-copy",
"fas-display",
"fas-ellipsis",
Expand Down