Compare commits

...

30 Commits

Author SHA1 Message Date
Mark Dumay
a11ee72174 Merge pull request #354 from gethinode/develop
Bump package version
2023-07-22 06:31:01 +02:00
Mark Dumay
8e91440261 Merge branch 'main' into develop 2023-07-22 06:21:36 +02:00
mark
19879c4ecc Bump package version 2023-07-22 06:21:01 +02:00
Mark Dumay
810dfef311 Merge pull request #353 from gethinode/develop
Fix overflow of syntax highlight
2023-07-22 06:19:56 +02:00
Mark Dumay
c42fcefa73 Merge branch 'main' into develop 2023-07-22 06:12:58 +02:00
mark
a3c417e378 Fix overflow of syntax highlight 2023-07-22 06:10:11 +02:00
Mark Dumay
2bee381906 Merge pull request #352 from gethinode/develop
Enable filename-only in file and docs shortcode
2023-07-21 16:15:34 +02:00
Mark Dumay
244a3f7496 Merge branch 'main' into develop 2023-07-21 16:08:16 +02:00
mark
563b526cea Bump package release 2023-07-21 16:07:09 +02:00
mark
fa7fad67b5 Add full arg to shortcode 2023-07-21 16:06:32 +02:00
Mark Dumay
966906778d Merge pull request #350 from gethinode/develop
Clean-up after modules
2023-07-21 15:48:58 +02:00
mark
135128a5f9 Promote to v0.16 release 2023-07-21 15:27:07 +02:00
Mark Dumay
25663974ce Merge branch 'main' into develop 2023-07-21 15:11:26 +02:00
mark
af5643f98f fix #336 2023-07-21 14:59:18 +02:00
mark
743126d9b9 Remove obsolete files now part of mod-fontawesome 2023-07-21 14:51:27 +02:00
mark
b0187e3a75 Bump dependencies 2023-07-21 14:50:56 +02:00
mark
c7613ab7a8 Add force-check if file exists 2023-07-21 14:47:59 +02:00
mark
2a6a119762 Fix docs typo 2023-07-21 14:47:44 +02:00
mark
b556f4f4ec feat: add file shortcode 2023-07-21 14:47:29 +02:00
mark
9fa95da778 Add katex to safelist for css purge 2023-07-21 11:30:57 +02:00
Mark Dumay
3a07b36447 Merge pull request #349 from gethinode/develop
Improve default mounts
2023-07-21 10:06:53 +02:00
mark
ca5ed02bf9 Bump package release 2023-07-21 09:59:34 +02:00
Mark Dumay
d19321af56 Merge branch 'main' into develop 2023-07-21 09:57:27 +02:00
mark
142e21d792 Adjust default mounts 2023-07-21 09:56:21 +02:00
mark
4c00655584 Add JS and SCSS debugging option 2023-07-21 09:45:21 +02:00
mark
38a2b9ff72 Improve syntax color 2023-07-21 09:32:53 +02:00
mark
efe8837eb3 Add leaflet to purge CSS safelist 2023-07-21 08:55:01 +02:00
mark
130e95ace5 Update mod-flexsearch 2023-07-21 08:38:12 +02:00
mark
e6e38ac7c3 Show I18n warnings when running prod server 2023-07-21 08:37:54 +02:00
mark
3c0a6079af Update purge script to use modules 2023-07-21 08:37:15 +02:00
25 changed files with 313 additions and 74 deletions

View File

