Compare commits

...

17 Commits

Author SHA1 Message Date
Mark Dumay
6283970443 Merge pull request #1158 from gethinode/develop
Fix deprecation warnings
2024-09-04 14:43:06 +02:00
Mark Dumay
200ca109b1 Merge branch 'main' into develop 2024-09-04 14:36:00 +02:00
Mark Dumay
acded37e83 Use css.PostCSS instead of deprecated resources.PostCSS 2024-09-04 14:35:21 +02:00
Mark Dumay
782a40e1e8 Use pagerSize instead of deprecated pagination key 2024-09-04 14:35:16 +02:00
Mark Dumay
7b2bb803b3 Merge pull request #1157 from gethinode/develop
Support table render hook
2024-09-04 14:25:44 +02:00
Mark Dumay
0e0561b081 Merge branch 'main' into develop 2024-09-04 14:18:14 +02:00
Mark Dumay
e3cf2e1337 Support table render hook
Fixes #1156
2024-09-04 14:17:45 +02:00
github-actions[bot]
c18316250b Merge pull request #1153 from gethinode/dependabot/npm_and_yarn/hugo-bin-0.131.0
Bump hugo-bin from 0.130.1 to 0.131.0
2024-09-04 07:09:54 +00:00
Mark Dumay
29a8666d7d Merge branch 'main' into dependabot/npm_and_yarn/hugo-bin-0.131.0 2024-09-04 08:06:53 +02:00
Mark Dumay
431125e46c Merge pull request #1155 from gethinode/develop
Support type hstring.HTML introduced in Hugo v0.134.0
2024-09-04 08:06:41 +02:00
Mark Dumay
dae6541185 Merge branch 'main' into develop 2024-09-04 07:56:38 +02:00
Mark Dumay
41d0edb6c1 Support type hstring.HTML introduced in Hugo v0.134.0 2024-09-04 07:55:45 +02:00
Mark Dumay
5d9d11c388 Merge pull request #1154 from gethinode/hugo-mod-dependencies
Update Hugo module dependencies
2024-09-04 07:52:26 +02:00
markdumay
3b26c04bdd fix: update Hugo module dependencies 2024-09-04 03:05:46 +00:00
dependabot[bot]
01d41ae38e Bump hugo-bin from 0.130.1 to 0.131.0
Bumps [hugo-bin](https://github.com/fenneclab/hugo-bin) from 0.130.1 to 0.131.0.
- [Release notes](https://github.com/fenneclab/hugo-bin/releases)
- [Commits](https://github.com/fenneclab/hugo-bin/compare/v0.130.1...v0.131.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>
2024-09-03 13:53:26 +00:00
github-actions[bot]
22d5859432 Merge pull request #1152 from gethinode/dependabot/npm_and_yarn/eslint-plugin-import-2.30.0
Bump eslint-plugin-import from 2.29.1 to 2.30.0
2024-09-03 13:52:15 +00:00
dependabot[bot]
551b185dd9 Bump eslint-plugin-import from 2.29.1 to 2.30.0
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.29.1 to 2.30.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.29.1...v2.30.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-03 13:47:25 +00:00
15 changed files with 597 additions and 288 deletions

View File

@@ -1,7 +1,6 @@
# toml-docs-start main
title = "Hinode"
copyright = "Copyright © 2024 Mark Dumay."
paginate = 9
enableGitInfo = true
# toml-docs-end main
@@ -49,6 +48,9 @@ home = ["HTML", "RSS", "REDIR"]
[taxonomies]
tag = 'tags'
[pagination]
pagerSize = 9
[privacy]
[privacy.vimeo]
disabled = false
@@ -95,7 +97,7 @@ home = ["HTML", "RSS", "REDIR"]
[module]
[module.hugoVersion]
extended = true
min = "0.132.0"
min = "0.134.0"
max = ""
[[module.mounts]]
source = "archetypes"

View File

@@ -112,7 +112,8 @@ arguments:
title:
type:
- string
- 'hstring.RenderedString'
- hstring.RenderedString
- hstring.HTML
optional: true
comment: Alternate text of the image.
caption:

View File

@@ -72,6 +72,7 @@ arguments:
- string
- template.HTML
- hstring.RenderedString
- hstring.HTML
optional: true
group: partial
comment: Link description.

View File

@@ -1,7 +1,6 @@
resourcedir = '../resources/'
title = "Hinode"
copyright = "Copyright © 2024 Mark Dumay."
paginate = 9
enableGitInfo = true
# additional settings
@@ -39,6 +38,9 @@ home = ["HTML", "RSS", "REDIR"]
[taxonomies]
tag = 'tags'
[pagination]
pagerSize = 9
[privacy]
[privacy.vimeo]
disabled = false

2
go.mod
View File

@@ -11,7 +11,7 @@ require (
github.com/gethinode/mod-leaflet v1.1.1 // indirect
github.com/gethinode/mod-lottie v1.5.7 // indirect
github.com/gethinode/mod-simple-datatables v1.0.8 // indirect
github.com/gethinode/mod-utils/v2 v2.5.0 // indirect
github.com/gethinode/mod-utils/v2 v2.5.2 // 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

@@ -268,6 +268,8 @@ github.com/gethinode/mod-utils/v2 v2.4.0 h1:mmG4hWaeA4krAg933pibH+TrjFmPHkAi/DUb
github.com/gethinode/mod-utils/v2 v2.4.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
github.com/gethinode/mod-utils/v2 v2.5.0 h1:9QboNU9KTpmJDS9JBjxavbknLVBJilocqo5KhC2FdME=
github.com/gethinode/mod-utils/v2 v2.5.0/go.mod h1:GTYeknoLujNjfDxI+V9Dcug26CYJSTJ0B/U2dagw9oY=
github.com/gethinode/mod-utils/v2 v2.5.2 h1:URGTpJo0dN4/oF2yL6o2d2pkcSlG1F0hgIF9UqpIs/E=
github.com/gethinode/mod-utils/v2 v2.5.2/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

@@ -2,11 +2,16 @@
"htmlElements": {
"tags": [
"a",
"blockquote",
"body",
"button",
"code",
"div",
"em",
"footer",
"form",
"h2",
"h3",
"head",
"html",
"img",
@@ -20,13 +25,20 @@
"ol",
"p",
"path",
"pre",
"script",
"small",
"span",
"strong",
"svg",
"symbol",
"table",
"tbody",
"td",
"th",
"thead",
"title",
"tr",
"ul",
"use"
],
@@ -35,17 +47,29 @@
"align-items-center",
"align-self-center",
"align-self-end",
"anchor",
"ball",
"bg-body",
"bg-body-tertiary",
"bg-opacity-10",
"bg-primary",
"blockquote-alert",
"blockquote-alert-heading",
"blockquote-alert-important",
"border",
"border-0",
"border-bottom",
"border-none",
"border-primary",
"border-top",
"bottom-0",
"bottom-bar",
"breadcrumb",
"breadcrumb-item",
"btn",
"btn-close",
"btn-outline-primary",
"btn-outline-secondary",
"btn-primary",
"btn-social",
"card",
@@ -55,6 +79,7 @@
"card-title",
"card-zoom",
"checkbox",
"chroma",
"col",
"col-12",
"col-6",
@@ -70,12 +95,15 @@
"collapsed",
"container-fluid",
"container-xxl",
"d-block",
"d-flex",
"d-grid",
"d-inline",
"d-lg-block",
"d-md-block",
"d-md-none",
"d-none",
"data-table",
"display-1",
"display-4",
"emphasis",
@@ -85,6 +113,7 @@
"fa-2x",
"fa-book-open",
"fa-ellipsis",
"fa-exclamation",
"fa-face-frown",
"fa-facebook",
"fa-fw",
@@ -94,6 +123,7 @@
"fa-medium",
"fa-moon",
"fa-share-nodes",
"fa-sort",
"fa-sun",
"fa-whatsapp",
"fa-x-twitter",
@@ -102,6 +132,7 @@
"fixed-top",
"flex-column",
"flex-fill",
"font-monospace",
"footer",
"form-control",
"fs-3",
@@ -110,14 +141,20 @@
"fs-lg-5",
"fw-30",
"fw-bold",
"fw-semibold",
"g-4",
"gap-1",
"gap-2",
"h-100",
"h6",
"heading",
"highlight",
"hstack",
"img-fluid",
"img-wrap",
"invisible",
"is-search",
"justify-content-between",
"justify-content-center",
"justify-content-end",
"justify-content-start",
@@ -137,9 +174,12 @@
"ms-auto",
"ms-md-3",
"mt-3",
"mt-4",
"mt-5",
"mt-md-0",
"mx-auto",
"mx-md-0",
"my-2",
"my-auto",
"my-md-0",
"my-md-auto",
@@ -153,6 +193,7 @@
"navbar-fixed-top",
"navbar-mode-selector",
"navbar-nav",
"navbar-nav-scroll",
"navbar-toggler",
"no-js",
"order-0",
@@ -160,22 +201,30 @@
"order-md-0",
"order-md-1",
"p-0",
"p-1",
"p-2",
"p-3",
"p-4",
"pb-2",
"pb-3",
"pb-4",
"pb-5",
"pb-md-0",
"pe-3",
"position-fixed",
"position-relative",
"ps-1",
"pt-4",
"ps-3",
"pt-5",
"pt-md-3",
"px-4",
"px-xxl-0",
"py-1",
"py-3",
"rounded",
"rounded-2",
"rounded-bottom",
"rounded-top",
"row",
"row-cols-1",
"row-cols-2",
@@ -192,6 +241,22 @@
"sticky-top",
"stretched-link",
"svg-inline--fa",
"syntax-highlight",
"table",
"table-bordered",
"table-borderless",
"table-hover",
"table-responsive",
"table-responsive-lg",
"table-responsive-md",
"table-responsive-sm",
"table-responsive-xl",
"table-responsive-xxl",
"table-sm",
"table-striped",
"table-striped-columns",
"table-success",
"text-body",
"text-body-secondary",
"text-center",
"text-decoration-none",
@@ -206,13 +271,25 @@
"toast-container",
"toast-header",
"toc",
"toc-button",
"toc-panel",
"toc-sidebar",
"toggler-icon",
"top-bar"
],
"ids": [
"TableOfContents",
"accented-tables",
"aligned-cells-and-headers",
"always-responsive",
"basic-tables",
"blogs",
"bordered-tables",
"breakpoint-specific",
"btn-webshare",
"colored-tables",
"data-tables",
"default-alignment",
"fa-face-frown",
"fab-facebook",
"fab-github",
@@ -222,16 +299,26 @@
"fab-x-twitter",
"fas-book-open",
"fas-ellipsis",
"fas-exclamation",
"fas-link",
"fas-moon",
"fas-share-nodes",
"fas-sort",
"fas-sun",
"hoverable-rows",
"navbar-0-collapse",
"navbar-mode",
"navbar-mode-checkbox",
"responsive-tables",
"small-tables",
"striped-columns",
"striped-rows",
"table-borders",
"tables-without-borders",
"toast-container",
"toast-copied-code-message",
"toast-message-email-4"
"toast-message-email-4",
"toc-collapse"
]
}
}

View File

@@ -0,0 +1,40 @@
{{/* Adapted from https://gohugo.io/render-hooks/tables/ */}}
<!-- Ensure presence of `.table` class attribute to trigger Bootstrap styling -->
{{ $attr := .Attributes }}
{{ $class := split $attr.class " " }}
{{ if not (in $class "table") }}
{{ $attr = merge $attr (dict "class" (trim (delimit ($class | append "table") " ") " ")) }}
{{ end }}
{{ $align := dict "left" "start" "center" "center" "right" "end" }}
<table
{{- range $k, $v := $attr }}
{{- if $v }}
{{- printf " %s=%q" $k $v | safeHTMLAttr }}
{{- end }}
{{- end }}>
<thead>
{{- range .THead }}
<tr>
{{- range . }}
<th {{ with .Alignment }}class="text-{{ index $align . }}"{{ end }}>
{{- .Text -}}
</th>
{{- end }}
</tr>
{{- end }}
</thead>
<tbody>
{{- range .TBody }}
<tr>
{{- range . }}
<td {{ with .Alignment }}class="text-{{ index $align . }}"{{ end }}>
{{- .Text -}}
</td>
{{- end }}
</tr>
{{- end }}
</tbody>
</table>

View File

@@ -51,7 +51,7 @@
{{ else }}
{{ $paginator = $page.Paginate $pages }}
{{ end }}
{{ $pages = first $paginator.PageSize (after (mul (sub $paginator.PageNumber 1) $paginator.PageSize) $pages) }}
{{ $pages = first $paginator.PagerSize (after (mul (sub $paginator.PageNumber 1) $paginator.PagerSize) $pages) }}
{{ end }}
{{ $cardWrapper := "" }}

View File

@@ -24,19 +24,17 @@
{{- $class := delimit $main " " -}}
{{ if or $sortable $paging $searchable }}{{ $class = trim (printf "%s data-table" $class) " " }}{{ end }}
{{- $input := $input | $page.RenderString }}
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
{{ $regex := `<table\s*class="(.+?)"` }}
{{ $current := (index (index (findRESubmatch $regex $input) 0) 1) }}
{{ $target := delimit (((split $current " ") | append "table" | append $class) | uniq) " " }}
{{ $attributes := "" }}
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
{{ if $paging }}{{ $attributes = printf "%s data-table-paging=true" $attributes }}{{ end }}
{{ if $searchable }}{{ $attributes = printf "%s data-table-searchable=true" $attributes }}{{ end }}
{{- $old := "<table>" -}}
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
{{ $input := replace $input $old $new -}}
{{- $new := printf `<table class="%s" %s` $target (trim $attributes " ") -}}
{{ $input := replaceRE $regex $new $input 1 -}}
{{- with $responsive }}<div class="{{ delimit . " " }}">{{ end -}}
{{ $input | safeHTML }}
{{- with $responsive }}</div>{{ end -}}

View File

@@ -73,7 +73,7 @@
{{ end }}
{{- if site.Params.style.purge -}}
{{- $post_options := dict "config" "config" "noMap" hugo.IsProduction -}}
{{- $css = $css | resources.PostCSS $post_options -}}
{{- $css = $css | css.PostCSS $post_options -}}
{{- end -}}
{{- if not hugo.IsProduction -}}

View File

@@ -31,19 +31,20 @@
<!-- Main code -->
{{ if or $sortable $paging $searchable }}{{ $class = trim (printf "%s data-table" $class) " " }}{{ end }}
{{- $input := .Inner | .Page.RenderString }}
{{- $input = replace $input "style=\"text-align:left\"" "class=\"text-start\"" -}}
{{- $input = replace $input "style=\"text-align:center\"" "class=\"text-center\"" -}}
{{- $input = replace $input "style=\"text-align:right\"" "class=\"text-end\"" -}}
{{ $regex := `<table\s*class="(.+?)"` }}
{{ $current := (index (index (findRESubmatch $regex $input) 0) 1) }}
{{ $target := delimit (((split $current " ") | append "table" | append $class) | uniq) " " }}
{{ $attributes := "" }}
{{ if $sortable }}{{ $attributes = printf "%s data-table-sortable=true" $attributes }}{{ end }}
{{ if $paging }}{{ $attributes = printf "%s data-table-paging=true" $attributes }}{{ end }}
{{ if $searchable }}{{ $attributes = printf "%s data-table-searchable=true" $attributes }}{{ end }}
{{- $old := "<table>" -}}
{{- $new := printf "<table class=\"table %s\" %s>" $class (trim $attributes " ") -}}
{{ $input := replace $input $old $new -}}
{{- $new := printf `<table class="%s" %s` $target (trim $attributes " ") -}}
{{ $input := replaceRE $regex $new $input 1 -}}
{{ if not $error }}
{{ if eq $breakpoint "none" }}
{{ $input | safeHTML }}

697
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.26.6",
"version": "0.26.7",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
@@ -71,14 +71,14 @@
"autoprefixer": "^10.4.20",
"cssnano": "^7.0.5",
"cssnano-preset-advanced": "^7.0.5",
"hugo-bin": "0.130.1",
"hugo-bin": "0.131.0",
"purgecss-whitelister": "^2.4.0"
},
"devDependencies": {
"@gethinode/netlify-plugin-dartsass": "^0.3.0",
"eslint": "^8.57.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^6.6.0",
"markdownlint-cli2": "^0.13.0",

View File

@@ -6,7 +6,7 @@ homepage = "https://gethinode.com"
demosite = "https://demo.gethinode.com"
tags = ["blog", "documentation", "minimal", "modern", "customizable", "search", "bootstrap"]
features = ["security aware", "fast by default", "seo-ready", "development tools", "bootstrap framework", "netlify-ready", "full text search", "page layouts", "versioned documentation"]
min_version = "0.132.0"
min_version = "0.134.0"
[author]
name = "Mark Dumay"