From 78f927a0454c4d83dfccedde8bc6078ecf45d28e Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Sun, 26 May 2024 19:23:32 +0200 Subject: [PATCH 1/7] Add DAM configuration --- config/_default/params.toml | 3 + config/_default/server.toml | 2 +- .../configuration/digital-asset-managers.md | 67 +++++++++++++++++++ data/docs.yml | 1 + netlify.toml | 2 +- 5 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 content/en/docs/latest/configuration/digital-asset-managers.md diff --git a/config/_default/params.toml b/config/_default/params.toml index d2bc67d7..5edfef8f 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -239,6 +239,7 @@ caniuse_webshare = "https://caniuse.com/?search=navigator.share" cc_by_nc_4_0 = "https://creativecommons.org/licenses/by-nc/4.0/" cloudflare = "https://cloudflare.com" + cloudinary = "https://cloudinary.com" commit_message = "https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html" community_guidelines = "https://docs.github.com/articles/github-community-guidelines" contrast_checker = "https://accessibleweb.com/color-contrast-checker/" @@ -322,6 +323,8 @@ hugo_vars = "https://discourse.gohugo.io/t/initialize-sass-variables-from-hugo-templates" hugo_youtube_privacy = "https://gohugo.io/about/hugo-and-gdpr/#youtube" hugo_issue_10719 = "https://github.com/gohugoio/hugo/issues/10719" + imagekit = "https://imagekit.io" + imgix = "https://imgix.com" initialcommit = "https://initialcommit.com/blog/git-commit-messages-best-practices" issue_tracker = "https://github.com/gethinode/hinode/issues" katex = "https://katex.org" diff --git a/config/_default/server.toml b/config/_default/server.toml index c80d88d1..d7fdf267 100644 --- a/config/_default/server.toml +++ b/config/_default/server.toml @@ -14,7 +14,7 @@ for = '/**' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \ font-src 'self' https://fonts.gstatic.com; \ frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com; \ - img-src 'self' data: https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \ + img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \ manifest-src 'self'; \ media-src 'self' \ """ diff --git a/content/en/docs/latest/configuration/digital-asset-managers.md b/content/en/docs/latest/configuration/digital-asset-managers.md new file mode 100644 index 00000000..3974bfc1 --- /dev/null +++ b/content/en/docs/latest/configuration/digital-asset-managers.md @@ -0,0 +1,67 @@ +--- +title: Digital Asset Managers +description: Configure Digital Asset Managers to delegate the transformation of images +date: 2024-05-26 +layout: docs +--- + +{{< release version="v0.24.0-beta2 " >}} + +Hinodes uses Hugo’s {{< link "../content/images-and-figures" >}}image processing{{< /link>}} to preprocess images on the server side. Hugo uses caching to reduce the build time. Despite the caching techniques, the image processing can take significant time, especially on larger sites. An alternative approach is to use a dedicated Digital Asset Manager. Most managers offer an API to transform images on the fly. The following paragraphs explain how to enable these Digital Asset Managers. + +## Configuring a DAM + +Hinode supports {{< link cloudinary>}}Cloudinary{{< /link >}}, {{< link imagekit>}}ImageKit.io{{< /link >}}, and {{< link imgix>}}Imgix{{< /link >}} as Digital Asset Manager (DAM). You can configure these managers in your site parameters. Link a DAM to a specific URL by providing a regular expression that matches the domain name of the URL. For example, the `host = cloudinary` matches the image `https://res.cloudinary.com/demo/image/upload/dog.webp` to {{< link cloudinary>}}Cloudinary{{< /link >}}. When no match is found, Hinode uses Hugo's image processing instead. Hinode uses the following configuration by default: + + +{{}} + +## Content Security Policy + +Hinode has enabled access for Cloudinary, ImageKit.io, and Imgix by default. The following settings are set in `config/_default/server.toml`. Similar settings are defined in the `netlify.toml` file provided in the repository’s root when deploying to {{< link netlify >}}Netlify{{< /link >}}. Revise the Content Security Policy as needed. + +```yaml +img-src: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com +``` + +## Supported providers + +You can include DAM-enabled images and figures using the regular {{< link "../components/image" />}} shortcode. Simply include the image's URL in the `src` attribute. The next paragraphs demonstrate the various available Digital Asset Managers. + +### Cloudinary + + +{{< example lang="hugo" >}} +{{}} +{{< /example >}} + + +### ImageKit.io + + +{{< example lang="hugo" >}} +{{}} +{{< /example >}} + + +### Imgix + + +{{< example lang="hugo" >}} +{{}} +{{< /example >}} + + +## Adding a custom DAM + +{{< alert type="info" >}} +Configuring an additional Digital Asset Manager? Please consider to contribute your adapter to the open-source community of Hinode. Review the {{}}contributing guidelines{{< /link */>}} to find out more. +{{< /alert >}} + +You can configure additional Digital Asset Managers by adding a adapter to the folder `layouts/partials/assets/adapters/`. For example, the adapter for {{< link cloudinary>}}Cloudinary{{< /link >}} is available in `cloudinary.html`. Hinode supports basic image transformations such as adjusting the dimensions and cropping. Hinode passes the following arguments to each recognized adapter: + + +{{}} diff --git a/data/docs.yml b/data/docs.yml index 570f2102..9a89b4b0 100644 --- a/data/docs.yml +++ b/data/docs.yml @@ -30,6 +30,7 @@ - title: Documentation - title: Analytics - title: Modules + - title: Digital Asset Managers # - title: Forms # pages: diff --git a/netlify.toml b/netlify.toml index ceddf9df..518961fc 100644 --- a/netlify.toml +++ b/netlify.toml @@ -35,7 +35,7 @@ font-src 'self' https://*.netlify.app https://fonts.gstatic.com; \ frame-src 'self' https://www.youtube-nocookie.com https://www.youtube.com \ app.netlify.com; \ - img-src 'self' data: https://*.netlify.app https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \ + img-src 'self' data: https://*.imgix.net https://*.imagekit.io https://*.cloudinary.com https://*.netlify.app https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \ manifest-src 'self'; \ media-src 'self' \ """ From ac4e38d9a99fd485403228074d09d651aa8c2e88 Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Sun, 26 May 2024 19:23:49 +0200 Subject: [PATCH 2/7] Update module config --- .../en/docs/latest/configuration/modules.md | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/content/en/docs/latest/configuration/modules.md b/content/en/docs/latest/configuration/modules.md index 50071ca8..4bfcf1eb 100644 --- a/content/en/docs/latest/configuration/modules.md +++ b/content/en/docs/latest/configuration/modules.md @@ -24,6 +24,11 @@ The main repository of Hinode imports the following modules by default. ## Configuring modules +{{< alert >}} +**New in v0.24.0-beta2** - Hinode uses the default configuration of each referenced module. You can still override these settings in your site parameters. +{{< /alert >}} + + You can choose to either fully integrate compatible modules or to include them on a page-by-page basis. For example, you might only want to display an interactive map on a few pages. In this case, you could choose to include the `leaflet` module on an opt-in basis. This ensures the page size is minimized. On the other hand, as `bootstrap` is used on every single page, it makes sense to include it as a core module. For core modules, Hinode bundles the provided [stylesheet files]({{< relref "styles" >}}) and [JavaScript files]({{< relref "scripts" >}}) into the main stylesheet and main script file. For optional modules, Hinode prepares separate stylesheet files and JavaScript files for each individual module. The configuration order of the core modules is important: **the first module is processed before the next modules**. @@ -37,19 +42,28 @@ Hugo uses two different algorithms to merge the filesystems, depending on the fi Adjust the `modules` section in your site's parameter configuration file `config/_default/params.toml` to configure the various modules. Modules can include files for each of the following folders: `archetypes`, `assets`, `content`, `data`, `i18n`, `layouts`, `static`. Modules can also have their own configuration files. Each module needs to be imported as well ([see the previous paragraph]({{< relref "#configuring-modules" >}})). -The following table provides an overview of the available settings. Omit the `mod-` prefix of the module's name. +{{< release version="v0.24.0-beta2" >}} + +The following table provides an overview of the available settings for each module. Omit the `mod-` prefix of the module's name. {{< table >}} | Setting | Default | Description | |-----------------|---------------|-------------| -| core | ["bootstrap", "flexsearch", "fontawesome"] | Core modules to be fully integrated with the Hinode site, including stylesheets and Javascript bundles. The modules are processed in order of priority, with the first module taking precedence. | -| optional | ["leaflet"] | Optional modules to be included by Hinode. Enable each module in the frontmatter of a page. | -| excludeSCSS | ["bootstrap"] | 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 | ["katex"] | Scripts file within optional modules to exclude from processing as Hugo template. The scripts are bundled as-is instead. | +| integration | optional | Module integration, either `core` or `optional`. Core modules are fully integrated with the Hinode site, including stylesheets and Javascript bundles. The modules are processed in order of priority, with the first module taking precedence. Optional modules are only included on those pages that reference the module in the frontmatter. Hinode includes the following core modules by default: ["bootstrap", "flexsearch", "fontawesome"]. | +| 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. | {{< /table >}} +For example, Bootstrap uses the following configuration in its module configuration: + +```toml +[params.modules.bootstrap] + integration = "core" + excludeSCSS = true +``` + {{< release version="v0.17.0" >}} The `fontawesome` module supports the following additional settings: @@ -73,10 +87,6 @@ The `utils` module supports the following additional settings: | utils.raw | false | Flag to indicate page descriptions should be returned as-is. In this setting, the filter is ignored. | {{< /table >}} -Hinode uses the following module configuration by default: - -{{< docs name="modules" file="config/_default/params.toml" >}} - ## Enabling optional modules You can enable an optional module for a specific page by setting the following value in the page's frontmatter: From c13f54df585b51ff4f2c93a2e0695f34bc938ae7 Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Sun, 26 May 2024 19:34:18 +0200 Subject: [PATCH 3/7] Update dependencies --- go.mod | 16 ++++++++-------- go.sum | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 1c770071..ded64cea 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,14 @@ go 1.20 require ( github.com/airbnb/lottie-web v5.12.2+incompatible // indirect - github.com/gethinode/hinode v0.23.21 // indirect - github.com/gethinode/mod-bootstrap v1.2.8 // indirect - github.com/gethinode/mod-flexsearch v1.11.3 // indirect - github.com/gethinode/mod-fontawesome v1.8.2 // indirect - github.com/gethinode/mod-katex v1.0.9 // indirect - github.com/gethinode/mod-leaflet v1.0.1 // indirect - github.com/gethinode/mod-lottie v1.4.6 // indirect - github.com/gethinode/mod-utils/v2 v2.3.0 // indirect + github.com/gethinode/hinode v0.24.0-beta3 // indirect + github.com/gethinode/mod-bootstrap v1.3.0 // indirect + github.com/gethinode/mod-flexsearch v1.12.0 // indirect + github.com/gethinode/mod-fontawesome v1.9.0 // indirect + github.com/gethinode/mod-katex v1.1.0 // indirect + github.com/gethinode/mod-leaflet v1.1.0 // indirect + github.com/gethinode/mod-lottie v1.5.0 // indirect + github.com/gethinode/mod-utils/v2 v2.3.1 // 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 a463bd2f..c9858136 100644 --- a/go.sum +++ b/go.sum @@ -208,6 +208,16 @@ github.com/gethinode/hinode v0.23.20 h1:dsBDyCnPhI3lox4sM5JEUMil2DByDWT/pcP1Ii6E github.com/gethinode/hinode v0.23.20/go.mod h1:ZeVZDRjvPMosmTVG3RWBvaHvWaNbjYf7/3fF/LxXOVw= github.com/gethinode/hinode v0.23.21 h1:tnjfA33d6WfwIXWxKZDcrg70+ftLJ+asCwYkWtyuKxo= github.com/gethinode/hinode v0.23.21/go.mod h1:ZeVZDRjvPMosmTVG3RWBvaHvWaNbjYf7/3fF/LxXOVw= +github.com/gethinode/hinode v0.24.0-alpha h1:4NJLokp7HnURPRNZ4Ijq5omVmff1VNqqicELMG+RtZ8= +github.com/gethinode/hinode v0.24.0-alpha/go.mod h1:ZeVZDRjvPMosmTVG3RWBvaHvWaNbjYf7/3fF/LxXOVw= +github.com/gethinode/hinode v0.24.0-alpha2 h1:qSq0GzfoH/lDz9rLrB7ZiqWKt92QPw6VWmQm7q8ILJM= +github.com/gethinode/hinode v0.24.0-alpha2/go.mod h1:ZeVZDRjvPMosmTVG3RWBvaHvWaNbjYf7/3fF/LxXOVw= +github.com/gethinode/hinode v0.24.0-beta1 h1:fKW/sD7P9DpTyDyEnBkv/j+91TLnH4yRf8xO3qyA3kM= +github.com/gethinode/hinode v0.24.0-beta1/go.mod h1:tszmJuUY8ept2Ef6LUvewYvhha+RyRdM4h+1KuRF/7U= +github.com/gethinode/hinode v0.24.0-beta2 h1:zE+ATX9RlNzcU7qxx8EHO1x0nI4aWHYtUwJRbSXMOOQ= +github.com/gethinode/hinode v0.24.0-beta2/go.mod h1:7uY9+CEYnXORBnqHR/sfvG8VCY1uxY0/Sx1aDhWwMNc= +github.com/gethinode/hinode v0.24.0-beta3 h1:IxYZ7yU/I0XqRrDh1T1nyCwe6Ionpctovex70ksIVNI= +github.com/gethinode/hinode v0.24.0-beta3/go.mod h1:7uY9+CEYnXORBnqHR/sfvG8VCY1uxY0/Sx1aDhWwMNc= 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= @@ -222,6 +232,8 @@ github.com/gethinode/mod-bootstrap v1.2.6 h1:joKKVqWzPgitPbUFlU4oIRj72YXsEHkVun3 github.com/gethinode/mod-bootstrap v1.2.6/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ= github.com/gethinode/mod-bootstrap v1.2.8 h1:kIKSO6qqE8xA0KQC5s6kkEv5UDc8oT17HalGIwB+dSc= github.com/gethinode/mod-bootstrap v1.2.8/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ= +github.com/gethinode/mod-bootstrap v1.3.0 h1:UxNmXgXo7gA8C8z1ar47+tSccmKYpaYBBN+txB0pwBk= +github.com/gethinode/mod-bootstrap v1.3.0/go.mod h1:CL9IDot6nbXIWJYE/KxfsTdYYEJIGL17BXbAYPn+wVQ= 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= @@ -260,6 +272,8 @@ github.com/gethinode/mod-flexsearch v1.11.1 h1:TtaE6Dv0lH4x73SHDaZpQJLjk52lRu/Vo github.com/gethinode/mod-flexsearch v1.11.1/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ= github.com/gethinode/mod-flexsearch v1.11.3 h1:ykxpUg8M4vr1C4QzxJOPGt+1ZmPAD/gOCZoFcZxWoWw= github.com/gethinode/mod-flexsearch v1.11.3/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ= +github.com/gethinode/mod-flexsearch v1.12.0 h1:zg1IHvc8VO9WEtQuQnuG6HeWFNByvyqC9JYWDtpsP6s= +github.com/gethinode/mod-flexsearch v1.12.0/go.mod h1:L8hrnpupx27cez2ObMX8gWnhbW6qss4HGH1Ea4UaBRQ= github.com/gethinode/mod-fontawesome v1.2.0 h1:2nWYEjpUKu6IJ6kOh2WDlDUqRQ/dUGw6mJWIdMTA3O0= github.com/gethinode/mod-fontawesome v1.2.0/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI= github.com/gethinode/mod-fontawesome v1.2.1 h1:k7z5ZRsNxCohZjlZm8jVAzmTPk17c6xMYBAjAXHs13I= @@ -292,6 +306,8 @@ github.com/gethinode/mod-fontawesome v1.8.1 h1:iyvULrpaGizQoI5Vl9WjFYcMGWefdyG90 github.com/gethinode/mod-fontawesome v1.8.1/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y= github.com/gethinode/mod-fontawesome v1.8.2 h1:LAzLytyh9c9gLzBWMju6Gtp3uEojhBQEYw0o38EUKZY= github.com/gethinode/mod-fontawesome v1.8.2/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y= +github.com/gethinode/mod-fontawesome v1.9.0 h1:xqUB8AnezMHAt8lye4ksqvmHSVPCOkiHsHGUbqNoeP0= +github.com/gethinode/mod-fontawesome v1.9.0/go.mod h1:xBKsZH3WJtMOItZVlp9SbO51uaBy6IbvUZSKpNu3b6Y= 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= @@ -306,6 +322,8 @@ github.com/gethinode/mod-katex v1.0.8 h1:tFGFz/JIEogCz4wvUsUncrOsOupPxsjP+TwU/3N github.com/gethinode/mod-katex v1.0.8/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= github.com/gethinode/mod-katex v1.0.9 h1:cCJoR28tZwkDvXps17o9Jwfe3aQQAZ3Rxk0jCNRQdbU= github.com/gethinode/mod-katex v1.0.9/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= +github.com/gethinode/mod-katex v1.1.0 h1:PxST3HPUt6F2X/xKakTVeTkwWqCtEr53K1vYEOyQu3I= +github.com/gethinode/mod-katex v1.1.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= github.com/gethinode/mod-leaflet v0.3.1 h1:H5MaOa+BB1KuVw7abTqfIn/SNzzRsAyx/WQoSe+2Ykc= github.com/gethinode/mod-leaflet v0.3.1/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk= github.com/gethinode/mod-leaflet v0.3.3 h1:isnjja6VRFvVWBatYSouh46TXSJg2C4/E2BQTrQw+yI= @@ -320,6 +338,8 @@ github.com/gethinode/mod-leaflet v1.0.0 h1:HdnWafOGkkK1hYGfqLYF3pp9dAFS/caxlzML9 github.com/gethinode/mod-leaflet v1.0.0/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE= github.com/gethinode/mod-leaflet v1.0.1 h1:L4Coe6HTD9O0Txs1S8AtVg+6/TEneSF9i6fJK8jdWUw= github.com/gethinode/mod-leaflet v1.0.1/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE= +github.com/gethinode/mod-leaflet v1.1.0 h1:FXzPCic5XmUluxQ6e7LYUhhLnxuQOBwry8qjG9k30UY= +github.com/gethinode/mod-leaflet v1.1.0/go.mod h1:Ei0x9WiL7Dbi4JeG6yI1CE63bT1QJ8sKi67Jea1wFSE= github.com/gethinode/mod-lottie v1.3.0 h1:vQ8CXkjdp2IeFskTzu+ZnKOEio8GtN08urVK+oCH81E= github.com/gethinode/mod-lottie v1.3.0/go.mod h1:erRCgSL2FCfKHI0jQbSpM+g0jXl7SjKVJrh7kWGteKs= github.com/gethinode/mod-lottie v1.4.0 h1:0Ls1Q/8p0gQpuX9+dtfNGKcjBNeymjE7gERdnN3lCCE= @@ -334,6 +354,8 @@ github.com/gethinode/mod-lottie v1.4.4 h1:Lv7J+lAMx++aK9h0L7vAgsjyOZgrjux4xPz4Tp github.com/gethinode/mod-lottie v1.4.4/go.mod h1:7tsZjlFgMlj2iWBIS9uOtHHsCrfx9W7S8OsBrZeSVGU= github.com/gethinode/mod-lottie v1.4.6 h1:L6zvfbq+FQUWTG3X/wWFCvb91WOxJuIkJUlZOd+QJ1Q= github.com/gethinode/mod-lottie v1.4.6/go.mod h1:1/+7U/Q5IuaqkzTrvXK1CnPE7ANnTRsG5k+KaXQUQwE= +github.com/gethinode/mod-lottie v1.5.0 h1:LwEEY+p+sPrN01yz7GyVOsF5lZ4qMln69+gAxJs1DDA= +github.com/gethinode/mod-lottie v1.5.0/go.mod h1:FvcG3NjXOBOnwou0QvXYNPHpybxwT6yxmSh4N+nBD9s= 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= @@ -356,6 +378,8 @@ github.com/gethinode/mod-utils/v2 v2.2.2 h1:ZRxWIJKmZIDYsoMS3WhxxC+BWJrkd1dcZ8rz github.com/gethinode/mod-utils/v2 v2.2.2/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY= github.com/gethinode/mod-utils/v2 v2.3.0 h1:e3uhlAGasvXe+cgvcmzRe05Zo4UEx86uk0TbnxtyB6U= github.com/gethinode/mod-utils/v2 v2.3.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY= +github.com/gethinode/mod-utils/v2 v2.3.1 h1:blqynoRJ+H2SPfSU28iYheYWPH39MKNtK5HKJPghL3M= +github.com/gethinode/mod-utils/v2 v2.3.1/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY= github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3 h1:H/qVR5O4BXjRjD+5PZB+r4ug2BSJ2Of4RtwOntd+OKo= github.com/nextapps-de/flexsearch v0.0.0-20230711092928-1243fd883ec3/go.mod h1:5GdMfPAXzbA2gXBqTjC6l27kioSYzHlqDMh0+wyx7sU= github.com/nextapps-de/flexsearch v0.0.0-20240108021025-afd75f742f22 h1:re7L8FxbXQpnX8BgzkdUnDpsUmloGNyLmiy2ZCln8pg= From e31899b83c80dae4665feafca98ac6f2badbbcdc Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Sun, 26 May 2024 19:34:28 +0200 Subject: [PATCH 4/7] Update build stats --- hugo_stats.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hugo_stats.json b/hugo_stats.json index 20bfba7e..dd22fd0e 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -480,7 +480,6 @@ "multi-docs-collapse-13", "multi-docs-collapse-14", "multi-docs-collapse-15", - "multi-docs-collapse-17", "multi-docs-collapse-18", "multi-docs-collapse-19", "multi-docs-collapse-2", @@ -865,6 +864,7 @@ "accordion-flush-item-1", "accordion-flush-item-2", "adaptive-colors", + "adding-a-custom-dam", "adding-a-version-overview", "adding-content", "adding-custom-icons", @@ -904,7 +904,6 @@ "body-docs-collapse-13", "body-docs-collapse-14", "body-docs-collapse-15", - "body-docs-collapse-17", "body-docs-collapse-18", "body-docs-collapse-19", "body-docs-collapse-2", @@ -977,6 +976,7 @@ "carousel-portrait-3x2", "center-coordinates", "check-our-guides-to-get-you-started", + "cloudinary", "code-blocks", "code-snipppet-with-filename-only", "codebase", @@ -1004,6 +1004,7 @@ "configuration-4", "configure-your-site", "configure-your-site-1", + "configuring-a-dam", "configuring-content-snippets", "configuring-modules", "configuring-the-multi-branch-deployment", @@ -1079,7 +1080,6 @@ "footer-docs-collapse-13", "footer-docs-collapse-14", "footer-docs-collapse-15", - "footer-docs-collapse-17", "footer-docs-collapse-18", "footer-docs-collapse-19", "footer-docs-collapse-2", @@ -1135,7 +1135,9 @@ "icons-definitions", "identification", "image-placement", + "imagekitio", "images", + "imgix", "importing-modules", "initializing-the-module-system", "inline-content", @@ -1320,6 +1322,7 @@ "supported-attributes", "supported-complex-types", "supported-primitive-types", + "supported-providers", "supporting-redirection", "table-borders", "table-of-contents", From 3e0f4a70ebde6aadb8cd0c8439cbd0aea1797718 Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Sun, 26 May 2024 19:34:37 +0200 Subject: [PATCH 5/7] Drop module params --- config/_default/params.toml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/config/_default/params.toml b/config/_default/params.toml index 5edfef8f..04fcc172 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -12,18 +12,6 @@ [main.build] transpiler = "dartsass" -[modules] - core = ["bootstrap", "flexsearch", "fontawesome"] - optional = ["leaflet", "katex", "lottie"] - excludeSCSS = ["bootstrap"] - disableTemplate = ["katex"] - [modules.katex] - state = "defer" - [modules.fontawesome] - inline = true - debug = true - skipMissing = false - [debugging] showJS = false showSCSS = false From 54a5f9fc09c0ad7b0f2910e1b5e17bf719fb1c46 Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Sun, 26 May 2024 19:34:59 +0200 Subject: [PATCH 6/7] Enable examples --- .../en/docs/latest/configuration/digital-asset-managers.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/content/en/docs/latest/configuration/digital-asset-managers.md b/content/en/docs/latest/configuration/digital-asset-managers.md index 3974bfc1..4e4f1c18 100644 --- a/content/en/docs/latest/configuration/digital-asset-managers.md +++ b/content/en/docs/latest/configuration/digital-asset-managers.md @@ -13,8 +13,7 @@ Hinodes uses Hugo’s {{< link "../content/images-and-figures" >}}image processi Hinode supports {{< link cloudinary>}}Cloudinary{{< /link >}}, {{< link imagekit>}}ImageKit.io{{< /link >}}, and {{< link imgix>}}Imgix{{< /link >}} as Digital Asset Manager (DAM). You can configure these managers in your site parameters. Link a DAM to a specific URL by providing a regular expression that matches the domain name of the URL. For example, the `host = cloudinary` matches the image `https://res.cloudinary.com/demo/image/upload/dog.webp` to {{< link cloudinary>}}Cloudinary{{< /link >}}. When no match is found, Hinode uses Hugo's image processing instead. Hinode uses the following configuration by default: - -{{}} +{{< docs name="images" file="config/_default/params.toml" >}} ## Content Security Policy @@ -63,5 +62,4 @@ Configuring an additional Digital Asset Manager? Please consider to contribute y You can configure additional Digital Asset Managers by adding a adapter to the folder `layouts/partials/assets/adapters/`. For example, the adapter for {{< link cloudinary>}}Cloudinary{{< /link >}} is available in `cloudinary.html`. Hinode supports basic image transformations such as adjusting the dimensions and cropping. Hinode passes the following arguments to each recognized adapter: - -{{}} +{{< args structure="image-adapter" group="partial" >}} From 26a1a3b1c6f019e1449a9104cb0ecc464687ba04 Mon Sep 17 00:00:00 2001 From: Mark Dumay <61946753+markdumay@users.noreply.github.com> Date: Sun, 26 May 2024 19:38:27 +0200 Subject: [PATCH 7/7] Fix linting issues --- content/en/docs/latest/configuration/digital-asset-managers.md | 2 ++ content/en/docs/latest/configuration/modules.md | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/content/en/docs/latest/configuration/digital-asset-managers.md b/content/en/docs/latest/configuration/digital-asset-managers.md index 4e4f1c18..dfde69fb 100644 --- a/content/en/docs/latest/configuration/digital-asset-managers.md +++ b/content/en/docs/latest/configuration/digital-asset-managers.md @@ -56,9 +56,11 @@ You can include DAM-enabled images and figures using the regular {{< link "../co ## Adding a custom DAM + {{< alert type="info" >}} Configuring an additional Digital Asset Manager? Please consider to contribute your adapter to the open-source community of Hinode. Review the {{}}contributing guidelines{{< /link */>}} to find out more. {{< /alert >}} + You can configure additional Digital Asset Managers by adding a adapter to the folder `layouts/partials/assets/adapters/`. For example, the adapter for {{< link cloudinary>}}Cloudinary{{< /link >}} is available in `cloudinary.html`. Hinode supports basic image transformations such as adjusting the dimensions and cropping. Hinode passes the following arguments to each recognized adapter: diff --git a/content/en/docs/latest/configuration/modules.md b/content/en/docs/latest/configuration/modules.md index 4bfcf1eb..eefae31b 100644 --- a/content/en/docs/latest/configuration/modules.md +++ b/content/en/docs/latest/configuration/modules.md @@ -28,7 +28,6 @@ The main repository of Hinode imports the following modules by default. **New in v0.24.0-beta2** - Hinode uses the default configuration of each referenced module. You can still override these settings in your site parameters. {{< /alert >}} - You can choose to either fully integrate compatible modules or to include them on a page-by-page basis. For example, you might only want to display an interactive map on a few pages. In this case, you could choose to include the `leaflet` module on an opt-in basis. This ensures the page size is minimized. On the other hand, as `bootstrap` is used on every single page, it makes sense to include it as a core module. For core modules, Hinode bundles the provided [stylesheet files]({{< relref "styles" >}}) and [JavaScript files]({{< relref "scripts" >}}) into the main stylesheet and main script file. For optional modules, Hinode prepares separate stylesheet files and JavaScript files for each individual module. The configuration order of the core modules is important: **the first module is processed before the next modules**.