@@ -6,9 +6,9 @@
/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #64686c }
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #6e7681 }
/* LineHighlight */ .chroma .hl { background-color: #b8b800 }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #64686c }
/* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #6e7681 }
/* Line */ .chroma .line { display: flex; }
/* Keyword */ .chroma .k { color: #ff7b72 }
/* KeywordConstant */ .chroma .kc { color: #79c0ff }

View File

@@ -7,8 +7,8 @@
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; }
/* LineHighlight */ .chroma .hl { background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* Line */ .chroma .line { display: flex; }
/* Keyword */ .chroma .k { color: #000000; font-weight: bold }
/* KeywordConstant */ .chroma .kc { color: #000000; font-weight: bold }

View File

@@ -10,6 +10,7 @@
.syntax-highlight {
background-color: var(--bs-light) if($enable-important-utilities, !important, null);
overflow-x: auto;
}
.preview-background {
@@ -29,6 +30,7 @@
.syntax-highlight {
background-color: var(--bs-tertiary-bg) if($enable-important-utilities, !important, null);
overflow-x: auto;
}
.bg,

View File

@@ -87,15 +87,24 @@ home = ["HTML", "RSS", "REDIR"]
extended = true
min = "0.110.0"
max = ""
[[module.mounts]]
source = "archetypes"
target = "archetypes"
[[module.mounts]]
source = "assets"
target = "assets"
[[module.mounts]]
source = "i18n"
target = "i18n"
[[module.mounts]]
source = "layouts"
target = "layouts"
[[module.mounts]]
source = "static"
target = "static"
[[module.mounts]]
source = "static/fonts"
target = "static/fonts"
source = "netlify.toml"
target = "assets/config/netlify.toml"
# toml-docs-start modules
[[module.imports]]
path = "github.com/gethinode/mod-bootstrap"

View File

@@ -14,6 +14,12 @@
disableTemplate = ["katex"]
# toml-docs-end modules
# toml-docs-start debugging
[debugging]
showJS = false
showSCSS = false
# toml-docs-end debugging
# toml-docs-start docs
[docs]
github = "https://github.com/gethinode/hinode"

View File

@@ -21,12 +21,15 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
'./assets/scss/components/_syntax-light.scss',
'./assets/scss/theme/fonts.scss',
'./assets/scss/theme/theme.scss',
'./node_modules/bootstrap/scss/_carousel.scss',
'./node_modules/bootstrap/scss/_dropdown.scss',
'./node_modules/bootstrap/scss/_reboot.scss',
'./node_modules/bootstrap/scss/_tooltip.scss',
'./node_modules/bootstrap/scss/_transitions.scss',
'./node_modules/bootstrap/scss/_utilities.scss'
'./_vendor/github.com/gethinode/mod-flexsearch/assets/scss/modules/flexsearch/flexsearch.scss',
'./_vendor/github.com/gethinode/mod-katex/dist/katex.scss',
'./_vendor/github.com/gethinode/mod-leaflet/dist/leaflet.scss',
'./_vendor/github.com/twbs/bootstrap/scss/_carousel.scss',
'./_vendor/github.com/twbs/bootstrap/scss/_dropdown.scss',
'./_vendor/github.com/twbs/bootstrap/scss/_reboot.scss',
'./_vendor/github.com/twbs/bootstrap/scss/_tooltip.scss',
'./_vendor/github.com/twbs/bootstrap/scss/_transitions.scss',
'./_vendor/github.com/twbs/bootstrap/scss/_utilities.scss'
])
]
})

6
go.mod
View File

@@ -4,8 +4,8 @@ go 1.19
require (
github.com/gethinode/mod-bootstrap v1.1.0 // indirect
github.com/gethinode/mod-flexsearch v1.1.0 // indirect
github.com/gethinode/mod-fontawesome v1.2.0 // indirect
github.com/gethinode/mod-flexsearch v1.1.2 // indirect
github.com/gethinode/mod-fontawesome v1.2.1 // indirect
github.com/gethinode/mod-katex v1.0.2 // indirect
github.com/gethinode/mod-leaflet v0.3.1 // indirect
github.com/gethinode/mod-leaflet v0.3.3 // indirect
)

8
go.sum
View File

@@ -6,12 +6,18 @@ github.com/gethinode/mod-flexsearch v1.0.1 h1:FJkRsUzSnQTXl3MWCigT4E6vfff870UWTn
github.com/gethinode/mod-flexsearch v1.0.1/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
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=
github.com/gethinode/mod-flexsearch v1.1.1/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
github.com/gethinode/mod-flexsearch v1.1.2 h1:vA/jHxLq9xxkYGS9cmAoLNIkEBW+iLVCcQ8qKyEa+R4=
github.com/gethinode/mod-flexsearch v1.1.2/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4=
github.com/gethinode/mod-fontawesome v1.0.2 h1:ZSK6D20/w4y5GnfYfTBB58uHD0ChIfkpKfRGwioS9rg=
github.com/gethinode/mod-fontawesome v1.0.2/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
github.com/gethinode/mod-fontawesome v1.1.0 h1:rsDzUI+3ZlS/do2ff3ne8/z3KwHeysmuA+WsXlumXXk=
github.com/gethinode/mod-fontawesome v1.1.0/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
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=
github.com/gethinode/mod-fontawesome v1.2.1/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI=
github.com/gethinode/mod-katex v1.0.0 h1:me/3dIIZBkfk1mRIFt8QiAGYwYDoSG5bc2hHRtIutFc=
github.com/gethinode/mod-katex v1.0.0/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg=
github.com/gethinode/mod-katex v1.0.1 h1:809QUztxmKgMNchU+v03iMO7Ma+ISc3ZzhXYauc21rs=
@@ -22,3 +28,5 @@ github.com/gethinode/mod-leaflet v0.2.3 h1:QQI4h+IH0jZ7fx4q0um2YIEiYBoW3OAfW8qHz
github.com/gethinode/mod-leaflet v0.2.3/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=
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=
github.com/gethinode/mod-leaflet v0.3.3/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk=

View File

@@ -37,6 +37,8 @@
translation: "Wörter"
- id: copyright
translation: "Copyright"
- id: rights
translation: "Alle Rechte vorbehalten"
- id: photoBy
translation: "Foto von"
- id: photoOn

View File

@@ -45,6 +45,8 @@
translation: "words"
- id: copyright
translation: "Copyright"
- id: rights
translation: "All rights reserved"
- id: photoBy
translation: "Photo by"
- id: photoOn
@@ -138,7 +140,7 @@
- id: show
translation: "Show"
- id: comments
translation: "comments"
translation: "Comments"
# Related posts
- id: seeAlso

View File

@@ -37,6 +37,8 @@
translation: "woorden"
- id: copyright
translation: "Copyright"
- id: rights
translation: "Alle rechten voorbehouden"
- id: photoBy
translation: "Foto van"
- id: photoOn
@@ -129,7 +131,7 @@
- id: show
translation: "Tonen"
- id: comments
translation: "commentaar"
translation: "Reacties"
# Related posts
- id: seeAlso

View File

@@ -1,6 +1,6 @@
{{- $params := .Site.Params.comments -}}
{{- with $params -}}
<h2>Comments</h2>
<h2>{{ T "comments" }}</h2>
<script src="https://utteranc.es/client.js"
repo="{{ $params.repo }}"
issue-term="{{ default "pathname" $params.issueTerm }}"

View File

@@ -1,16 +0,0 @@
{{- $icon := .icon -}}
{{- if not $icon -}}
{{- errorf "partial [assets/icon.html] - Expected value for param 'icon'" -}}
{{- end -}}
{{- $icon_class := split $icon " " -}}
{{- $attr := delimit (after 1 $icon_class) " " -}}
{{- if eq (index $icon_class 0) "fas" -}}
<i class="fa-solid fa-{{ $attr}}"></i>
{{- else if eq (index $icon_class 0) "fab" -}}
<i class="fa-brands fa-{{ $attr }}"></i>
{{- else if eq (index $icon_class 0) "fa" -}}
<i class="fa-regular fa-{{ $attr }}"></i>
{{- else -}}
{{- errorf "partial [assets/icon.html] - Unrecognized icon class: %s" $icon_class -}}
{{- end -}}

View File

@@ -1,7 +1,7 @@
<footer class="container-fluid text-center p-3">
<div class="container-xxl text-center">
<small class="text-secondary">
{{- $copyright := printf "%s © %s %s All rights reserved." (i18n "copyright") (dateFormat "2006" now) .Site.Title }}
{{- $copyright := printf "%s © %s %s %s." (T "copyright") (dateFormat "2006" now) .Site.Title (T "rights") }}
{{ cond (gt (len .Site.Copyright) 0) .Site.Copyright $copyright }}
{{ .Site.Params.footer.license | safeHTML }}
</small>

View File

@@ -10,7 +10,7 @@
{{- $modules = site.Params.modules.core -}}
{{- end -}}
{{- $bundle := partial "utilities/bundle" (dict "match" $match "filename" $filename "modules" $modules "basepath" "js/modules" "all" true) -}}
{{- $bundle := partial "utilities/bundle" (dict "match" $match "filename" $filename "modules" $modules "basepath" "js/modules" "all" true "debugging" site.Params.debugging.showJS) -}}
{{- $js := $bundle -}}
{{- if not $skipTemplate -}}
{{- $js = $bundle | resources.ExecuteAsTemplate $filename $page -}}

View File

@@ -11,7 +11,7 @@
Variable names are converted from kebab case to snake case to make them compatible with Hugo's variable naming
convention. For example, the css variable '--accordion-icon-active-color' is available as
''.accordion_icon_active_color' within the Hugo template. The processed svg files are published to the "icons"
'.accordion_icon_active_color' within the Hugo template. The processed svg files are published to the "icons"
folder.
The partial supports the following arguments:

View File

@@ -29,17 +29,8 @@
"import-fonts" (printf "%t" (not (hasPrefix (lower site.Params.style.themeFontPath) "http")))
-}}
<!-- TODO: remove debug statement -->
{{ $match := "scss/**.scss" }}
{{ $files := sort (resources.Match $match) "Key" "asc" }}
{{ warnf "Processing pattern: %s" $match}}
{{- range $index, $file := $files -}}
{{/*- warnf " - Processing file: %s" $file.Key */}}
{{- end -}}
{{- $options := (dict "transpiler" "libsass" "targetPath" $target "enableSourceMap" (not hugo.IsProduction) "vars" $vars) -}}
{{- $bundle := partial "utilities/bundle" (dict "match" $source "filename" (printf "scss/bundle-%d.scss" now.UnixNano) "modules" $modules "basepath" "scss") -}}
{{/* warnf "Bundle: %s" $bundle.Content */}}
{{- $bundle := partial "utilities/bundle" (dict "match" $source "filename" (printf "scss/bundle-%d.scss" now.UnixNano) "modules" $modules "basepath" "scss" "debugging" site.Params.debugging.showSCSS) -}}
{{- $css := $bundle | resources.ExecuteAsTemplate $target . | toCSS $options -}}

