Compare commits

..

19 Commits

Author SHA1 Message Date
Mark Dumay
e70f3acb57 Merge pull request #1475 from gethinode/develop
Refine arguments
2025-06-23 13:04:14 +02:00
Mark Dumay
6e7b40ad0f Remove redundant file example 2025-06-23 12:57:35 +02:00
Mark Dumay
7446b2958e Merge branch 'main' into develop 2025-06-23 12:49:20 +02:00
Mark Dumay
6c18ada352 Update build stats 2025-06-23 12:48:42 +02:00
Mark Dumay
323b42996b Fix titleCase setting 2025-06-23 12:44:20 +02:00
Mark Dumay
ab8074b293 Update dependencies 2025-06-23 12:42:33 +02:00
Mark Dumay
9419e18ba9 Update file arguments 2025-06-23 12:42:27 +02:00
Mark Dumay
0f007ba5c2 Update articles arguments 2025-06-23 12:42:02 +02:00
Mark Dumay
7d0943fb0c Fix deprecated video arguments 2025-06-23 12:41:36 +02:00
Mark Dumay
3d2cfdaf0a Support title case for structured type headers 2025-06-23 12:41:17 +02:00
Mark Dumay
281c16b561 Refine card group arguments 2025-06-23 12:40:51 +02:00
Mark Dumay
fe68bd6be3 Simplify rendering of page modification date 2025-06-23 12:39:35 +02:00
Mark Dumay
3bf0c241a3 Update dependencies 2025-06-23 11:51:12 +02:00
Mark Dumay
a6a670cd2b Bump package release 2025-06-23 11:51:03 +02:00
Mark Dumay
a44b5449f8 Merge pull request #1472 from gethinode/develop
Fix handling of card parent arguments
2025-06-20 11:58:37 +02:00
Mark Dumay
461f53c67e Merge branch 'main' into develop 2025-06-20 11:52:23 +02:00
Mark Dumay
9a5059d8bd Fix handling of card parent arguments 2025-06-20 11:48:08 +02:00
Mark Dumay
c1586ee00e Bump package release 2025-06-20 11:01:50 +02:00
Mark Dumay
88d2a50954 Simplify page layout structure 2025-06-20 11:01:18 +02:00
27 changed files with 103 additions and 140 deletions

View File

@@ -29,7 +29,7 @@ blueprint:
link:
cols:
padding:
max:
limit:
pagination:
paginate:
background:

View File

