Compare commits

...

20 Commits

Author SHA1 Message Date
Mark Dumay
d1bedea219 Merge pull request #1384 from gethinode/develop
FIx link to page resource
2025-01-28 06:41:59 +01:00
Mark Dumay
e21815d4d2 Merge branch 'main' into develop 2025-01-28 06:29:19 +01:00
Mark Dumay
8d38e6b8c2 FIx link to page resource 2025-01-28 06:28:54 +01:00
Mark Dumay
974b0db6ee Merge pull request #1383 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2025-01-28 05:52:56 +01:00
markdumay
1aa0243bb5 fix: update Hugo module dependencies 2025-01-28 03:06:46 +00:00
github-actions[bot]
bff00ecca6 Merge pull request #1381 from gethinode/dependabot/npm_and_yarn/stylelint-16.14.0
Bump stylelint from 16.13.2 to 16.14.0
2025-01-27 14:28:14 +00:00
dependabot[bot]
fc436a1398 Bump stylelint from 16.13.2 to 16.14.0
Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.13.2 to 16.14.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/16.13.2...16.14.0)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 14:22:18 +00:00
github-actions[bot]
60b06880f7 Merge pull request #1382 from gethinode/dependabot/npm_and_yarn/eslint-9.19.0
Bump eslint from 9.18.0 to 9.19.0
2025-01-27 14:20:55 +00:00
dependabot[bot]
3e986fa135 Bump eslint from 9.18.0 to 9.19.0
Bumps [eslint](https://github.com/eslint/eslint) from 9.18.0 to 9.19.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.18.0...v9.19.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-27 14:14:14 +00:00
github-actions[bot]
3d7c877cec Merge pull request #1379 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.139.0
Bump hugo-bin from 0.138.0 to 0.139.0
2025-01-23 13:51:05 +00:00
dependabot[bot]
f21a7bc0da Bump hugo-bin from 0.138.0 to 0.139.0
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.138.0 to 0.139.0.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.138.0...v0.139.0)

---
updated-dependencies:
- dependency-name: hugo-bin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-23 13:43:24 +00:00
Mark Dumay
a4057ad498 Merge pull request #1377 from gethinode/develop
Fix rendering of Cloudinary videos in Firefox
2025-01-21 11:12:08 +01:00
Mark Dumay
09d3294867 Merge branch 'main' into develop 2025-01-21 11:00:32 +01:00
Mark Dumay
7b167e32c4 Fix rendering of Cloudinary videos in Firefox 2025-01-21 11:00:00 +01:00
Mark Dumay
941698cc15 Merge pull request #1376 from gethinode/develop
Fix math codeblock rendering
2025-01-21 09:59:23 +01:00
Mark Dumay
1ec7d7477b Merge branch 'main' into develop 2025-01-21 09:08:13 +01:00
Mark Dumay
9ef702ef06 Fix math codeblock rendering 2025-01-21 09:07:36 +01:00
Mark Dumay
5e41fddef3 Merge pull request #1375 from gethinode/develop
Apply title case to sections and sidebar menus
2025-01-20 13:22:00 +01:00
Mark Dumay
a620900c18 Merge branch 'main' into develop 2025-01-20 12:31:09 +01:00
Mark Dumay
cc25fe311d Apply title case to sections and sidebar menus 2025-01-20 12:30:39 +01:00
14 changed files with 84 additions and 45 deletions

View File

@@ -42,6 +42,12 @@
host = "youtube"
# toml-docs-end videos
[dam]
videoCodecs = [
"webm/vp9",
"mp4/h265",
"mp4"
]
# toml-docs-start debugging
[debugging]

View File

@@ -7,17 +7,17 @@
Access-Control-Allow-Origin = '*'
Content-Security-Policy = """
base-uri 'self'; \
connect-src 'self' *.google-analytics.com *.analytics.google.com *.googletagmanager.com; \
connect-src 'self' *.analytics.google.com *.google.com *.google-analytics.com *.googletagmanager.com; \
default-src 'none'; \
font-src 'self' fonts.gstatic.com; \
font-src 'self' fonts.gstatic.com data:; \
form-action 'self'; \
frame-src player.cloudinary.com www.youtube-nocookie.com www.youtube.com player.vimeo.com; \
img-src 'self' *.google-analytics.com *.googletagmanager.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.ytimg.com tile.openstreetmap.org i.vimeocdn.com; \
frame-src *.googletagmanager.com player.cloudinary.com www.youtube-nocookie.com www.youtube.com player.vimeo.com; \
img-src 'self' *.google-analytics.com *.googletagmanager.com googletagmanager.com ssl.gstatic.com www.gstatic.com data: *.imgix.net *.imagekit.io *.cloudinary.com i.ytimg.com tile.openstreetmap.org i.vimeocdn.com; \
manifest-src 'self'; \
media-src 'self'; \
object-src 'none'; \
script-src 'self' *.google-analytics.com *.googletagmanager.com player.vimeo.com; \
style-src 'self' www.youtube.com; \
script-src 'self' *.google-analytics.com *.googletagmanager.com *.analytics.google.com googletagmanager.com tagmanager.google.com player.vimeo.com; \
style-src 'self' googletagmanager.com tagmanager.google.com fonts.googleapis.com www.youtube.com; \
"""
Permissions-Policy = 'geolocation=(), midi=(), sync-xhr=(), microphone=(), camera=(), magnetometer=(), gyroscope=(), fullscreen=(), payment=() '
Referrer-Policy = 'strict-origin'