View File

@@ -18,6 +18,8 @@
{{- errorf "partial [assets/bundle.html] - Cannot derive file extension of match pattern: %s" $match -}}
{{- end -}}
{{- $debugging := .debugging | default false -}}
{{- if $modules -}}
{{- $match = trim $match "{}" -}}
{{- $matches := slice $match -}}
@@ -46,10 +48,11 @@
{{ $sorted = $sorted | append $file.resource }}
{{- end -}}
<!-- TODO: remove temp debug statement -->
{{ warnf "Processing pattern: %s" $match}}
{{- range $index, $file := $sorted -}}
{{- warnf " - Processing file: %s" $file }}
{{- if $debugging -}}
{{ warnf "Processing pattern: %s" $match}}
{{- range $index, $file := $sorted -}}
{{- warnf " - Processing file: %s" $file }}
{{- end -}}
{{- end -}}
{{/* warnf "FILES: %s" $sorted */}}

View File

@@ -44,13 +44,23 @@
{{ errorf "Invalid value for param 'show': %s" $showParam -}}
{{ end -}}
{{ $fullParam := "true" -}}
{{ $full := true -}}
{{ with .Get "full" }}{{ $fullParam = . }}{{ end -}}
{{ if in $supportedFlags $fullParam -}}
{{ if eq $fullParam "true" }}{{ $full = true }}{{ else }}{{ $full = false }}{{ end -}}
{{ else -}}
{{ errorf "Invalid value for param 'full': %s" $fullParam -}}
{{ end -}}
{{- /* If any parameters are missing, print an error and exit */ -}}
{{- if or (not $name) (not $file) -}}
{{- errorf "%s: %q: Missing required parameters! Got: name=%q file=%q!" .Position .Name $name $file -}}
{{- else -}}
{{- $regex := printf `%s((?:.|\n)*)%s` $capture_start $capture_end -}}
{{- /* Force-check if the file exists */ -}}
{{ $tmp := os.Stat $file }}
{{- $regex := printf `%s((?:.|\n)*)%s` $capture_start $capture_end -}}
{{- $match := findRE $regex (readFile $file) -}}
{{- $match = index $match 0 -}}
@@ -70,7 +80,7 @@
data-bs-target=".multi-{{ $id }}"
aria-expanded="false"
aria-controls="body-{{ $id }} footer-{{ $id }}">
<small>{{ strings.TrimPrefix $basePath $file }}</small>
<small>{{ if $full }}{{ strings.TrimPrefix $basePath $file }}{{ else }}{{ path.Base $file }}{{ end }}</small>
</a>
</li>
</ul>