@@ -69,7 +69,7 @@
{{- $params = merge $params (dict
"page" page
"list" $pages
"max" $args.max
"limit" $args.limit
"cols" $args.cols
"icon-rounded" $args.iconRounded
"href" (cond $moreButton $moreLink "")

View File

@@ -10,10 +10,10 @@
footerBelowFold = false
loading = "lazy"
breakpoint = "md"
titleCase = false
[main.padding]
x = 4
y = 4
titleCase = false
[main.internalLinks]
validate = true
pretty = false

View File

@@ -22,7 +22,8 @@ arguments:
release: 1.0.0
list:
cards:
max:
limit:
release: v1.0.0
cols:
release: v0.19.0
paginate:
@@ -158,3 +159,12 @@ arguments:
group: partial
deprecated: v1.0.0
alternative: href-title
max:
type: int
optional: true
comment: Maximum number of elements to display.
group: partial
options:
min: 1
deprecated: v1.0.0
alternative: limit

View File

@@ -11,8 +11,8 @@ arguments:
full:
id:
class:
options:
release: v0.27.6
highlight-options:
release: v1.0.0
# deprecated arguments
path:
type: string
@@ -22,3 +22,11 @@ arguments:
the path of the repository is used as base path instead.
deprecated: v1.0.0
alternative: file
options:
type: string
optional: true
comment: >-
Hugo highlighting options, see https://gohugo.io/shortcodes/highlight/#options-1.
release: v0.27.6
deprecated: v1.0.0
alternative: highlight-options

View File

@@ -31,6 +31,11 @@ arguments:
deprecated: v1.0.0
alternative: media-id
options:
type: string
optional: true
comment: >-
Optional query parameters to append to video asset's url. The query string
is prepended with a `?` symbol. Only applicable to Cloudinary.
release: v0.28.2
deprecated: v1.0.0
alternative: query-args

View File

@@ -8,10 +8,10 @@
footerBelowFold = false
loading = "lazy"
breakpoint = "md"
titleCase = true
[main.padding]
x = 4
y = 4
titleCase = true
[main.internalLinks]
validate = true
pretty = true

View File

@@ -37,7 +37,7 @@ content_blocks:
more:
title: More Posts
padding: 0
max: 3
limit: 3
class: border-0 card-zoom card-body-margin
- _bookshop_name: articles
@@ -55,7 +55,7 @@ content_blocks:
title: More articles
cols: 1
padding: 4
max: 2
limit: 2
header-style: none
footer-style: tags
orientation: horizontal-sm

View File

@@ -27,7 +27,7 @@ content_blocks:
title: More Posts
cols: 3
padding: 0
max: 9
limit: 9
paginate: true
cover: false
header-style: none

View File

@@ -26,12 +26,12 @@ The `articles` content block renders a group of article cards.
more:
title: More Blogs
padding: 0
max: 3
limit: 3
background:
color: primary
subtle: true
class: border-0 card-zoom card-body-margin
justify: center
justify: start
```
{{< /example-bookshop >}}

View File

@@ -252,8 +252,6 @@ Use the `file` shortcode to print and highlight the full content of a given inpu
{{< /example >}}
<!-- markdownlint-enable MD037 -->
{{< file full="false" file="./config/_default/languages.toml" id="file-collapse-5" >}}
## Icon
As an example, the following shortcodes show a square check, a brand logo, a circle check, and a custom icon.

View File

@@ -119,27 +119,15 @@
"breadcrumb-item",
"btn",
"btn-close",
"btn-danger",
"btn-dark",
"btn-group",
"btn-info",
"btn-lg",
"btn-light",
"btn-link",
"btn-outline-danger",
"btn-outline-dark",
"btn-outline-info",
"btn-outline-light",
"btn-outline-primary",
"btn-outline-secondary",
"btn-outline-success",
"btn-outline-warning",
"btn-primary",
"btn-secondary",
"btn-sm",
"btn-social",
"btn-success",
"btn-warning",
"btn-xs",
"card",
"card-block-2",
@@ -147,6 +135,7 @@
"card-body-link",
"card-body-margin",
"card-button",
"card-button-link",
"card-container",
"card-container-wrapper",
"card-emphasize",
@@ -197,7 +186,6 @@
"col-sm-12",
"col-sm-3",
"col-sm-6",
"col-sm-8",
"collapse",
"collapsed",
"container",
@@ -219,7 +207,6 @@
"d-sm-block",
"d-sm-none",
"data-table",
"disabled",
"display-1",
"display-4",
"dropdown",
@@ -243,29 +230,24 @@
"fa-angle-left",
"fa-arrow-left",
"fa-arrow-right",
"fa-book-open",
"fa-bootstrap",
"fa-check",
"fa-chevron-right",
"fa-circle",
"fa-circle-check",
"fa-circle-play",
"fa-circle-question",
"fa-code",
"fa-display",
"fa-divide",
"fa-docker",
"fa-ellipsis",
"fa-face-frown",
"fa-facebook",
"fa-fluid",
"fa-font-awesome",
"fa-fw",
"fa-github",
"fa-globe",
"fa-grip",
"fa-h",
"fa-hand-pointer",
"fa-heart",
"fa-house",
"fa-info",
@@ -273,14 +255,11 @@
"fa-link",
"fa-linkedin",
"fa-magnifying-glass",
"fa-markdown",
"fa-medium",
"fa-moon",
"fa-robot",
"fa-rocket",
"fa-rotate-90",
"fa-share-nodes",
"fa-sitemap",
"fa-sort",
"fa-square-check",
"fa-stack",
@@ -288,7 +267,6 @@
"fa-stack-2x",
"fa-sun",
"fa-timeline",
"fa-trash-can",
"fa-up-right-from-square",
"fa-whatsapp",
"fa-wrapper",
@@ -345,12 +323,9 @@
"img-wrap",
"invisible",
"is-search",
"justify-content-around",
"justify-content-between",
"justify-content-center",
"justify-content-end",
"justify-content-evenly",
"justify-content-md-end",
"justify-content-md-start",
"justify-content-start",
"katex",
@@ -391,8 +366,7 @@
"mt-auto",
"mt-md-0",
"multi-docs-collapse-15",
"multi-docs-collapse-19",
"multi-docs-collapse-20",
"multi-docs-collapse-16",
"multi-file-collapse-1",
"multi-file-collapse-5",
"mx-auto",
@@ -421,8 +395,6 @@
"navbar-toggler",
"next",
"no-js",
"offset-md-4",
"offset-sm-2",
"order-0",
"order-1",
"order-first",
@@ -523,7 +495,6 @@
"text-decoration-none",
"text-end",
"text-info",
"text-md-end",
"text-muted",
"text-nowrap",
"text-primary",
@@ -601,19 +572,13 @@
"block-diagram",
"blog",
"body-docs-collapse-15",
"body-docs-collapse-19",
"body-docs-collapse-20",
"body-docs-collapse-16",
"body-file-collapse-1",
"body-file-collapse-5",
"bouton",
"breadcrumb",
"build-a-static-website-fast-and-flexible",
"button",
"button-group",
"buttons-with-a-badge",
"buttons-with-a-collapsible-panel",
"buttons-with-a-tooltip",
"buttons-with-an-icon",
"c4-diagram",
"card",
"card-group",
@@ -626,7 +591,6 @@
"cloudinary",
"collapse",
"collapse-1",
"colored-buttons",
"command-prompt",
"comment-nous-partageons-vos-informations",
"comment-utilisons-nous-les-cookies-",
@@ -635,78 +599,50 @@
"cookies-etc",
"custom-activity",
"data-tables",
"developer-friendly-and-secure",
"docs",
"documentation",
"elements-type",
"entity-relationship-diagram",
"example",
"examples",
"exemple",
"fa-address-card",
"fa-face-frown",
"fa-font-awesome",
"fa-hand-pointer",
"fa-square-check",
"fab-bootstrap",
"fab-docker",
"fab-facebook",
"fab-github",
"fab-linkedin",
"fab-markdown",
"fab-medium",
"fab-whatsapp",
"fab-x-twitter",
"faq-03262a038417e1bab3887f63db7d440f",
"faq-03262a038417e1bab3887f63db7d440f-heading-faq-03262a038417e1bab3887f63db7d440f",
"faq-03262a038417e1bab3887f63db7d440f-item-0",
"faq-03262a038417e1bab3887f63db7d440f-item-1",
"faq-03262a038417e1bab3887f63db7d440f-item-2",
"faq-516ddc5b7dd16bc24b857082a9aab4ed",
"faq-516ddc5b7dd16bc24b857082a9aab4ed-heading-faq-516ddc5b7dd16bc24b857082a9aab4ed",
"faq-516ddc5b7dd16bc24b857082a9aab4ed-item-0",
"faq-516ddc5b7dd16bc24b857082a9aab4ed-item-1",
"faq-516ddc5b7dd16bc24b857082a9aab4ed-item-2",
"faq-56ff67870957c4eb63627fad0245b8b7",
"faq-56ff67870957c4eb63627fad0245b8b7-heading-faq-56ff67870957c4eb63627fad0245b8b7",
"faq-56ff67870957c4eb63627fad0245b8b7-item-0",
"faq-56ff67870957c4eb63627fad0245b8b7-item-1",
"faq-56ff67870957c4eb63627fad0245b8b7-item-2",
"faq-a65942a4e80d8b9331232f2839b0b404",
"faq-a65942a4e80d8b9331232f2839b0b404-heading-faq-a65942a4e80d8b9331232f2839b0b404",
"faq-a65942a4e80d8b9331232f2839b0b404-item-0",
"faq-a65942a4e80d8b9331232f2839b0b404-item-1",
"faq-a65942a4e80d8b9331232f2839b0b404-item-2",
"faq-b7d43cad454395dd12765b2970e95cbc",
"faq-b7d43cad454395dd12765b2970e95cbc-heading-faq-b7d43cad454395dd12765b2970e95cbc",
"faq-b7d43cad454395dd12765b2970e95cbc-item-0",
"faq-b7d43cad454395dd12765b2970e95cbc-item-1",
"faq-b7d43cad454395dd12765b2970e95cbc-item-2",
"faq-c411b9f9b15c4b7a1a0d1de458f85fc9",
"faq-c411b9f9b15c4b7a1a0d1de458f85fc9-heading-faq-c411b9f9b15c4b7a1a0d1de458f85fc9",
"faq-c411b9f9b15c4b7a1a0d1de458f85fc9-item-0",
"faq-c411b9f9b15c4b7a1a0d1de458f85fc9-item-1",
"faq-c411b9f9b15c4b7a1a0d1de458f85fc9-item-2",
"faq-e6bc2b3599e2d94773085876d5822076",
"faq-e6bc2b3599e2d94773085876d5822076-heading-faq-e6bc2b3599e2d94773085876d5822076",
"faq-e6bc2b3599e2d94773085876d5822076-item-0",
"faq-e6bc2b3599e2d94773085876d5822076-item-1",
"faq-e6bc2b3599e2d94773085876d5822076-item-2",
"faq-2ab61bd9d625ad933606ccabfaffa9a8",
"faq-2ab61bd9d625ad933606ccabfaffa9a8-heading-faq-2ab61bd9d625ad933606ccabfaffa9a8",
"faq-2ab61bd9d625ad933606ccabfaffa9a8-item-0",
"faq-2ab61bd9d625ad933606ccabfaffa9a8-item-1",
"faq-2ab61bd9d625ad933606ccabfaffa9a8-item-2",
"faq-471c32251ced209d707f5815bdaa693a",
"faq-471c32251ced209d707f5815bdaa693a-heading-faq-471c32251ced209d707f5815bdaa693a",
"faq-471c32251ced209d707f5815bdaa693a-item-0",
"faq-471c32251ced209d707f5815bdaa693a-item-1",
"faq-471c32251ced209d707f5815bdaa693a-item-2",
"faq-67dbd72b681a398b4c77f0f3652e0905",
"faq-67dbd72b681a398b4c77f0f3652e0905-heading-faq-67dbd72b681a398b4c77f0f3652e0905",
"faq-67dbd72b681a398b4c77f0f3652e0905-item-0",
"faq-67dbd72b681a398b4c77f0f3652e0905-item-1",
"faq-67dbd72b681a398b4c77f0f3652e0905-item-2",
"fas-1",
"fas-2",
"fas-3",
"fas-angle-left",
"fas-arrow-left",
"fas-arrow-right",
"fas-book-open",
"fas-check",
"fas-chevron-right",
"fas-circle",
"fas-circle-check",
"fas-circle-play",
"fas-circle-question",
"fas-code",
"fas-display",
"fas-divide",
"fas-ellipsis",
"fas-globe",
@@ -718,23 +654,18 @@
"fas-link",
"fas-magnifying-glass",
"fas-moon",
"fas-robot",
"fas-rocket",
"fas-share-nodes",
"fas-sitemap",
"fas-sort",
"fas-sun",
"fas-timeline",
"fas-trash-can",
"fas-up-right-from-square",
"fichier",
"fil-dariane",
"file",
"flexible--ready-to-use",
"flowchart",
"footer-docs-collapse-15",
"footer-docs-collapse-19",
"footer-docs-collapse-20",
"footer-docs-collapse-16",
"footer-file-collapse-1",
"footer-file-collapse-5",
"formula-katex",
@@ -791,11 +722,9 @@
"navbar-sample-collapse",
"navigation",
"notification",
"outlined-buttons",
"overview",
"persona",
"pie-chart",
"powered-by-open-source",
"projecten",
"projects",
"projets",
@@ -807,10 +736,8 @@
"réduire",
"security",
"sequence-diagram",
"sized-buttons",
"spinner",
"state-diagram",
"stateful-buttons",
"sub",
"sup",
"sécurité",

2
go.mod
View File

@@ -18,7 +18,7 @@ require (
github.com/gethinode/mod-simple-datatables v1.1.7 // indirect
github.com/gethinode/mod-simple-datatables/v2 v2.0.1 // indirect
github.com/gethinode/mod-utils/v3 v3.3.1 // indirect
github.com/gethinode/mod-utils/v4 v4.6.0 // indirect
github.com/gethinode/mod-utils/v4 v4.8.0 // indirect
github.com/nextapps-de/flexsearch v0.0.0-20250606060143-c28f52c09b7a // indirect
github.com/twbs/bootstrap v5.3.7+incompatible // indirect
)

4
go.sum
View File

@@ -440,6 +440,10 @@ github.com/gethinode/mod-utils/v4 v4.5.1 h1:VKmqi6+oC93noHUJ6HvFlelglHT/9+kXQjpJ
github.com/gethinode/mod-utils/v4 v4.5.1/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.6.0 h1:XQ7hiCrn15SzgkcD0j53XVZPQYeQKUxg/UUkr80pJ2w=
github.com/gethinode/mod-utils/v4 v4.6.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.7.0 h1:JaL/+APOwdEzAi6y174ZdwoguCdALyGiGX8qBVXXBdU=
github.com/gethinode/mod-utils/v4 v4.7.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
github.com/gethinode/mod-utils/v4 v4.8.0 h1:/+M3EHqA8IzgBWXX1GLmT/xKbk2FVhUwmUfMnk/goF4=
github.com/gethinode/mod-utils/v4 v4.8.0/go.mod h1:bYmvRdAo4ICy5MpSGafDvO4p5bTDpsDKFCPL3bH0mN4=
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

@@ -125,7 +125,9 @@
{{ if in (slice "types" "both") $args.renderType }}
{{ $prefix := strings.Repeat $args.headerLevel "#" }}
{{ range $k, $v := $types.udt }}
{{ printf "%s %s %s" $prefix $k (T "type") | $args.page.RenderString }}
{{ $title := $k }}
{{ if site.Params.main.titleCase }}{{ $title = title $title }}{{ end }}
{{ printf "%s %s %s" $prefix $title (T "type") | $args.page.RenderString }}
{{ partial "inline/args-table.html" (merge $params (dict "args" $v)) }}
{{ end }}
{{ end }}

View File

@@ -113,7 +113,7 @@
{{/* Limit list to max elements */}}
{{- $count := len $elements -}}
{{- $max := $count -}}
{{- $max = math.Min ($args.max | default $count) $count -}}
{{- $max = math.Min ((or $args.limit $args.max) | default $count) $count -}}
{{- if not $args.paginate -}}
{{- $elements = first $max $elements -}}
{{- end -}}

View File

@@ -203,9 +203,22 @@
{{- end -}}
<div class="{{ $col2 }}">
<div class="card-body d-flex p-{{ $args.padding }} flex-column h-100 flex-fill">
{{ if $page }}<div>{{ partial "inline/card-caption.html" (dict "page" $page "keywords" $args.headerStyle "color" $args.color) }}</div>{{ end }}
{{ if $page }}
<div>{{ partial "inline/card-caption.html" (dict
"page" $page
"keywords" $args.headerStyle
"color" $args.color
) }}
</div>
{{ end }}
<div class="flex-fill">
{{- partial "inline/card-body.html" (dict "title" $title "href" $href "color" $args.color "description" $description "button" $args.button) -}}
{{- partial "inline/card-body.html" (dict
"title" $title
"href" $href
"color" $args.color
"description" $description
"button" $args.button
) -}}
</div>
{{ if $page }}<div>{{ partial "inline/card-caption.html" (dict "page" $page "keywords" $args.footerStyle "color" $args.color) }}</div>{{ end }}
{{ if and $href $args.button }}

View File

@@ -33,10 +33,6 @@
{{ end }}
{{ else }}
{{- $thumbnail = $page.Params.Thumbnail -}}
{{ if or $page.Params.photoCredits $page.Params.photoSource }}
{{ warnf "DEPRECATED: frontmatter variables `photoCredits` and `photoSource` have been deprecated in release v0.18: %s" $page.RelPermalink }}
{{ end }}
{{- if and $page.Params.photoCredits $page.Params.PhotoSource }}{{ $credits = printf (T "photoFull") $page.Params.photoCredits $page.Params.PhotoSource }}{{ end -}}
{{- end -}}
{{ if $thumbnail -}}

View File

@@ -26,27 +26,27 @@
{{- $class := partial "utilities/GetArgParent" (dict "page" . "arg" "class" "merge" true) -}}
{{- $color := partial "utilities/GetArgParent" (dict "page" . "arg" "color") -}}
{{- $description := trim .Inner " \r\n" | .Page.RenderString | safeHTML -}}
{{- $footer := partial "utilities/GetArgParent" (dict "page" . "arg" "footer-style") | partial "utilities/GetArgParent" (dict "page" . "arg" "footer") | default "none" -}}
{{- $gutter := partial "utilities/GetArgParent" (dict "page" . "arg" "gutter") | default "0" -}}
{{- $header := partial "utilities/GetArgParent" (dict "page" . "arg" "header-style") | partial "utilities/GetArgParent" (dict "page" . "arg" "header") | default "full" -}}
{{- $footer := or (partial "utilities/GetArgParent" (dict "page" . "arg" "footer-style")) (partial "utilities/GetArgParent" (dict "page" . "arg" "footer")) -}}
{{- $gutter := partial "utilities/GetArgParent" (dict "page" . "arg" "gutter") -}}
{{- $header := or (partial "utilities/GetArgParent" (dict "page" . "arg" "header-style")) (partial "utilities/GetArgParent" (dict "page" . "arg" "header")) -}}
{{- $icon := .Get "icon" -}}
{{- $iconRounded := partial "utilities/GetArgParent" (dict "page" . "arg" "icon-rounded") | partial "utilities/GetArgParent" (dict "page" . "arg" "iconRounded") | default false -}}
{{- $align := partial "utilities/GetArgParent" (dict "page" . "arg" "align") | default "start" -}}
{{- $style := partial "utilities/GetArgParent" (dict "page" . "arg" "icon-style") | partial "utilities/GetArgParent" (dict "page" . "arg" "style") | default "" -}}
{{- $subtle := partial "utilities/GetArgParent" (dict "page" . "arg" "subtle") | default false -}}
{{- $iconRounded := or (partial "utilities/GetArgParent" (dict "page" . "arg" "icon-rounded")) (partial "utilities/GetArgParent" (dict "page" . "arg" "iconRounded")) -}}
{{- $align := partial "utilities/GetArgParent" (dict "page" . "arg" "align") -}}
{{- $style := or (partial "utilities/GetArgParent" (dict "page" . "arg" "icon-style")) (partial "utilities/GetArgParent" (dict "page" . "arg" "style")) -}}
{{- $subtle := partial "utilities/GetArgParent" (dict "page" . "arg" "subtle") -}}
{{- $loading := .Get "loading" -}}
{{- $orientation := partial "utilities/GetArgParent" (dict "page" . "arg" "orientation") | default "stacked" -}}
{{- $padding := partial "utilities/GetArgParent" (dict "page" . "arg" "padding") | default 3 -}}
{{- $ratio := partial "utilities/GetArgParent" (dict "page" . "arg" "ratio") | default "" -}}
{{- $orientation := partial "utilities/GetArgParent" (dict "page" . "arg" "orientation") -}}
{{- $padding := partial "utilities/GetArgParent" (dict "page" . "arg" "padding") -}}
{{- $ratio := partial "utilities/GetArgParent" (dict "page" . "arg" "ratio") -}}
{{- $page := .Page -}}
{{- $path := .Get "path" -}}
{{- $thumbnail := .Get "thumbnail" -}}
{{- $anchor := .Get "anchor" -}}
{{- $title := .Get "title" -}}
{{- $button := partial "utilities/GetArgParent" (dict "page" . "arg" "button") | default false -}}
{{- $linkType := partial "utilities/GetArgParent" (dict "page" . "arg" "link-type") | partial "utilities/GetArgParent" (dict "page" . "arg" "buttonType") | default "" -}}
{{- $cols := partial "utilities/GetArgParent" (dict "page" . "arg" "cols") | default 3 -}}
{{- $scroll := partial "utilities/GetArgParent" (dict "page" . "arg" "scroll") | default false -}}
{{- $button := partial "utilities/GetArgParent" (dict "page" . "arg" "button") -}}
{{- $linkType := or (partial "utilities/GetArgParent" (dict "page" . "arg" "link-type")) (partial "utilities/GetArgParent" (dict "page" . "arg" "buttonType")) -}}
{{- $cols := partial "utilities/GetArgParent" (dict "page" . "arg" "cols") -}}
{{- $scroll := partial "utilities/GetArgParent" (dict "page" . "arg" "scroll") -}}
{{- $wrapper := "" -}}
{{/* Override arguments */}}
@@ -66,7 +66,6 @@
{{ $wrapper = printf "card-block-%d p-0" $cols }}
{{ end }}
{{/* Main code */}}
{{ if not $error -}}
{{/* Render card */}}

View File

@@ -73,7 +73,7 @@
</ul>
<div class="border-start border-end border-bottom mb-3">
<div class="collapse multi-{{ $id }}{{ if $args.show }} show{{ end }} syntax-highlight" id="body-{{ $id }}">
{{- highlight (trim $content "\r\n") $lang $args.options -}}
{{- highlight (trim $content "\r\n") $lang (or $args.highlightOptions $args.options) -}}
</div>
<div class="collapse multi-{{ $id }}{{ if not $args.show }} show{{ end }} p-3" id="footer-{{ $id }}">
<a class="nav-link active"

View File

@@ -1,3 +1,3 @@
{{- partial "single/thumbnail.html" (dict "page" . "wrapper" "mb-5") -}}
{{- partial "page/thumbnail.html" (dict "page" . "wrapper" "mb-5") -}}
{{ partial "utilities/ProcessContent" (dict "page" .Page "raw" .RawContent) }}

View File

@@ -27,9 +27,10 @@
{{ if .Date }}
{{ $lastmodstr := (partial "utilities/date.html" (dict "date" .Lastmod "format" "long")) -}}
{{ $datestr := (partial "utilities/date.html" (dict "date" .Date "format" "long")) -}}
{{ $datestr | i18n "postedOnDate" -}}
{{ if eq $metadata "full" }}
{{ if ne $datestr $lastmodstr -}}&nbsp;({{ $lastmodstr | i18n "lastModified" }}){{ end }}
{{ if gt .Lastmod .Date }}
{{ $lastmodstr | i18n "lastModified" }}
{{ else }}
{{ $datestr | i18n "postedOnDate" -}}
{{ end }}
&bull;
{{ end }}

View File

@@ -1,7 +1,7 @@
{{ define "main" -}}
{{- $breakpoint := $.Scratch.Get "breakpoint" -}}
{{- $sidebar := partial "body/sidebar" . -}}
{{- $toc := partial "body/panel-toc" . -}}
{{- $sidebar := partial "page/sidebar" . -}}
{{- $toc := partial "page/panel-toc" . -}}
{{ with $sidebar }}
<div class="offcanvas offcanvas-start" tabindex="-1" id="offcanvass-sidebar" aria-labelledby="offcanvas-label">

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@gethinode/hinode",
"version": "1.0.0-beta2",
"version": "1.0.0-beta4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@gethinode/hinode",
"version": "1.0.0-beta2",
"version": "1.0.0-beta4",
"license": "MIT",
"dependencies": {
"@fullhuman/postcss-purgecss": "^7.0.2",

View File

@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "1.0.0-beta2",
"version": "1.0.0-beta4",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",