View File

@@ -64,6 +64,11 @@
[dam]
dimensions = "dimensions.yml"
videoCodecs = [
"webm/vp9",
"mp4/h265",
"mp4"
]
[[dam.providers]]
name = "Cloudinary"

2
go.mod
View File

@@ -13,7 +13,7 @@ require (
github.com/gethinode/mod-leaflet v1.2.1 // indirect
github.com/gethinode/mod-lottie v1.5.13 // indirect
github.com/gethinode/mod-simple-datatables v1.1.7 // indirect
github.com/gethinode/mod-utils/v2 v2.9.0 // indirect
github.com/gethinode/mod-utils/v2 v2.10.0 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20240501124520-961c3ae84a87 // indirect
github.com/twbs/bootstrap v5.3.3+incompatible // indirect
)

2
go.sum
View File

@@ -384,6 +384,8 @@ github.com/gethinode/mod-utils/v2 v2.8.6 h1:gtTtL37YPq1n/POIzbj40aYOg1VaZq8IjqwS
github.com/gethinode/mod-utils/v2 v2.8.6/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
github.com/gethinode/mod-utils/v2 v2.9.0 h1:IGaYO+DNo7CcplyAUJASP1sf10/EqiG8sVVM1Q4SJKc=
github.com/gethinode/mod-utils/v2 v2.9.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
github.com/gethinode/mod-utils/v2 v2.10.0 h1:2GN6f3wcu/TlbzPD6DFlWyx+KomXz6LnBv7mfPIXB6o=
github.com/gethinode/mod-utils/v2 v2.10.0/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=

View File

@@ -3,7 +3,7 @@
{{ errorf "Failed to render KaTeX: %q. See %s" . $.Position }}
{{ else }}
{{ if $.Attributes.class }}
<div class="{{ $.Attributes.class }}">{{ . }}</div>
<div class="{{ $.Attributes.class | safeHTMLAttr }}">{{ .Value }}</div>
{{ else }}
{{ .Value }}
{{ end }}

View File

@@ -79,12 +79,16 @@
{{ $pageContext = path.Dir (strings.TrimPrefix hugo.WorkingDir .Filename) }}
{{ end }}
{{ $isPageRes := fileExists (path.Join $pageContext $destination) }}
{{ $res := "" }}
{{ if $isPageRes }}
{{- $res = partial "utilities/GetResource.html" (dict "url" .destination "page" $page) -}}
{{ end }}
{{ $isStatic := fileExists (path.Join "static" $destination) }}
{{ if and (not $isPageRes) (not $isStatic) }}
{{ if and (not $res) (not $isStatic) }}
{{- errorf "partial [assets/link.html] - Cannot find page or asset: '%s' at '%s'" $destination $page.File.Path -}}
{{- $error = true -}}
{{ else if $isPageRes }}
{{ $destination = partial "utilities/URLJoin.html" (dict "elements" (slice "/" (strings.TrimPrefix "/content" $pageContext) $destination)) }}
{{ else if $res }}
{{ $destination = $res.RelPermalink }}
{{ else if $isStatic }}
{{ $destination = partial "utilities/URLJoin.html" (dict "base" "/" "path" $destination) }}
{{ end }}

View File

@@ -16,6 +16,7 @@
{{- $title := .title -}}
{{- $description := .description -}}
{{- $content := .content -}}
{{ if site.Params.main.titleCase }}{{ $title = title $title }}{{ end }}
<!-- Main code -->
{{ with $title }}<p id="{{ anchorize . }}" class="display-4 py-5{{ if and page.IsHome site.Params.home.centerHeadline }} text-center{{ end }}">{{ . }}</p>{{ end }}

View File

@@ -37,6 +37,9 @@
<li class="mb-1">
<div class="d-flex w-100 p-0 sidebar-item-group">
<div class="text-start flex-grow-1 {{ if $current }}fw-bold{{ end }}">
{{- $groupTitle := $group.title -}}
{{ if site.Params.main.titleCase }}{{ $groupTitle = title $groupTitle }}{{ end }}
{{ $dest := $href }}
{{ $target := "" }}
{{ if or $current (not $ref) }}
@@ -45,7 +48,7 @@
<a {{ with $dest }} href="{{ . }}"{{ else }}
data-bs-toggle="collapse"
data-bs-target="#sidebar-collapse-{{ $index }}-{{ $level }}"
{{ end }}>{{ $group.title }}</a>
{{ end }}>{{ $groupTitle }}</a>
</div>
<button