View File

@@ -1,5 +0,0 @@
{{- if not (.Get 0) -}}
{{- errorf "Expected icon name: %s" .Position -}}
{{- else -}}
{{- partial "assets/icon.html" (dict "icon" (printf "fa %s" (delimit .Params " "))) }}
{{- end -}}

View File

@@ -1,5 +0,0 @@
{{- if not (.Get 0) -}}
{{- errorf "Expected icon name: %s" .Position -}}
{{- else -}}
{{- partial "assets/icon.html" (dict "icon" (printf "fab %s" (delimit .Params " "))) }}
{{- end -}}

View File

@@ -1,5 +0,0 @@
{{- if not (.Get 0) -}}
{{- errorf "Expected icon name: %s" .Position -}}
{{- else -}}
{{- partial "assets/icon.html" (dict "icon" (printf "fas %s" (delimit .Params " "))) }}
{{- end -}}

View File

@@ -0,0 +1,68 @@
{{- /*
Source: https://github.com/twbs/bootstrap/blob/main/site/layouts/shortcodes/scss-docs.html
Usage: `file path="path/to/filename" lang="lang" show="true" full="true"`
Prints the full content of any given file supported by the Chroma syntax highlighter.
*/ -}}
{{- $basePath := .Site.Params.docs.basePath -}}
{{- $file := .Get "path" }}
{{- if hasPrefix $file "./" -}}
{{- $file = path.Clean $file -}}
{{- else -}}
{{- $file = path.Join $basePath (path.Clean $file) -}}
{{- end -}}
{{- $extension := strings.TrimLeft "." (path.Ext $file) }}
{{- $lang := .Get "lang" | default $extension -}}
{{- $id := printf "docs-collapse-%d" .Ordinal -}}
{{ $supportedFlags := slice "true" "false" -}}
{{ $showParam := "true" -}}
{{ $show := true -}}
{{ with .Get "show" }}{{ $showParam = . }}{{ end -}}
{{ if in $supportedFlags $showParam -}}
{{ if eq $showParam "true" }}{{ $show = true }}{{ else }}{{ $show = false }}{{ end -}}
{{ else -}}
{{ errorf "Invalid value for param 'show': %s" $showParam -}}
{{ end -}}
{{ $fullParam := "true" -}}
{{ $full := true -}}
{{ with .Get "full" }}{{ $fullParam = . }}{{ end -}}
{{ if in $supportedFlags $fullParam -}}
{{ if eq $fullParam "true" }}{{ $full = true }}{{ else }}{{ $full = false }}{{ end -}}
{{ else -}}
{{ errorf "Invalid value for param 'full': %s" $fullParam -}}
{{ end -}}
{{- /* If any parameters are missing, print an error and exit */ -}}
{{- if not $file -}}
{{- errorf "%s: %q: Missing required parameters! Got: path=%q!" .Position .Name $file -}}
{{- else -}}
{{- /* Force-check if the file exists */ -}}
{{ $tmp := os.Stat $file }}
{{- $content := readFile $file -}}
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link active font-monospace"
href="#body-{{ $id }}"
aria-current="page"
data-bs-toggle="collapse"
data-bs-target=".multi-{{ $id }}"
aria-expanded="false"
aria-controls="body-{{ $id }} footer-{{ $id }}">
<small>{{ if $full }}{{ strings.TrimPrefix $basePath $file }}{{ else }}{{ path.Base $file }}{{ end }}</small>
</a>
</li>
</ul>
<div class="border-start border-end border-bottom mb-3">
<div class="collapse multi-{{ $id }}{{ if $show }} show{{ end }} syntax-highlight" id="body-{{ $id }}">
{{- highlight (trim $content "\r\n") $lang "" -}}
</div>
<div class="collapse multi-{{ $id }}{{ if not $show }} show{{ end }} p-3" id="footer-{{ $id }}"><i>...</i></div>
</div>
{{- end -}}

