diff --git a/config/_default/params.toml b/config/_default/params.toml index 241ad802..21b8978e 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -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/" diff --git a/content/en/docs/latest/about/integrations.md b/content/en/docs/latest/about/integrations.md index 37e8104b..d01d0624 100644 --- a/content/en/docs/latest/about/integrations.md +++ b/content/en/docs/latest/about/integrations.md @@ -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 --- @@ -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 >}}. diff --git a/content/en/docs/latest/advanced-settings/scripts.md b/content/en/docs/latest/advanced-settings/scripts.md index 34d809e4..29a5c269 100644 --- a/content/en/docs/latest/advanced-settings/scripts.md +++ b/content/en/docs/latest/advanced-settings/scripts.md @@ -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 diff --git a/content/en/docs/latest/advanced-settings/server-headers.md b/content/en/docs/latest/advanced-settings/server-headers.md index f88bf61b..9cfeeb72 100644 --- a/content/en/docs/latest/advanced-settings/server-headers.md +++ b/content/en/docs/latest/advanced-settings/server-headers.md @@ -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. @@ -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. diff --git a/content/en/docs/latest/configuration/cookie-consent.md b/content/en/docs/latest/configuration/cookie-consent.md index d0d88f4c..8074dc66 100644 --- a/content/en/docs/latest/configuration/cookie-consent.md +++ b/content/en/docs/latest/configuration/cookie-consent.md @@ -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 @@ -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: diff --git a/content/en/docs/latest/configuration/modules.md b/content/en/docs/latest/configuration/modules.md index 677fca87..1bc8209b 100644 --- a/content/en/docs/latest/configuration/modules.md +++ b/content/en/docs/latest/configuration/modules.md @@ -1,7 +1,7 @@ --- title: Modules description: Customize and extend Hinode with Hugo modules. -date: 2024-09-24 +date: 2024-10-21 layout: docs --- @@ -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. | For example, Bootstrap uses the following configuration in its module configuration: @@ -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: @@ -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. diff --git a/data/releases.yml b/data/releases.yml index 89b51382..1e9afa37 100644 --- a/data/releases.yml +++ b/data/releases.yml @@ -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 diff --git a/go.mod b/go.mod index 2352ce3f..6e4dc844 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 5d67a84d..c5204ccc 100644 --- a/go.sum +++ b/go.sum @@ -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= @@ -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= @@ -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= @@ -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= diff --git a/hugo_stats.json b/hugo_stats.json index 2e8530da..03efe220 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -306,6 +306,7 @@ "fa-circle-play", "fa-code", "fa-code-pull-request", + "fa-cookie-bite", "fa-copy", "fa-display", "fa-ellipsis", @@ -1200,6 +1201,7 @@ "fas-circle-info", "fas-code", "fas-code-pull-request", + "fas-cookie-bite", "fas-copy", "fas-display", "fas-ellipsis",