View File

@@ -117,9 +117,19 @@
{{ end }}
{{ $url := printf "https://player.cloudinary.com/embed/?cloud_name=%s&public_id=%s" $account $id }}
{{ $params := "&controls=true" }}
{{ if $autoplay }}{{ $params = print $params "&autoplay=true&muted=true" }}{{ end }}
{{ with .options }}{{ $params = print "&" . }}{{ end }}
{{ $params := "" }}
{{ if $autoplay }}{{ $params = print $params "&player[autoplay]=true&player[muted]=true" }}{{ end }}
{{ $codecs := slice }}
{{ with index site.Params "dam" }}{{ with index . "videoCodecs" }}{{ $codecs = . }}{{ end }}{{ end }}
{{ range $k, $v := $codecs }}
{{ $params = printf "%s&source[source_types][%d]=%s" $params $k (urlquery $v) }}
{{ end }}
{{ if gt (len $codecs) 0 }}
{{ $params = print $params "&source[transformation][1][quality]=auto" }}
{{ end }}
{{ with .options }}{{ $params = print $params "&" . }}{{ end }}
{{ $params = strings.TrimLeft "?&" $params }}
{{ with $params }}{{ $url = print $url "&" . }}{{ end }}
{{ $padding := "56.25%" }}
@@ -138,7 +148,7 @@
{{ if not $title }}{{ $title = printf "Cloudinary video '%s'" (path.BaseName $id) }}{{ end }}
<div class="video-embedded {{ $class }}" data-video-padding="{{ $padding }}">
<iframe src="{{ $url | safeHTMLAttr }}" title="{{ $title }}" webkitallowfullscreen mozallowfullscreen allowfullscreen>
<iframe src="{{ $url | safeURL }}" title="{{ $title }}" allow="autoplay; fullscreen; encrypted-media" frameborder="0">
</iframe>
</div>
{{ else }}

View File

@@ -33,7 +33,10 @@
{{- $align := .align | default "center" -}}
<div class="text-{{ $align }}">
{{ with $page.Title }}<p class="display-4">{{ . }}</p>{{ end }}
{{ $title := $page.Title }}
{{ if site.Params.main.titleCase }}{{ $title = title $title }}{{ end }}
{{ with $title }}<p class="display-4">{{ . }}</p>{{ end }}
<span class="fs-5 text-muted">{{ $page.Description }}</span>
{{ if $actions }}

View File

@@ -46,6 +46,8 @@
{{- with index . "title" }}{{ $title = or . $title }}{{ end -}}
{{- end -}}
{{ if site.Params.main.titleCase }}{{ $title = title $title }}{{ end }}
{{- $thumbnail := "" -}}
{{ if reflect.IsMap $sectionPage.Params.Thumbnail }}{{ $thumbnail = $sectionPage.Params.Thumbnail.url }}{{ else }}{{ $thumbnail = $sectionPage.Params.Thumbnail }}{{ end }}
{{- $icon := $sectionPage.Params.Icon -}}

51
package-lock.json generated
View File