166
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@gethinode/hinode",
"version": "0.16.0-beta",
"version": "0.16.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@gethinode/hinode",
"version": "0.16.0-beta",
"version": "0.16.2",
"license": "MIT",
"devDependencies": {
"@fortawesome/fontawesome-free": "^6.4.0",
@@ -23,6 +23,7 @@
"markdownlint-cli2": "^0.8.1",
"postcss-cli": "^10.1.0",
"purgecss-whitelister": "^2.4.0",
"replace-in-files-cli": "^2.2.0",
"rimraf": "^5.0.0",
"shx": "^0.3.4",
"stylelint": "^15.6.0",
@@ -3552,6 +3553,12 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
"dev": true
},
"node_modules/is-weakref": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
@@ -5545,6 +5552,84 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/replace-in-files-cli": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/replace-in-files-cli/-/replace-in-files-cli-2.2.0.tgz",
"integrity": "sha512-EI2Psum9Ay9y2IDWx36+hOvn+BX6LdQ8HXZ06L32obGrJb9w7YDMTywIQgysOXwQo5MsORtIA4l/g25r2Cp1gA==",
"dev": true,
"dependencies": {
"escape-string-regexp": "^5.0.0",
"globby": "^12.0.2",
"meow": "^10.1.1",
"normalize-path": "^3.0.0",
"write-file-atomic": "^3.0.3"
},
"bin": {
"replace-in-files": "cli.js"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/replace-in-files-cli/node_modules/array-union": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz",
"integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==",
"dev": true,
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/replace-in-files-cli/node_modules/escape-string-regexp": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
"integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
"dev": true,
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/replace-in-files-cli/node_modules/globby": {
"version": "12.2.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz",
"integrity": "sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==",
"dev": true,
"dependencies": {
"array-union": "^3.0.1",
"dir-glob": "^3.0.1",
"fast-glob": "^3.2.7",
"ignore": "^5.1.9",
"merge2": "^1.4.1",
"slash": "^4.0.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/replace-in-files-cli/node_modules/write-file-atomic": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
"integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
"dev": true,
"dependencies": {
"imurmurhash": "^0.1.4",
"is-typedarray": "^1.0.0",
"signal-exit": "^3.0.2",
"typedarray-to-buffer": "^3.1.5"
}
},
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -6643,6 +6728,15 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/typedarray-to-buffer": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
"integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
"dev": true,
"dependencies": {
"is-typedarray": "^1.0.0"
}
},
"node_modules/uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
@@ -9381,6 +9475,12 @@
"has-symbols": "^1.0.2"
}
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==",
"dev": true
},
"is-weakref": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
@@ -10710,6 +10810,59 @@
"functions-have-names": "^1.2.2"
}
},
"replace-in-files-cli": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/replace-in-files-cli/-/replace-in-files-cli-2.2.0.tgz",
"integrity": "sha512-EI2Psum9Ay9y2IDWx36+hOvn+BX6LdQ8HXZ06L32obGrJb9w7YDMTywIQgysOXwQo5MsORtIA4l/g25r2Cp1gA==",
"dev": true,
"requires": {
"escape-string-regexp": "^5.0.0",
"globby": "^12.0.2",
"meow": "^10.1.1",
"normalize-path": "^3.0.0",
"write-file-atomic": "^3.0.3"
},
"dependencies": {
"array-union": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz",
"integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==",
"dev": true
},
"escape-string-regexp": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz",
"integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==",
"dev": true
},
"globby": {
"version": "12.2.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz",
"integrity": "sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==",
"dev": true,
"requires": {
"array-union": "^3.0.1",
"dir-glob": "^3.0.1",
"fast-glob": "^3.2.7",
"ignore": "^5.1.9",
"merge2": "^1.4.1",
"slash": "^4.0.0"
}
},
"write-file-atomic": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
"integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
"dev": true,
"requires": {
"imurmurhash": "^0.1.4",
"is-typedarray": "^1.0.0",
"signal-exit": "^3.0.2",
"typedarray-to-buffer": "^3.1.5"
}
}
}
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -11498,6 +11651,15 @@
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
"dev": true
},
"typedarray-to-buffer": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
"integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
"dev": true,
"requires": {
"is-typedarray": "^1.0.0"
}
},
"uc.micro": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",

