mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-07 18:14:28 +00:00
Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d1bedea219 | ||
![]() |
e21815d4d2 | ||
![]() |
8d38e6b8c2 | ||
![]() |
974b0db6ee | ||
![]() |
1aa0243bb5 | ||
![]() |
bff00ecca6 | ||
![]() |
fc436a1398 | ||
![]() |
60b06880f7 | ||
![]() |
3e986fa135 | ||
![]() |
3d7c877cec | ||
![]() |
f21a7bc0da | ||
![]() |
a4057ad498 | ||
![]() |
09d3294867 | ||
![]() |
7b167e32c4 | ||
![]() |
941698cc15 | ||
![]() |
1ec7d7477b | ||
![]() |
9ef702ef06 |
@@ -42,6 +42,12 @@
|
||||
host = "youtube"
|
||||
# toml-docs-end videos
|
||||
|
||||
[dam]
|
||||
videoCodecs = [
|
||||
"webm/vp9",
|
||||
"mp4/h265",
|
||||
"mp4"
|
||||
]
|
||||
|
||||
# toml-docs-start debugging
|
||||
[debugging]
|
||||
|
@@ -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'
|
||||
|
@@ -64,6 +64,11 @@
|
||||
|
||||
[dam]
|
||||
dimensions = "dimensions.yml"
|
||||
videoCodecs = [
|
||||
"webm/vp9",
|
||||
"mp4/h265",
|
||||
"mp4"
|
||||
]
|
||||
|
||||
[[dam.providers]]
|
||||
name = "Cloudinary"
|
||||
|
2
go.mod
2
go.mod
@@ -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
2
go.sum
@@ -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=
|
||||
|
@@ -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 }}
|
||||
|
@@ -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 }}
|
||||
|
@@ -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 }}
|
||||
|
51
package-lock.json
generated
51
package-lock.json
generated
@@ -1,25 +1,25 @@
|
||||
{
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.29.1",
|
||||
"version": "0.29.3",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.29.1",
|
||||
"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",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gethinode/hinode",
|
||||
"version": "0.29.1",
|
||||
"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": {
|
||||
|
Reference in New Issue
Block a user