@@ -1,25 +1,25 @@
{
"name": "@gethinode/hinode",
"version": "0.29.0",
"version": "0.29.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@gethinode/hinode",
"version": "0.29.0",
"version": "0.29.3",
"license": "MIT",
"dependencies": {
"@fullhuman/postcss-purgecss": "^7.0.2",
"autoprefixer": "^10.4.20",
"cssnano": "^7.0.6",
"cssnano-preset-advanced": "^7.0.6",
"hugo-bin": "0.138.0",
"hugo-bin": "0.139.0",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {
"@gethinode/netlify-plugin-dartsass": "^0.3.0",
"cpy-cli": "^5.0.0",
"eslint": "^9.18.0",
"eslint": "^9.19.0",
"markdownlint-cli2": "^0.17.2",
"neostandard": "^0.12.0",
"netlify-plugin-hugo-cache-resources": "^0.2.1",
@@ -28,7 +28,7 @@
"replace-in-files-cli": "^3.0.0",
"rimraf": "^6.0.1",
"shx": "^0.3.4",
"stylelint": "^16.13.2",
"stylelint": "^16.14.0",
"stylelint-config-standard-scss": "^14.0.0"
},
"optionalDependencies": {
@@ -378,10 +378,11 @@
}
},
"node_modules/@eslint/js": {
"version": "9.18.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.18.0.tgz",
"integrity": "sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==",
"version": "9.19.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.19.0.tgz",
"integrity": "sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
@@ -2792,17 +2793,18 @@
}
},
"node_modules/eslint": {
"version": "9.18.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.18.0.tgz",
"integrity": "sha512-+waTfRWQlSbpt3KWE+CjrPPYnbq9kfZIYUqapc0uBXyjTp8aYXZDsUH16m39Ryq3NjAVP4tjuF7KaukeqoCoaA==",
"version": "9.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.19.0.tgz",
"integrity": "sha512-ug92j0LepKlbbEv6hD911THhoRHmbdXt2gX+VDABAW/Ir7D3nqKdv5Pf5vtlyY6HQMTEP2skXY43ueqTCWssEA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.12.1",
"@eslint/config-array": "^0.19.0",
"@eslint/core": "^0.10.0",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "9.18.0",
"@eslint/js": "9.19.0",
"@eslint/plugin-kit": "^0.2.5",
"@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1",
@@ -4172,9 +4174,9 @@
}
},
"node_modules/hugo-bin": {
"version": "0.138.0",
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.138.0.tgz",
"integrity": "sha512-WNpW+PQb9MFzZlaQBT354/MMN5/MWMvgQyTSHgIK/w8hfcefpcxklSnPmPXJxOYZNEphwzJ8jgDOwJ606gm0jA==",
"version": "0.139.0",
"resolved": "https://registry.npmjs.org/hugo-bin/-/hugo-bin-0.139.0.tgz",
"integrity": "sha512-ZjtVqatwvqCW6BSRNucj3xsNVoO3ZjuZDCg0NGQC0B/Wsvc6vwVfS7E6KD755XJ/N6o7raa3qXe+gIvJiew7cA==",
"funding": [
{
"type": "github",
@@ -6588,9 +6590,9 @@
}
},
"node_modules/postcss": {
"version": "8.4.49",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz",
"integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==",
"version": "8.5.1",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz",
"integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==",
"funding": [
{
"type": "opencollective",
@@ -6607,7 +6609,7 @@
],
"license": "MIT",
"dependencies": {
"nanoid": "^3.3.7",
"nanoid": "^3.3.8",
"picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
},
@@ -8359,9 +8361,9 @@
}
},
"node_modules/stylelint": {
"version": "16.13.2",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.13.2.tgz",
"integrity": "sha512-wDlgh0mRO9RtSa3TdidqHd0nOG8MmUyVKl+dxA6C1j8aZRzpNeEgdhFmU5y4sZx4Fc6r46p0fI7p1vR5O2DZqA==",
"version": "16.14.0",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.14.0.tgz",
"integrity": "sha512-orePw2dKxzXC0hd1VmxrDBqgf1KUV9DYsZY4guKLE9XcQD7m0BxVnWMaoQqMNsQIG14MyyTHf6zoajvOnDra8g==",
"dev": true,
"funding": [
{
@@ -8373,6 +8375,7 @@
"url": "https://github.com/sponsors/stylelint"
}
],
"license": "MIT",
"dependencies": {
"@csstools/css-parser-algorithms": "^3.0.4",
"@csstools/css-tokenizer": "^3.0.3",
@@ -8392,7 +8395,7 @@
"globby": "^11.1.0",
"globjoin": "^0.1.4",
"html-tags": "^3.3.1",
"ignore": "^7.0.1",
"ignore": "^7.0.3",
"imurmurhash": "^0.1.4",
"is-plain-object": "^5.0.0",
"known-css-properties": "^0.35.0",
@@ -8401,7 +8404,7 @@
"micromatch": "^4.0.8",
"normalize-path": "^3.0.0",
"picocolors": "^1.1.1",
"postcss": "^8.4.49",
"postcss": "^8.5.1",
"postcss-resolve-nested-selector": "^0.1.6",
"postcss-safe-parser": "^7.0.1",
"postcss-selector-parser": "^7.0.0",

View File

@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.29.0",
"version": "0.29.3",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
@@ -73,13 +73,13 @@
"autoprefixer": "^10.4.20",
"cssnano": "^7.0.6",
"cssnano-preset-advanced": "^7.0.6",
"hugo-bin": "0.138.0",
"hugo-bin": "0.139.0",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {
"@gethinode/netlify-plugin-dartsass": "^0.3.0",
"cpy-cli": "^5.0.0",
"eslint": "^9.18.0",
"eslint": "^9.19.0",
"markdownlint-cli2": "^0.17.2",
"neostandard": "^0.12.0",
"netlify-plugin-hugo-cache-resources": "^0.2.1",
@@ -88,7 +88,7 @@
"replace-in-files-cli": "^3.0.0",
"rimraf": "^6.0.1",
"shx": "^0.3.4",
"stylelint": "^16.13.2",
"stylelint": "^16.14.0",
"stylelint-config-standard-scss": "^14.0.0"
},
"optionalDependencies": {