View File

@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.16.0-beta",
"version": "0.16.2",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
@@ -19,7 +19,7 @@
"scripts": {
"prestart": "npm run clean && npm run mod:vendor",
"start": "hugo server --bind=0.0.0.0 --disableFastRender",
"start:prod": "hugo server --bind=0.0.0.0 --disableFastRender -e production",
"start:prod": "hugo server --bind=0.0.0.0 --disableFastRender --printI18nWarnings -e production",
"prebuild": "npm run clean",
"build": "hugo --gc --minify",
"build:debug": "hugo -e debug --debug",
@@ -39,9 +39,10 @@
"env": "hugo env",
"precheck": "npm version",
"check": "hugo version",
"create:syntax": "npm run -s create:syntax-light & npm run -s create:syntax-dark",
"create:syntax": "npm run -s create:syntax-light & npm run -s create:syntax-dark && npm run -s update:syntax-dark",
"create:syntax-light": "hugo gen chromastyles --style=github > ./assets/scss/components/_syntax-light.scss",
"create:syntax-dark": "hugo gen chromastyles --style=github-dark > ./assets/scss/components/_syntax-dark.scss",
"update:syntax-dark": "replace-in-files --string=\"#ffffcc\" --replacement=\"#b8b800\" ./assets/scss/components/_syntax-dark.scss",
"upgrade": "npx npm-check-updates -u"
},
"repository": {
@@ -69,6 +70,7 @@
"markdownlint-cli2": "^0.8.1",
"postcss-cli": "^10.1.0",
"purgecss-whitelister": "^2.4.0",
"replace-in-files-cli": "^2.2.0",
"rimraf": "^5.0.0",
"shx": "^0.3.4",
"stylelint": "^15.6.0",