From 094ba86f47ced6a7a24bdc84ccd310fe19de99bf Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 6 Aug 2023 07:23:06 +0200 Subject: [PATCH 01/23] Update package name --- go.mod | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 27ce1ffb..e090acc2 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/gethinode/hinode +module github.com/markdumay/minimal go 1.19 diff --git a/package.json b/package.json index 4067abc8..af1ce2dd 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@gethinode/hinode", + "name": "@markdumay/minimal", "version": "0.17.4", "description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator", "keywords": [ From 1031fbd660011b4981f58c5aedeef90e320858e1 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 6 Aug 2023 11:44:06 +0200 Subject: [PATCH 02/23] Move content to example site --- {content => exampleSite/content}/en/_index.md | 0 {content => exampleSite/content}/en/about.md | 0 {content => exampleSite/content}/en/blog/_index.md | 0 {content => exampleSite/content}/en/blog/bootstrap-elements.md | 0 {content => exampleSite/content}/en/blog/components.md | 0 {content => exampleSite/content}/en/blog/first-post.md | 0 {content => exampleSite/content}/en/blog/fourth-post.md | 0 {content => exampleSite/content}/en/blog/second-post.md | 0 {content => exampleSite/content}/en/blog/third-post.md | 0 {content => exampleSite/content}/en/browserconfig.md | 0 {content => exampleSite/content}/en/projects/_index.md | 0 {content => exampleSite/content}/en/projects/another-project.md | 0 {content => exampleSite/content}/en/projects/sample-project.md | 0 {content => exampleSite/content}/nl/_index.md | 0 {content => exampleSite/content}/nl/about.md | 0 {content => exampleSite/content}/nl/blog/_index.md | 0 {content => exampleSite/content}/nl/blog/bootstrap-elements.md | 0 {content => exampleSite/content}/nl/blog/components.md | 0 {content => exampleSite/content}/nl/blog/first-post.md | 0 {content => exampleSite/content}/nl/blog/fourth-post.md | 0 {content => exampleSite/content}/nl/blog/second-post.md | 0 {content => exampleSite/content}/nl/blog/third-post.md | 0 {content => exampleSite/content}/nl/browserconfig.md | 0 {content => exampleSite/content}/nl/projects/_index.md | 0 {content => exampleSite/content}/nl/projects/another-project.md | 0 {content => exampleSite/content}/nl/projects/sample-project.md | 0 {data => exampleSite/data}/timeline-en.yml | 0 {data => exampleSite/data}/timeline-nl.yml | 0 28 files changed, 0 insertions(+), 0 deletions(-) rename {content => exampleSite/content}/en/_index.md (100%) rename {content => exampleSite/content}/en/about.md (100%) rename {content => exampleSite/content}/en/blog/_index.md (100%) rename {content => exampleSite/content}/en/blog/bootstrap-elements.md (100%) rename {content => exampleSite/content}/en/blog/components.md (100%) rename {content => exampleSite/content}/en/blog/first-post.md (100%) rename {content => exampleSite/content}/en/blog/fourth-post.md (100%) rename {content => exampleSite/content}/en/blog/second-post.md (100%) rename {content => exampleSite/content}/en/blog/third-post.md (100%) rename {content => exampleSite/content}/en/browserconfig.md (100%) rename {content => exampleSite/content}/en/projects/_index.md (100%) rename {content => exampleSite/content}/en/projects/another-project.md (100%) rename {content => exampleSite/content}/en/projects/sample-project.md (100%) rename {content => exampleSite/content}/nl/_index.md (100%) rename {content => exampleSite/content}/nl/about.md (100%) rename {content => exampleSite/content}/nl/blog/_index.md (100%) rename {content => exampleSite/content}/nl/blog/bootstrap-elements.md (100%) rename {content => exampleSite/content}/nl/blog/components.md (100%) rename {content => exampleSite/content}/nl/blog/first-post.md (100%) rename {content => exampleSite/content}/nl/blog/fourth-post.md (100%) rename {content => exampleSite/content}/nl/blog/second-post.md (100%) rename {content => exampleSite/content}/nl/blog/third-post.md (100%) rename {content => exampleSite/content}/nl/browserconfig.md (100%) rename {content => exampleSite/content}/nl/projects/_index.md (100%) rename {content => exampleSite/content}/nl/projects/another-project.md (100%) rename {content => exampleSite/content}/nl/projects/sample-project.md (100%) rename {data => exampleSite/data}/timeline-en.yml (100%) rename {data => exampleSite/data}/timeline-nl.yml (100%) diff --git a/content/en/_index.md b/exampleSite/content/en/_index.md similarity index 100% rename from content/en/_index.md rename to exampleSite/content/en/_index.md diff --git a/content/en/about.md b/exampleSite/content/en/about.md similarity index 100% rename from content/en/about.md rename to exampleSite/content/en/about.md diff --git a/content/en/blog/_index.md b/exampleSite/content/en/blog/_index.md similarity index 100% rename from content/en/blog/_index.md rename to exampleSite/content/en/blog/_index.md diff --git a/content/en/blog/bootstrap-elements.md b/exampleSite/content/en/blog/bootstrap-elements.md similarity index 100% rename from content/en/blog/bootstrap-elements.md rename to exampleSite/content/en/blog/bootstrap-elements.md diff --git a/content/en/blog/components.md b/exampleSite/content/en/blog/components.md similarity index 100% rename from content/en/blog/components.md rename to exampleSite/content/en/blog/components.md diff --git a/content/en/blog/first-post.md b/exampleSite/content/en/blog/first-post.md similarity index 100% rename from content/en/blog/first-post.md rename to exampleSite/content/en/blog/first-post.md diff --git a/content/en/blog/fourth-post.md b/exampleSite/content/en/blog/fourth-post.md similarity index 100% rename from content/en/blog/fourth-post.md rename to exampleSite/content/en/blog/fourth-post.md diff --git a/content/en/blog/second-post.md b/exampleSite/content/en/blog/second-post.md similarity index 100% rename from content/en/blog/second-post.md rename to exampleSite/content/en/blog/second-post.md diff --git a/content/en/blog/third-post.md b/exampleSite/content/en/blog/third-post.md similarity index 100% rename from content/en/blog/third-post.md rename to exampleSite/content/en/blog/third-post.md diff --git a/content/en/browserconfig.md b/exampleSite/content/en/browserconfig.md similarity index 100% rename from content/en/browserconfig.md rename to exampleSite/content/en/browserconfig.md diff --git a/content/en/projects/_index.md b/exampleSite/content/en/projects/_index.md similarity index 100% rename from content/en/projects/_index.md rename to exampleSite/content/en/projects/_index.md diff --git a/content/en/projects/another-project.md b/exampleSite/content/en/projects/another-project.md similarity index 100% rename from content/en/projects/another-project.md rename to exampleSite/content/en/projects/another-project.md diff --git a/content/en/projects/sample-project.md b/exampleSite/content/en/projects/sample-project.md similarity index 100% rename from content/en/projects/sample-project.md rename to exampleSite/content/en/projects/sample-project.md diff --git a/content/nl/_index.md b/exampleSite/content/nl/_index.md similarity index 100% rename from content/nl/_index.md rename to exampleSite/content/nl/_index.md diff --git a/content/nl/about.md b/exampleSite/content/nl/about.md similarity index 100% rename from content/nl/about.md rename to exampleSite/content/nl/about.md diff --git a/content/nl/blog/_index.md b/exampleSite/content/nl/blog/_index.md similarity index 100% rename from content/nl/blog/_index.md rename to exampleSite/content/nl/blog/_index.md diff --git a/content/nl/blog/bootstrap-elements.md b/exampleSite/content/nl/blog/bootstrap-elements.md similarity index 100% rename from content/nl/blog/bootstrap-elements.md rename to exampleSite/content/nl/blog/bootstrap-elements.md diff --git a/content/nl/blog/components.md b/exampleSite/content/nl/blog/components.md similarity index 100% rename from content/nl/blog/components.md rename to exampleSite/content/nl/blog/components.md diff --git a/content/nl/blog/first-post.md b/exampleSite/content/nl/blog/first-post.md similarity index 100% rename from content/nl/blog/first-post.md rename to exampleSite/content/nl/blog/first-post.md diff --git a/content/nl/blog/fourth-post.md b/exampleSite/content/nl/blog/fourth-post.md similarity index 100% rename from content/nl/blog/fourth-post.md rename to exampleSite/content/nl/blog/fourth-post.md diff --git a/content/nl/blog/second-post.md b/exampleSite/content/nl/blog/second-post.md similarity index 100% rename from content/nl/blog/second-post.md rename to exampleSite/content/nl/blog/second-post.md diff --git a/content/nl/blog/third-post.md b/exampleSite/content/nl/blog/third-post.md similarity index 100% rename from content/nl/blog/third-post.md rename to exampleSite/content/nl/blog/third-post.md diff --git a/content/nl/browserconfig.md b/exampleSite/content/nl/browserconfig.md similarity index 100% rename from content/nl/browserconfig.md rename to exampleSite/content/nl/browserconfig.md diff --git a/content/nl/projects/_index.md b/exampleSite/content/nl/projects/_index.md similarity index 100% rename from content/nl/projects/_index.md rename to exampleSite/content/nl/projects/_index.md diff --git a/content/nl/projects/another-project.md b/exampleSite/content/nl/projects/another-project.md similarity index 100% rename from content/nl/projects/another-project.md rename to exampleSite/content/nl/projects/another-project.md diff --git a/content/nl/projects/sample-project.md b/exampleSite/content/nl/projects/sample-project.md similarity index 100% rename from content/nl/projects/sample-project.md rename to exampleSite/content/nl/projects/sample-project.md diff --git a/data/timeline-en.yml b/exampleSite/data/timeline-en.yml similarity index 100% rename from data/timeline-en.yml rename to exampleSite/data/timeline-en.yml diff --git a/data/timeline-nl.yml b/exampleSite/data/timeline-nl.yml similarity index 100% rename from data/timeline-nl.yml rename to exampleSite/data/timeline-nl.yml From 84d6758b7a44b82a8bef3e809a0ff0e08fcc95b3 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 6 Aug 2023 12:17:47 +0200 Subject: [PATCH 03/23] Use summary when description is unavailable --- layouts/partials/assets/card.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/assets/card.html b/layouts/partials/assets/card.html index a4f2c777..443bdb78 100644 --- a/layouts/partials/assets/card.html +++ b/layouts/partials/assets/card.html @@ -112,7 +112,7 @@ {{- with $page -}} {{- if not $title }}{{ $title = .Title }}{{ end -}} {{- if not $href }}{{ $href = .RelPermalink }}{{ end -}} - {{- if not $description }}{{ $description = .Description }}{{ end -}} + {{- if not $description }}{{ $description = (or .Description .Summary) }}{{ end -}} {{- if not $thumbnail }}{{ $thumbnail = .Params.thumbnail }}{{ end -}} {{- if not $icon }}{{ $icon = .Params.icon }}{{ end -}} {{- end -}} From 775a4a4b2a3ceb50d2c81ae541a2df597d4cad25 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 6 Aug 2023 12:19:05 +0200 Subject: [PATCH 04/23] Use summary when description is unavailable --- layouts/partials/assets/card-group.html | 4 ++-- layouts/partials/assets/list.html | 2 +- layouts/partials/assets/nav.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layouts/partials/assets/card-group.html b/layouts/partials/assets/card-group.html index 9f8f7f12..6fb591d3 100644 --- a/layouts/partials/assets/card-group.html +++ b/layouts/partials/assets/card-group.html @@ -106,14 +106,14 @@ "footer" $footer "orientation" $orientation ) -}} - + {{- if $element.RelPermalink -}} {{- $params = merge $params (dict "path" $element.File.Path) -}} {{- else -}} {{- $params = merge $params (dict "title" $element.Title "href" $element.RelPermalink - "description" (or $element.Description $element.Content) + "description" (or $element.Description $element.Summary) "thumbnail" $element.Params.thumbnail "icon" $element.Params.icon ) -}} diff --git a/layouts/partials/assets/list.html b/layouts/partials/assets/list.html index 6649d276..4626aa26 100644 --- a/layouts/partials/assets/list.html +++ b/layouts/partials/assets/list.html @@ -79,7 +79,7 @@ {{ partial "partials/list-img.html" (dict "thumbnail" $item.Params.Thumbnail "mode" $item.Params.colormode) }}
- {{ partial "partials/list-content.html" (dict "title" $item.Title "content" (or $item.Description $item.Content)) }} + {{ partial "partials/list-content.html" (dict "title" $item.Title "content" (or $item.Description $item.Summary)) }}
diff --git a/layouts/partials/assets/nav.html b/layouts/partials/assets/nav.html index da7d6cf5..6b9a016c 100644 --- a/layouts/partials/assets/nav.html +++ b/layouts/partials/assets/nav.html @@ -99,7 +99,7 @@ "title" $item.Title "class" $class "color" $color - "content" (or $item.Description $item.Content) + "content" (or $item.Description $item.Summary) "thumbnail" $item.Params.Thumbnail ) -}} {{- else -}} From 2ac190723e5d6ba0bc624766353ba1290fcaebdf Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 6 Aug 2023 12:19:55 +0200 Subject: [PATCH 05/23] Remove superfluous description variable --- layouts/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index 1298a520..8d0c85b0 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,7 +11,6 @@ {{- $title := $sectionPage.Title -}} {{- $thumbnail := $sectionPage.Params.Thumbnail -}} {{- $icon := $sectionPage.Params.Icon -}} - {{- $description := $sectionPage.Description -}} {{- $content := $sectionPage.Content -}} {{- $moreTitle := (T (printf "more%s" (strings.FirstUpper $section))) -}} From e25edd77b0f793182b2bef67a960bfe37b416be6 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 6 Aug 2023 12:20:14 +0200 Subject: [PATCH 06/23] Use all sections by default --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index 8d0c85b0..551e9376 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -5,7 +5,7 @@ {{- define "main" -}} {{- $page := . -}} - {{- range $index, $section := site.Params.home.sections -}} + {{- range $index, $section := or site.Params.home.sections site.Sections -}} {{- $sectionPage := site.GetPage "section" $section -}} {{- $sectionURL := $sectionPage.RelPermalink -}} {{- $title := $sectionPage.Title -}} From 60821fc0c36959e0072bbd634088153c42fe0a95 Mon Sep 17 00:00:00 2001 From: mark Date: Sun, 6 Aug 2023 12:49:28 +0200 Subject: [PATCH 07/23] Add default title for more button --- layouts/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index 551e9376..212c9a39 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -13,7 +13,8 @@ {{- $icon := $sectionPage.Params.Icon -}} {{- $content := $sectionPage.Content -}} - {{- $moreTitle := (T (printf "more%s" (strings.FirstUpper $section))) -}} + {{- $sectionTitle := strings.FirstUpper $section -}} + {{- $moreTitle := or (T (printf "more%s" $sectionTitle)) (printf (T "more" $sectionTitle)) -}} {{- partial "assets/section-list.html" (dict "page" $page From efbaa6ce4f91249463581407195bf5a5026f12ca Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 8 Aug 2023 10:13:08 +0200 Subject: [PATCH 08/23] Remove empty line --- layouts/partials/utilities/link.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/utilities/link.html b/layouts/partials/utilities/link.html index 96b610a7..49f169ca 100644 --- a/layouts/partials/utilities/link.html +++ b/layouts/partials/utilities/link.html @@ -42,4 +42,4 @@ {{- $class := .class -}} -{{ $text }} +{{ $text }} \ No newline at end of file From 5e32ac2a04e69f61654b0afb25305a2245c98241 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 8 Aug 2023 10:16:54 +0200 Subject: [PATCH 09/23] Add endorsement --- config/_default/params.toml | 1 + i18n/de.yaml | 3 +++ i18n/en.yaml | 3 +++ i18n/nl.yaml | 3 +++ layouts/partials/footer/footer.html | 4 ++++ 5 files changed, 14 insertions(+) diff --git a/config/_default/params.toml b/config/_default/params.toml index 86744539..14fb855b 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -5,6 +5,7 @@ enableDarkMode = true modes = ["light", "dark"] canonifyAssetsURLs = false + endorse = true [main.externalLinks] cue = false tab = false diff --git a/i18n/de.yaml b/i18n/de.yaml index 77d8ad4f..b0e242fb 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -91,6 +91,9 @@ - id: home translation: "Startseite" +- id: poweredBy + translation: "Ermöglicht durch {{ . }}." + # Staticman - id: noComment translation: "Kein Kommentar" diff --git a/i18n/en.yaml b/i18n/en.yaml index b637efc1..f7dfe3ef 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -120,6 +120,9 @@ - id: home translation: "Home" +- id: poweredBy + translation: "Powered by {{ . }}." + # Staticman - id: noComment translation: "No comment" diff --git a/i18n/nl.yaml b/i18n/nl.yaml index a27a8670..b4d38a4e 100644 --- a/i18n/nl.yaml +++ b/i18n/nl.yaml @@ -111,6 +111,9 @@ - id: home translation: "Home" +- id: poweredBy + translation: "Mede mogelijk gemaakt door {{ . }}." + # Staticman - id: noComment translation: "Geen commentaar" diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html index 40d51d85..d307fb24 100644 --- a/layouts/partials/footer/footer.html +++ b/layouts/partials/footer/footer.html @@ -4,6 +4,10 @@ {{- $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 }} + {{ if .Site.Params.main.endorse }} + {{ $link := partial "utilities/link" (dict "destination" (index site.Params.links "hinode") "text" "Hinode" "class" "link-secondary") }} + {{ T "poweredBy" $link | safeHTML }} + {{ end }} \ No newline at end of file From e2e9bb421f4eb48d94ba8ac3b09f8d15d3eb7aaa Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 8 Aug 2023 10:19:15 +0200 Subject: [PATCH 10/23] Rewrite featured partial to use markdown content --- assets/scss/app.scss | 1 + assets/scss/components/_feature.scss | 3 +++ layouts/partials/home/featured.html | 34 ++++++++++++++-------------- 3 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 assets/scss/components/_feature.scss diff --git a/assets/scss/app.scss b/assets/scss/app.scss index ff2a7f02..09427953 100644 --- a/assets/scss/app.scss +++ b/assets/scss/app.scss @@ -18,6 +18,7 @@ @import "components/clipboard.scss"; @import "components/command.scss"; @import "components/comments.scss"; +@import "components/feature.scss"; @import "components/navbar.scss"; @import "components/img.scss"; @import "components/pagination.scss"; diff --git a/assets/scss/components/_feature.scss b/assets/scss/components/_feature.scss new file mode 100644 index 00000000..673537bf --- /dev/null +++ b/assets/scss/components/_feature.scss @@ -0,0 +1,3 @@ +.feature { + margin-top: 0.3 * $navbar-offset; +} diff --git a/layouts/partials/home/featured.html b/layouts/partials/home/featured.html index a43e2f88..ed7e153a 100644 --- a/layouts/partials/home/featured.html +++ b/layouts/partials/home/featured.html @@ -1,20 +1,20 @@ -
-
-
-
-
-

{{ .Title }}

-

{{ .Content }}

- {{ if .Site.Params.feature.link }} -

{{ .Site.Params.feature.caption | default (T "about") }}

- {{ end }} -
-
- {{ if .Site.Params.home.featurePhoto }} - {{- partial "assets/image.html" (dict "url" .Site.Params.home.featurePhoto "ratio" "4x3" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Site.Title) -}} - {{ end }} -
-
+
+
+
+
+

{{ .Title }}

+

{{ .Content }}

+
+ {{- $thumbnail := or .Params.thumbnail .Site.Params.home.featurePhoto -}} + {{ if .Site.Params.home.featurePhoto }} + {{ warnf "DEPRECATED: parameter `Params.home.featurePhoto` has been deprecated in release v0.18"}} + {{ end }} + {{- if $thumbnail -}} + {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "16x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Site.Title) -}} + {{ end }} +
+
+
\ No newline at end of file From 27848998d5a0caeeb4c62a3371d56b4ac1482bac Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 8 Aug 2023 12:31:46 +0200 Subject: [PATCH 11/23] Add default archetype --- archetypes/default.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/archetypes/default.md b/archetypes/default.md index ac36e062..f30c34dd 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,2 +1,16 @@ -+++ -+++ +--- +# author: +title: {{ replace .Name "-" " " | title }} +date: {{ .Date }} +draft: true +# layout: +# description: +# tags: +# icon: +# thumbnail: + # url: + # author: + # authorURL: + # origin: + # originURL: +--- From 66f590489378a30697d524e7e23834cea8a7496c Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 8 Aug 2023 12:56:19 +0200 Subject: [PATCH 12/23] Support new thumbnail metadata --- layouts/_default/single.html | 38 ++++++++++++++++++++++--- layouts/index.html | 2 +- layouts/partials/assets/card-group.html | 3 +- layouts/partials/assets/card.html | 2 +- layouts/partials/assets/list.html | 8 ++++-- layouts/partials/assets/nav.html | 3 +- layouts/partials/assets/persona.html | 2 +- layouts/partials/head/seo.html | 3 +- layouts/partials/home/featured.html | 3 +- 9 files changed, 50 insertions(+), 14 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ad099e06..6d77f91d 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -47,10 +47,40 @@ {{- end -}} {{ if not (in (slice "docs" "minimal") .Layout) }} - {{ if .Params.thumbnail -}} - {{- $credits := "" -}} - {{- if .Params.photoCredits }}{{ if .Params.PhotoSource }}{{ $credits = printf "%s %s %s %s" (T "photoBy") .Params.photoCredits (T "photoOn") .Params.PhotoSource }}{{ end }}{{ end -}} - {{- partial "assets/image.html" (dict "url" .Params.thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" $credits) -}} + {{- $thumbnail := "" -}} + {{- $credits := "" -}} + + {{- if reflect.IsMap .Params.Thumbnail -}} + {{- $thumbnail = .Params.Thumbnail.url -}} + {{- $author := "" -}} + {{- if and .Params.Thumbnail.authorURL "text" .Params.Thumbnail.author }} + {{- $author = partial "utilities/link" (dict "destination" .Params.Thumbnail.authorURL "text" .Params.Thumbnail.author) -}} + {{- else if .Params.Thumbnail.author }} + {{- $author = .Params.Thumbnail.author -}} + {{- end -}} + + {{- $origin := "" -}} + {{- if and .Params.Thumbnail.originURL "text" .Params.Thumbnail.origin }} + {{- $origin = partial "utilities/link" (dict "destination" .Params.Thumbnail.originURL "text" .Params.Thumbnail.origin) -}} + {{- else if .Params.Thumbnail.origin }} + {{- $origin = .Params.Thumbnail.origin -}} + {{- end }} + + {{- if and $author $origin }} + {{ $credits = printf "%s %s %s %s" (T "photoBy") $author (T "photoOn") $origin }} + {{ else if $author }} + {{ $credits = printf "%s %s" (T "photoBy") $author }} + {{ end }} + {{ else }} + {{- $thumbnail = .Params.Thumbnail -}} + {{ if or .Params.photoCredits .Params.photoSource }} + {{ warnf "DEPRECATED: frontmatter variables `photoCredits` and `photoSource` have been deprecated in release v0.18: %s" .RelPermalink }} + {{ end }} + {{- if and .Params.photoCredits .Params.PhotoSource }}{{ $credits = printf "%s %s %s %s" (T "photoBy") .Params.photoCredits (T "photoOn") .Params.PhotoSource }}{{ end -}} + {{- end -}} + + {{ if $thumbnail -}} + {{- partial "assets/image.html" (dict "url" $thumbnail "ratio" "21x9" "outerClass" "img-wrap" "innerClass" "rounded" "title" .Params.title "caption" $credits) -}} {{ end -}} {{ end }} {{ .Content }} diff --git a/layouts/index.html b/layouts/index.html index 212c9a39..45976a78 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,7 +9,7 @@ {{- $sectionPage := site.GetPage "section" $section -}} {{- $sectionURL := $sectionPage.RelPermalink -}} {{- $title := $sectionPage.Title -}} - {{- $thumbnail := $sectionPage.Params.Thumbnail -}} + {{- $thumbnail := (or (and (reflect.IsMap $sectionPage.Params.Thumbnail) $sectionPage.Params.Thumbnail.url) $sectionPage.Params.Thumbnail) -}} {{- $icon := $sectionPage.Params.Icon -}} {{- $content := $sectionPage.Content -}} diff --git a/layouts/partials/assets/card-group.html b/layouts/partials/assets/card-group.html index 6fb591d3..dc0dea68 100644 --- a/layouts/partials/assets/card-group.html +++ b/layouts/partials/assets/card-group.html @@ -110,11 +110,12 @@ {{- if $element.RelPermalink -}} {{- $params = merge $params (dict "path" $element.File.Path) -}} {{- else -}} + {{- $thumbnail := (or (and (reflect.IsMap $element.Params.Thumbnail) $element.Params.Thumbnail.url) $element.Params.Thumbnail) -}} {{- $params = merge $params (dict "title" $element.Title "href" $element.RelPermalink "description" (or $element.Description $element.Summary) - "thumbnail" $element.Params.thumbnail + "thumbnail" $thumbnail "icon" $element.Params.icon ) -}} {{- end -}} diff --git a/layouts/partials/assets/card.html b/layouts/partials/assets/card.html index 443bdb78..acef2087 100644 --- a/layouts/partials/assets/card.html +++ b/layouts/partials/assets/card.html @@ -113,7 +113,7 @@ {{- if not $title }}{{ $title = .Title }}{{ end -}} {{- if not $href }}{{ $href = .RelPermalink }}{{ end -}} {{- if not $description }}{{ $description = (or .Description .Summary) }}{{ end -}} - {{- if not $thumbnail }}{{ $thumbnail = .Params.thumbnail }}{{ end -}} + {{- if not $thumbnail }}{{ $thumbnail = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) }}{{ end -}} {{- if not $icon }}{{ $icon = .Params.icon }}{{ end -}} {{- end -}} diff --git a/layouts/partials/assets/list.html b/layouts/partials/assets/list.html index 4626aa26..92dab0e1 100644 --- a/layouts/partials/assets/list.html +++ b/layouts/partials/assets/list.html @@ -52,6 +52,7 @@
{{- range $index, $item := $list -}} {{- $odd := eq (mod $index 2) 1 -}} + {{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
@@ -60,7 +61,7 @@ {{- $style = "reveal fade-bottom-n5 rotate-n5 ps-3" -}} {{- if $odd }}{{ $style = "reveal fade-bottom-5 rotate-5 pe-3" }}{{ end }} {{ end }} - {{ partial "partials/list-img.html" (dict "thumbnail" $item.Params.Thumbnail "style" $style "mode" $item.Params.colormode) }} + {{ partial "partials/list-img.html" (dict "thumbnail" $thumbnail "style" $style "mode" $item.Params.colormode) }}
{{ partial "partials/list-content.html" (dict "title" $item.Title "content" (or $item.Description $item.Content)) }} @@ -73,13 +74,14 @@
{{- range $index, $item := $list -}} {{- $odd := eq (mod $index 2) 1 -}} + {{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
- {{ partial "partials/list-img.html" (dict "thumbnail" $item.Params.Thumbnail "mode" $item.Params.colormode) }} + {{ partial "partials/list-img.html" (dict "thumbnail" $thumbnail "mode" $item.Params.colormode) }}
- {{ partial "partials/list-content.html" (dict "title" $item.Title "content" (or $item.Description $item.Summary)) }} + {{ partial "partials/list-content.html" (dict "title" $item.Title "content" ($description = partial "utilities/GetDescription.html" $item)) }}
diff --git a/layouts/partials/assets/nav.html b/layouts/partials/assets/nav.html index 6b9a016c..5fc36401 100644 --- a/layouts/partials/assets/nav.html +++ b/layouts/partials/assets/nav.html @@ -93,6 +93,7 @@ {{ $header := $item.Title }} {{ $body := $item.Content }} {{ $show := eq $index 0}} + {{- $thumbnail := (or (and (reflect.IsMap $item.Params.Thumbnail) $item.Params.Thumbnail.url) $item.Params.Thumbnail) -}}
- {{- $thumbnail := or .Params.thumbnail .Site.Params.home.featurePhoto -}} + {{- $thumbnail := (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) -}} + {{- $thumbnail = or $thumbnail .Site.Params.home.featurePhoto -}} {{ if .Site.Params.home.featurePhoto }} {{ warnf "DEPRECATED: parameter `Params.home.featurePhoto` has been deprecated in release v0.18"}} {{ end }} From 3ba3f13005fdfd2fc95334e1b7f69fbcbe08c5d7 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 8 Aug 2023 12:57:56 +0200 Subject: [PATCH 13/23] Use summary when description is unavailable --- layouts/partials/assets/card-group.html | 2 +- layouts/partials/assets/card.html | 2 +- layouts/partials/assets/nav.html | 2 +- layouts/partials/head/seo.html | 11 ++--------- layouts/partials/utilities/GetDescription.html | 12 ++++++++++++ 5 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 layouts/partials/utilities/GetDescription.html diff --git a/layouts/partials/assets/card-group.html b/layouts/partials/assets/card-group.html index dc0dea68..b5b3d40d 100644 --- a/layouts/partials/assets/card-group.html +++ b/layouts/partials/assets/card-group.html @@ -114,7 +114,7 @@ {{- $params = merge $params (dict "title" $element.Title "href" $element.RelPermalink - "description" (or $element.Description $element.Summary) + "description" (partial "utilities/GetDescription.html" $element) "thumbnail" $thumbnail "icon" $element.Params.icon ) -}} diff --git a/layouts/partials/assets/card.html b/layouts/partials/assets/card.html index acef2087..7b22de47 100644 --- a/layouts/partials/assets/card.html +++ b/layouts/partials/assets/card.html @@ -112,7 +112,7 @@ {{- with $page -}} {{- if not $title }}{{ $title = .Title }}{{ end -}} {{- if not $href }}{{ $href = .RelPermalink }}{{ end -}} - {{- if not $description }}{{ $description = (or .Description .Summary) }}{{ end -}} + {{- if not $description }}{{ $description = partial "utilities/GetDescription.html" . }}{{ end -}} {{- if not $thumbnail }}{{ $thumbnail = (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) }}{{ end -}} {{- if not $icon }}{{ $icon = .Params.icon }}{{ end -}} {{- end -}} diff --git a/layouts/partials/assets/nav.html b/layouts/partials/assets/nav.html index 5fc36401..27fa925d 100644 --- a/layouts/partials/assets/nav.html +++ b/layouts/partials/assets/nav.html @@ -100,7 +100,7 @@ "title" $item.Title "class" $class "color" $color - "content" (or $item.Description $item.Summary) + "content" (partial "utilities/GetDescription.html" $item) "thumbnail" $thumbnail ) -}} {{- else -}} diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html index e4f18bff..3fbfcd04 100644 --- a/layouts/partials/head/seo.html +++ b/layouts/partials/head/seo.html @@ -7,15 +7,8 @@ {{ $.Scratch.Set "title" .Site.Title -}} {{ end -}} -{{ with .Description -}} - {{ $.Scratch.Set "description" . -}} -{{ else -}} - {{ with .Summary | plainify -}} - {{ $.Scratch.Set "description" . -}} - {{ else -}} - {{ $.Scratch.Set "description" .Site.Params.main.description -}} - {{ end -}} -{{ end -}} +{{ $description := or (partial "utilities/GetDescription.html" .) .Site.Params.main.description }} +{{ $.Scratch.Set "description" $description -}} {{- $thumbnail := (or (and (reflect.IsMap .Params.Thumbnail) .Params.Thumbnail.url) .Params.Thumbnail) -}} {{ with $thumbnail -}} diff --git a/layouts/partials/utilities/GetDescription.html b/layouts/partials/utilities/GetDescription.html new file mode 100644 index 00000000..683d5d50 --- /dev/null +++ b/layouts/partials/utilities/GetDescription.html @@ -0,0 +1,12 @@ +{{- $page := . -}} +{{- if ne (printf "%T" $page) "*hugolib.pageState" -}} + {{- errorf "partial [utilities/GetDescription.html] - Expected page context" -}} +{{- end -}} + +{{- $decription := $page.Description -}} +{{- if not $decription -}} + {{- $decription = $page.Summary -}} + {{- if $page.Truncated }}{{ $decription = print $decription "..." }}{{ end -}}} +{{- end -}} + +{{- return $decription -}} \ No newline at end of file From a693508e249108529b31de11f0c3413ff326a3d5 Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 8 Aug 2023 12:58:29 +0200 Subject: [PATCH 14/23] Ignore empty tagline --- layouts/partials/head/seo.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head/seo.html b/layouts/partials/head/seo.html index 3fbfcd04..83399aee 100644 --- a/layouts/partials/head/seo.html +++ b/layouts/partials/head/seo.html @@ -52,7 +52,7 @@ {{ end -}} {{ if .IsHome -}} - {{ .Site.Title }} {{ .Site.Params.main.separator }} {{ .Site.Params.head.tagline }} + {{ .Site.Title }} {{ if .Site.Params.head.tagline }} {{ .Site.Params.main.separator }} {{ .Site.Params.head.tagline }}{{ end }} {{ else -}} {{ .Site.Title }} {{ .Site.Params.main.separator }} {{ .Title }} {{ end -}} From 503a7f74103b53cae6008be1b878d792077a30fe Mon Sep 17 00:00:00 2001 From: mark Date: Tue, 8 Aug 2023 12:58:57 +0200 Subject: [PATCH 15/23] Adapt new social params --- layouts/partials/footer/social.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/layouts/partials/footer/social.html b/layouts/partials/footer/social.html index 003fc71b..025bbd3d 100644 --- a/layouts/partials/footer/social.html +++ b/layouts/partials/footer/social.html @@ -1,10 +1,19 @@ +{{ if .Site.Params.footer.socialTitle }} + {{ warnf "DEPRECATED: parameter `Params.home.socialTitle` has been deprecated in release v0.18"}} +{{ end }} +{{ if .Site.Params.footer.socialCaption }} + {{ warnf "DEPRECATED: parameter `Params.home.socialCaption` has been deprecated in release v0.18"}} +{{ end }} + {{- $tab := site.Params.main.externalLinks.tab -}}
-
{{ .Site.Params.footer.socialTitle }}
-

{{ .Site.Params.footer.socialCaption }}

+ {{ if gt .Site.Menus.social 0 }} +
{{ or .Site.Params.footer.socialTitle .Site.Params.social.title }}
+

{{ or .Site.Params.footer.socialCaption .Site.Params.social.caption }}

+ {{ end }}
{{ range .Site.Menus.social -}} From f283e329a7cb2ea53c8759ebb265cd80bc991537 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 9 Aug 2023 08:15:23 +0200 Subject: [PATCH 16/23] Applu default style to card group items --- layouts/partials/assets/section-list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/assets/section-list.html b/layouts/partials/assets/section-list.html index 14ad4afe..d1c58e2c 100644 --- a/layouts/partials/assets/section-list.html +++ b/layouts/partials/assets/section-list.html @@ -24,7 +24,7 @@ {{- $padding := "0" -}} {{- $header := "full" -}} {{- $footer := "none" -}} -{{- $style := "" -}} +{{- $style := "border-0 card-zoom" -}} {{- $homepage := 3 -}} {{- $background := "" -}} {{- $layout := "card" -}} From 097f041765ea555546181f9c1495e4c659f4ab7a Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 9 Aug 2023 08:16:03 +0200 Subject: [PATCH 17/23] Use all root sections by default --- layouts/_default/list.html | 2 +- layouts/index.html | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 624c3709..8f389bab 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -4,7 +4,7 @@ "section" .Type "home" false "nested" .Params.Nested - "title" .Title + "title" (or .Title .Type) "description" .Description "content" .Content "paginate" true) diff --git a/layouts/index.html b/layouts/index.html index 45976a78..b9657843 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,17 +4,23 @@ {{- define "main" -}} {{- $page := . -}} + {{- $sections := site.Params.home.sections -}} + {{- if not $sections -}} + {{ range $section := site.Sections }} + {{ $sections = $sections | append $section.Type }} + {{ end }} + {{- end -}} - {{- range $index, $section := or site.Params.home.sections site.Sections -}} + {{- range $index, $section := $sections -}} {{- $sectionPage := site.GetPage "section" $section -}} {{- $sectionURL := $sectionPage.RelPermalink -}} - {{- $title := $sectionPage.Title -}} + {{- $title := or $sectionPage.Title $sectionPage.Type -}} {{- $thumbnail := (or (and (reflect.IsMap $sectionPage.Params.Thumbnail) $sectionPage.Params.Thumbnail.url) $sectionPage.Params.Thumbnail) -}} {{- $icon := $sectionPage.Params.Icon -}} {{- $content := $sectionPage.Content -}} - - {{- $sectionTitle := strings.FirstUpper $section -}} - {{- $moreTitle := or (T (printf "more%s" $sectionTitle)) (printf (T "more" $sectionTitle)) -}} + {{- $sectionTitle := strings.FirstUpper $sectionPage.Type -}} + {{- $moreTitle := T (printf "more%s" $sectionTitle) }} + {{- $moreTitle = or $moreTitle (printf (T "more" (pluralize $sectionTitle))) -}} {{- partial "assets/section-list.html" (dict "page" $page From dbd1b731bc1a1df5785b246083172d805621b2ff Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 9 Aug 2023 08:36:19 +0200 Subject: [PATCH 18/23] Configure minimal initial site --- config/_default/hugo.toml | 7 +-- config/_default/languages.toml | 26 ++-------- config/_default/menus/menus.en.toml | 30 ++---------- config/_default/menus/menus.nl.toml | 73 ----------------------------- config/_default/params.toml | 58 +++++++---------------- content/_index.md | 13 +++++ 6 files changed, 43 insertions(+), 164 deletions(-) delete mode 100644 config/_default/menus/menus.nl.toml create mode 100644 content/_index.md diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index 2a57aaec..b7191059 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -6,12 +6,13 @@ enableGitInfo = true # toml-docs-end main # additional settings -googleAnalytics = "G-T85PPZ36GN" -baseURL = "https://demo.gethinode.com/" +# googleAnalytics = "G-xxxxxxxxxx" +baseURL = "https://example.com/" canonifyURLs = false enableEmoji = true enableRobotsTXT = true enableInlineShortcodes = true +summaryLength = 20 # prevent build failures when using Hugo's Instagram shortcode due to deprecated Instagram API. # See https://github.com/gohugoio/hugo/issues/7228#issuecomment-714490456 @@ -24,7 +25,7 @@ timeout = "180s" # toml-docs-start language languageCode = "en-us" defaultContentLanguage = "en" -defaultContentLanguageInSubdir = true +defaultContentLanguageInSubdir = false # toml-docs-end language # toml-docs-start redirect diff --git a/config/_default/languages.toml b/config/_default/languages.toml index 2f7f18f3..9ef65156 100644 --- a/config/_default/languages.toml +++ b/config/_default/languages.toml @@ -1,31 +1,15 @@ # toml-docs-start lang-main [en] languageName = "English" - contentDir = "content/en" + contentDir = "content" weight = 1 # toml-docs-end lang-main # toml-docs-start lang-param [en.params.head] tagline = "A Hugo Theme" - [en.params.feature] - link = "about" - caption = "About" + [en.params.social] + title = "Follow me" + caption = "I work on everything coding and tweet developer memes" [en.params.footer] - license = "Licensed under Creative Commons (CC BY-NC-SA 4.0)." - socialTitle = "Follow me" - socialCaption = "I work on everything coding and tweet developer memes" + # license = "Licensed under Creative Commons (CC BY-NC-SA 4.0)." # toml-docs-end lang-param - -[nl] - languageName = "Nederlands" - contentDir = "content/nl" - weight = 2 - [nl.params.head] - tagline = "Een Hugo Thema" - [nl.params.feature] - link = "over-mij" - caption = "Over mij" - [nl.params.footer] - license = "Gelicenseerd onder Creative Commons (CC BY-NC-SA 4.0)." - socialTitle = "Volg mij" - socialCaption = "Ik doe aan programmeren en tweet memes" \ No newline at end of file diff --git a/config/_default/menus/menus.en.toml b/config/_default/menus/menus.en.toml index 2fd3a800..896d78a2 100644 --- a/config/_default/menus/menus.en.toml +++ b/config/_default/menus/menus.en.toml @@ -1,34 +1,12 @@ [[main]] - name = "About" - pageRef = "/about/" + name = "Home" + pageRef = "/" weight = 10 -[[main]] - name = "Blog" - pageRef = "/blog/" - weight = 20 - -[[main]] - name = "Projects" - pageRef = "/projects/" - weight = 30 - -[[main]] - name = "Sample project" - pageRef = "/projects/sample-project/" - parent = "Projects" - weight = 1 - -[[main]] - name = "Another project" - pageRef = "/projects/another-project/" - parent = "Projects" - weight = 2 - [[main]] name = "Tags" - pageRef = "/tags/" - weight = 40 + pageRef = "/tags" + weight = 20 [[social]] name = "LinkedIn" diff --git a/config/_default/menus/menus.nl.toml b/config/_default/menus/menus.nl.toml deleted file mode 100644 index 27d891a7..00000000 --- a/config/_default/menus/menus.nl.toml +++ /dev/null @@ -1,73 +0,0 @@ -[[main]] - name = "Over mij" - pageRef = "/over-mij/" - weight = 10 - -[[main]] - name = "Blog" - pageRef = "/blog/" - weight = 20 - -[[main]] - name = "Projecten" - pageRef = "/projecten/" - weight = 30 - -[[main]] - name = "Voorbeeldproject" - pageRef = "/projecten/voorbeeldproject/" - parent = "Projecten" - weight = 1 - -[[main]] - name = "Ander project" - pageRef = "/projecten/ander-project/" - parent = "Projecten" - weight = 2 - -[[main]] - name = "Tags" - pageRef = "/tags/" - weight = 40 - -[[social]] - name = "LinkedIn" - pre = "fab linkedin" - url = "https://linkedin.com/" - weight = 10 - -[[social]] - name = "GitHub" - pre = "fab github" - url = "https://github.com/" - weight = 20 - -[[social]] - name = "Medium" - pre = "fab medium" - url = "https://medium.com/" - weight = 30 - -# toml-docs-start sample-navigation -[[sample]] - name = "Blog" - pageRef = "/blog/" - weight = 10 - -[[sample]] - name = "Projecten" - pageRef = "/projecten/" - weight = 20 - -[[sample]] - name = "Voorbeeldproject" - pageRef = "/projecten/voorbeeldproject/" - parent = "Projecten" - weight = 1 - -[[sample]] - name = "Ander project" - pageRef = "/projecten/ander-project/" - parent = "Projecten" - weight = 2 -# toml-docs-end sample-navigation \ No newline at end of file diff --git a/config/_default/params.toml b/config/_default/params.toml index 14fb855b..b84b99fd 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -38,8 +38,7 @@ # toml-docs-start home [home] - sections = ["blog", "projects"] - featurePhoto = "/img/sunrise.jpg" # source: https://unsplash.com/photos/ZX6BPboJrYk + # sections = ["posts"] fullCover = false centerHeadline = false style = "" @@ -103,37 +102,21 @@ # toml-docs-end sharing # toml-docs-start sections -[sections] - [sections.blog] - title = "Blog" - sort = "date" - reverse = true - nested = true - cols = 3 - color = "" - padding = "0" - header = "full" - footer = "none" - orientation = "stacked" - style = "border-0 card-zoom" - homepage = 3 - separator = true - [sections.projects] - title = "Projects" - layout = "card" - sort = "title" - reverse = false - nested = true - cols = 1 - background = "body-tertiary" - color = "body" - padding = "3" - header = "none" - footer = "tags" - orientation = "horizontal" - style = "border-1 card-emphasize" - homepage = 3 - separator = false +# [sections] +# [sections.posts] +# title = "Posts" +# sort = "date" +# reverse = true +# nested = true +# cols = 3 +# color = "" +# padding = "0" +# header = "full" +# footer = "none" +# orientation = "stacked" +# style = "border-0 card-zoom" +# homepage = 3 +# separator = true # toml-docs-end sections [favicon] @@ -197,11 +180,4 @@ #theme = "" [links] - bs_badge_heading = "https://getbootstrap.com/docs/5.2/components/badge/#headings" - hinode_docs = "https://gethinode.com/docs" - hugo_imaging = "https://gohugo.io/content-management/image-processing/#imaging-configuration" - mozilla_image = "https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images" - observatory = "https://observatory.mozilla.org/analyze/demo.gethinode.com" - pagespeed = "https://pagespeed.web.dev/report?url=https%3A%2F%2Fdemo.gethinode.com%2F" - utterances = "https://utteranc.es" - \ No newline at end of file + hinode = "https://gethinode.com" diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 00000000..1e705c22 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,13 @@ +--- +title: Welcome to Hinode! +thumbnail: + url: /img/sunrise.jpg + author: Harris Vo + authorURL: https://unsplash.com/@hoanvokim + origin: https://unsplash.com/photos/ZX6BPboJrYk + originName: Unsplash +--- + +A clean documentation and blog theme for your Hugo site based on Bootstrap 5. + +{{< button href="https://gethinode.com/docs" icon="fas book-open" order="first" >}}Get Started{{< /button>}} From e7bdd81136ed9c094c8fa82adcfcc290e35bf0d3 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 9 Aug 2023 15:00:55 +0200 Subject: [PATCH 19/23] Create example site --- exampleSite/config/_default/hugo.toml | 78 ++++++++ exampleSite/config/_default/languages.toml | 29 +++ exampleSite/config/_default/markup.toml | 35 ++++ .../config/_default/menus/menus.en.toml | 73 +++++++ .../config/_default/menus/menus.nl.toml | 73 +++++++ exampleSite/config/_default/params.toml | 183 ++++++++++++++++++ exampleSite/config/_default/server.toml | 43 ++++ exampleSite/content/en/_index.md | 8 + .../content/en/blog/bootstrap-elements.md | 9 +- exampleSite/content/en/blog/components.md | 9 +- exampleSite/content/en/blog/first-post.md | 9 +- exampleSite/content/en/blog/fourth-post.md | 9 +- exampleSite/content/en/blog/second-post.md | 9 +- exampleSite/content/en/blog/third-post.md | 9 +- exampleSite/content/en/browserconfig.md | 2 +- exampleSite/content/nl/_index.md | 8 + .../content/nl/blog/bootstrap-elements.md | 9 +- exampleSite/content/nl/blog/components.md | 11 +- exampleSite/content/nl/blog/first-post.md | 9 +- exampleSite/content/nl/blog/fourth-post.md | 9 +- exampleSite/content/nl/blog/second-post.md | 9 +- exampleSite/content/nl/blog/third-post.md | 9 +- exampleSite/content/nl/browserconfig.md | 2 +- exampleSite/go.mod | 11 ++ exampleSite/go.sum | 10 + 25 files changed, 627 insertions(+), 38 deletions(-) create mode 100644 exampleSite/config/_default/hugo.toml create mode 100644 exampleSite/config/_default/languages.toml create mode 100644 exampleSite/config/_default/markup.toml create mode 100644 exampleSite/config/_default/menus/menus.en.toml create mode 100644 exampleSite/config/_default/menus/menus.nl.toml create mode 100644 exampleSite/config/_default/params.toml create mode 100644 exampleSite/config/_default/server.toml create mode 100644 exampleSite/go.mod create mode 100644 exampleSite/go.sum diff --git a/exampleSite/config/_default/hugo.toml b/exampleSite/config/_default/hugo.toml new file mode 100644 index 00000000..bffbbd30 --- /dev/null +++ b/exampleSite/config/_default/hugo.toml @@ -0,0 +1,78 @@ +title = "Hinode" +copyright = "Copyright © 2023 Mark Dumay." +paginate = 9 +enableGitInfo = true + +# additional settings +googleAnalytics = "G-T85PPZ36GN" +baseURL = "https://demo.gethinode.com/" +canonifyURLs = false +enableEmoji = true +enableRobotsTXT = true +enableInlineShortcodes = true + +# prevent build failures when using Hugo's Instagram shortcode due to deprecated Instagram API. +# See https://github.com/gohugoio/hugo/issues/7228#issuecomment-714490456 +ignoreErrors = ["error-remote-getjson"] + +timeout = "180s" + +languageCode = "en-us" +defaultContentLanguage = "en" +defaultContentLanguageInSubdir = true + +[outputFormats.REDIR] +mediaType = "text/netlify" +baseName = "_redirects" +isPlainText = true +notAlternative = true + +[mediaTypes."text/netlify"] +delimiter = "" + +[outputs] +home = ["HTML", "RSS", "REDIR"] + +[build] + writeStats = true + +[taxonomies] + tag = 'tags' + +[privacy] + [privacy.vimeo] + disabled = false + simple = true + + [privacy.twitter] + disabled = false + enableDNT = true + simple = true + + [privacy.instagram] + disabled = false + simple = true + + [privacy.youtube] + disabled = false + privacyEnhanced = true + +[services] + [services.instagram] + disableInlineCSS = true + [services.twitter] + disableInlineCSS = true + +[outputFormats] + [outputFormats.XML] + isPlainText = false + mediaType = "application/xml" + isHtml = false + noUgly = true + permalinkable = false + name = "xml" + +[module] + replacements = 'github.com/markdumay/minimal -> ../..' + [[module.imports]] + path = "github.com/markdumay/minimal" diff --git a/exampleSite/config/_default/languages.toml b/exampleSite/config/_default/languages.toml new file mode 100644 index 00000000..303402b8 --- /dev/null +++ b/exampleSite/config/_default/languages.toml @@ -0,0 +1,29 @@ +# toml-docs-start lang-main +[en] + languageName = "English" + contentDir = "content/en" + weight = 1 +# toml-docs-end lang-main +# toml-docs-start lang-param + [en.params.head] + tagline = "A Hugo Theme" + [en.params.social] + title = "Follow me" + caption = "I work on everything coding and tweet developer memes" + [en.params.footer] + # license = "Licensed under Creative Commons (CC BY-NC-SA 4.0)." +# toml-docs-end lang-param + +[nl] + languageName = "Nederlands" + contentDir = "content/nl" + weight = 2 + [nl.params.head] + tagline = "Een Hugo Thema" + [nl.params.social] + title = "Volg mij" + caption = "Ik doe aan programmeren en tweet memes" + [nl.params.footer] + # license = "Gelicenseerd onder Creative Commons (CC BY-NC-SA 4.0)." + [nl.params.sections.projects] + title = "Projecten" diff --git a/exampleSite/config/_default/markup.toml b/exampleSite/config/_default/markup.toml new file mode 100644 index 00000000..d7c4c5fc --- /dev/null +++ b/exampleSite/config/_default/markup.toml @@ -0,0 +1,35 @@ +defaultMarkdownHandler = "goldmark" + +[highlight] + anchorLineNos = false + codeFences = true + guessSyntax = true + hl_Lines = "" + lineAnchors = "" + lineNoStart = 1 + lineNos = false + lineNumbersInTable = false + noClasses = false + tabWidth = 2 + ## Update the 'create:syntax' command in package.json to modify the style + ## The first two lines have been modified to remove the background color + # style = "monokailight" + +[goldmark] + [goldmark.extensions] + definitionList = true + footnote = true + linkify = true + strikethrough = true + table = true + taskList = true + typographer = true + [goldmark.parser] + autoHeadingID = true + autoHeadingIDType = 'github' + [goldmark.parser.attribute] + block = true + [goldmark.renderer] + hardWraps = false + unsafe = true + xhtml = false \ No newline at end of file diff --git a/exampleSite/config/_default/menus/menus.en.toml b/exampleSite/config/_default/menus/menus.en.toml new file mode 100644 index 00000000..2fd3a800 --- /dev/null +++ b/exampleSite/config/_default/menus/menus.en.toml @@ -0,0 +1,73 @@ +[[main]] + name = "About" + pageRef = "/about/" + weight = 10 + +[[main]] + name = "Blog" + pageRef = "/blog/" + weight = 20 + +[[main]] + name = "Projects" + pageRef = "/projects/" + weight = 30 + +[[main]] + name = "Sample project" + pageRef = "/projects/sample-project/" + parent = "Projects" + weight = 1 + +[[main]] + name = "Another project" + pageRef = "/projects/another-project/" + parent = "Projects" + weight = 2 + +[[main]] + name = "Tags" + pageRef = "/tags/" + weight = 40 + +[[social]] + name = "LinkedIn" + pre = "fab linkedin" + url = "https://linkedin.com/" + weight = 10 + +[[social]] + name = "GitHub" + pre = "fab fa-github" + url = "https://github.com/" + weight = 20 + +[[social]] + name = "Medium" + pre = "fab medium" + url = "https://medium.com/" + weight = 30 + +# toml-docs-start sample-navigation +[[sample]] + name = "Blog" + pageRef = "/blog/" + weight = 10 + +[[sample]] + name = "Projects" + pageRef = "/projects/" + weight = 20 + +[[sample]] + name = "Sample project" + pageRef = "/projects/sample-project/" + parent = "Projects" + weight = 1 + +[[sample]] + name = "Another project" + pageRef = "/projects/another-project/" + parent = "Projects" + weight = 2 +# toml-docs-end sample-navigation \ No newline at end of file diff --git a/exampleSite/config/_default/menus/menus.nl.toml b/exampleSite/config/_default/menus/menus.nl.toml new file mode 100644 index 00000000..27d891a7 --- /dev/null +++ b/exampleSite/config/_default/menus/menus.nl.toml @@ -0,0 +1,73 @@ +[[main]] + name = "Over mij" + pageRef = "/over-mij/" + weight = 10 + +[[main]] + name = "Blog" + pageRef = "/blog/" + weight = 20 + +[[main]] + name = "Projecten" + pageRef = "/projecten/" + weight = 30 + +[[main]] + name = "Voorbeeldproject" + pageRef = "/projecten/voorbeeldproject/" + parent = "Projecten" + weight = 1 + +[[main]] + name = "Ander project" + pageRef = "/projecten/ander-project/" + parent = "Projecten" + weight = 2 + +[[main]] + name = "Tags" + pageRef = "/tags/" + weight = 40 + +[[social]] + name = "LinkedIn" + pre = "fab linkedin" + url = "https://linkedin.com/" + weight = 10 + +[[social]] + name = "GitHub" + pre = "fab github" + url = "https://github.com/" + weight = 20 + +[[social]] + name = "Medium" + pre = "fab medium" + url = "https://medium.com/" + weight = 30 + +# toml-docs-start sample-navigation +[[sample]] + name = "Blog" + pageRef = "/blog/" + weight = 10 + +[[sample]] + name = "Projecten" + pageRef = "/projecten/" + weight = 20 + +[[sample]] + name = "Voorbeeldproject" + pageRef = "/projecten/voorbeeldproject/" + parent = "Projecten" + weight = 1 + +[[sample]] + name = "Ander project" + pageRef = "/projecten/ander-project/" + parent = "Projecten" + weight = 2 +# toml-docs-end sample-navigation \ No newline at end of file diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml new file mode 100644 index 00000000..e9d23c20 --- /dev/null +++ b/exampleSite/config/_default/params.toml @@ -0,0 +1,183 @@ +[main] + separator = "-" + description = "Hinode is a clean documentation and blog theme for your Hugo site based on Bootstrap 5." + enableDarkMode = true + modes = ["light", "dark"] + canonifyAssetsURLs = false + [main.externalLinks] + cue = true + tab = true + +[modules] + core = ["bootstrap", "flexsearch", "fontawesome"] + optional = ["leaflet", "katex"] + excludeSCSS = ["bootstrap"] + disableTemplate = ["katex"] + [modules.fontawesome] + inline = true + debug = true + skipMissing = false + +[debugging] + showJS = false + showSCSS = false + +[docs] + basePath = "/" # TODO: replace + github = "https://github.com/gethinode/hinode" + release = "https://github.com/gethinode/hinode/releases/tag/" + checkVersion = false + +[home] + sections = ["blog", "projects"] + fullCover = false + centerHeadline = false + style = "" + +[navigation] + anchor = true + logo = "/img/logo_icon.svg" + color = "body" + fixed = true + offset = "3.8em" + search = true + breadcrumb = true + toc = true + sidebar = true + +[messages] + placement = "bottom-right" + +[sharing] + enabled = true + sort = "weight" + reverse = false + webshare = true + +[[sharing.providers]] + name = "LinkedIn" + url = "https://www.linkedin.com/sharing/share-offsite/?url={url}" + icon = "fab linkedin" + weight = 10 + +[[sharing.providers]] + name = "Twitter" + url = "https://twitter.com/home?status={url}" + icon = "fab x-twitter" + weight = 20 + +[[sharing.providers]] + name = "Facebook" + url = "https://www.facebook.com/sharer.php?u={url}" + icon = "fab facebook" + weight = 30 + +[[sharing.providers]] + name = "WhatsApp" + url = "whatsapp://send?text={title}%20{url}" + icon = "fab whatsapp" + weight = 40 + +[[sharing.providers]] + name = "email" + url = "{url}" + icon = "fas link" + weight = 50 + clipboard = true + +[sections] + [sections.blog] + title = "Blog" + sort = "date" + reverse = true + cols = 3 + color = "" + padding = "0" + header = "full" + footer = "none" + orientation = "stacked" + style = "border-0 card-zoom" + homepage = 3 + separator = true + [sections.projects] + title = "Projects" + layout = "card" + sort = "title" + reverse = false + nested = true + cols = 1 + background = "body-tertiary" + color = "body" + padding = "3" + header = "none" + footer = "tags" + orientation = "horizontal" + style = "border-1 card-emphasize" + homepage = 3 + separator = false + +[favicon] + logo = "img/favicon.png" + sizes = [16, 32, 48] + +# toml-docs-start theme-colors +[style] + primary = "#d43900" + secondary = "#6c757d" + success = "#198754" + info = "#0dcaf0" + warning = "#ffc107" + danger = "#dc3545" + light = "#f8f9fa" + dark = "#212529" + themeOpacity = "10" + themeFont = "Inter" + # themeFontPath = "https://fonts.googleapis.com/css2?family=Inter:wght@200;300;600&display=swap" # external path + themeFontPath = "/fonts" # local path + purge = true +# toml-docs-end theme-colors + +[schema] + type = "Organization" + name = "Hinode" + locale = "en-US" + # twitter = "https://twitter.com/gethinode" + # linkedIn = "" + github = "https://github.com/gethinode/hinode" + section = "blog" + [author] + name = "Mark Dumay" + # twitter = "https://twitter.com/markdumay" + linkedin = "https://www.linkedin.com/in/markdumay/" + github = "https://github.com/markdumay" + [logo] + url = "img/logo512x512.png" + width = 512 + height = 512 + [image] + url = "img/logo1280x640.png" + width = 1280 + height = 640 + +[opengraph] + images = ["logo.png"] + locale = "en_US" + +[comments] + enabled = false + repo = "" # Replace with your repository. + #issueTerm = "pathname" # pathname, url, title, og:title + #label = "comment" + # By default, light and dark mode correspond to github-light and github-dark, respectively. + # Optional values: github-light, github-dark, preferred-color-scheme, github-dark-orange, icy-dark, dark-blue, photon-dark. + #theme = "" + +[links] + bs_badge_heading = "https://getbootstrap.com/docs/5.3/components/badge/#headings" + hinode_docs = "https://gethinode.com" + hugo_imaging = "https://gohugo.io/content-management/image-processing/#imaging-configuration" + mozilla_image = "https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images" + observatory = "https://observatory.mozilla.org/analyze/demo.gethinode.com" + pagespeed = "https://pagespeed.web.dev/report?url=https%3A%2F%2Fdemo.gethinode.com%2F" + utterances = "https://utteranc.es" + hinode = "https://gethinode.com" diff --git a/exampleSite/config/_default/server.toml b/exampleSite/config/_default/server.toml new file mode 100644 index 00000000..edec90e5 --- /dev/null +++ b/exampleSite/config/_default/server.toml @@ -0,0 +1,43 @@ +# toml-docs-start server-config +[[headers]] +for = '/**' +[headers.values] + Strict-Transport-Security = "max-age=31536000; includeSubDomains; preload" + X-Content-Type-Options = "nosniff" + X-XSS-Protection = "1; mode=block" + Content-Security-Policy = """\ + default-src 'self'; \ + script-src 'self' \ + https://utteranc.es/client.js https://*.google-analytics.com https://*.googletagmanager.com; \ + style-src 'self' https://utteranc.es https://fonts.googleapis.com https://www.youtube.com; \ + object-src 'none'; \ + base-uri 'self'; \ + connect-src 'self' + https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; \ + font-src 'self' https://fonts.gstatic.com; \ + frame-src 'self' https://utteranc.es https://www.youtube-nocookie.com https://www.youtube.com; \ + img-src 'self' data: https://i.vimeocdn.com https://i.ytimg.com https://*.google-analytics.com https://*.googletagmanager.com https://tile.openstreetmap.org; \ + manifest-src 'self'; \ + media-src 'self' \ + """ + X-Frame-Options = "SAMEORIGIN" + Referrer-Policy = "strict-origin" + Permissions-Policy = """\ + geolocation=(), \ + midi=(), \ + sync-xhr=(), \ + microphone=(), \ + camera=(), \ + magnetometer=(), \ + gyroscope=(), \ + fullscreen=(), \ + payment=() \ + """ + cache-control = """\ + max-age=0, \ + no-cache, \ + no-store, \ + must-revalidate \ + """ + Access-Control-Allow-Origin = "*" +# toml-docs-end server-config \ No newline at end of file diff --git a/exampleSite/content/en/_index.md b/exampleSite/content/en/_index.md index cae4b198..75b1d575 100644 --- a/exampleSite/content/en/_index.md +++ b/exampleSite/content/en/_index.md @@ -1,6 +1,14 @@ --- author: Mark Dumay title: Welcome to Hinode! +thumbnail: + url: /img/sunrise.jpg + author: Harris Vo + authorURL: https://unsplash.com/@hoanvokim + origin: https://unsplash.com/photos/ZX6BPboJrYk + originName: Unsplash --- A clean documentation and blog theme for your Hugo site based on Bootstrap 5. + +{{< button href="about" >}}About{{< /button>}} diff --git a/exampleSite/content/en/blog/bootstrap-elements.md b/exampleSite/content/en/blog/bootstrap-elements.md index 1bb205e5..370bd5f7 100644 --- a/exampleSite/content/en/blog/bootstrap-elements.md +++ b/exampleSite/content/en/blog/bootstrap-elements.md @@ -4,9 +4,12 @@ title: Bootstrap elements date: 2023-08-05 description: Use shortcodes to add common Bootstrap elements with ease. tags: ["bootstrap", "shortcode"] -thumbnail: img/boots.jpg -photoCredits: Nathan Dumlao -photoSource: Unsplash +thumbnail: + url: img/boots.jpg + author: Nathan Dumlao + authorURL: https://unsplash.com/@nate_dumlao + origin: Unsplash + originURL: https://unsplash.com/photos/QLPWQvHvmII --- Hinode provides several shortcodes that wrap common Bootstrap components. Refer to the [official documentation]({{< param "links.hinode_docs" >}}) for more details. diff --git a/exampleSite/content/en/blog/components.md b/exampleSite/content/en/blog/components.md index 3bdf4a56..731df970 100644 --- a/exampleSite/content/en/blog/components.md +++ b/exampleSite/content/en/blog/components.md @@ -4,9 +4,12 @@ title: Components date: 2023-07-21 description: Use shortcodes to add predefined components powered by external libraries. tags: ["bootstrap", "shortcode"] -thumbnail: img/puzzle.jpg -photoCredits: Ryoji Iwata -photoSource: Unsplash +thumbnail: + url: img/puzzle.jpg + author: Ryoji Iwata + authorURL: https://unsplash.com/@ryoji__iwata + origin: Unsplash + originURL: https://unsplash.com/photos/5siQcvSxCP8 modules: ["katex", "leaflet"] --- diff --git a/exampleSite/content/en/blog/first-post.md b/exampleSite/content/en/blog/first-post.md index 03fa18f2..45256e90 100644 --- a/exampleSite/content/en/blog/first-post.md +++ b/exampleSite/content/en/blog/first-post.md @@ -4,9 +4,12 @@ title: First post date: 2022-10-01 description: This is my first blog post. tags: ["blog"] -thumbnail: img/notepad.jpg -photoCredits: Frederick Medina -photoSource: Unsplash +thumbnail: + url: img/notepad.jpg + author: Frederick Medina + authorURL: https://unsplash.com/@frederickjmedina + origin: Unsplash + originURL: https://unsplash.com/photos/PdfRE-xB--s --- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vulputate, ante in luctus congue, leo risus semper justo, vel consequat sapien lectus quis ipsum. In imperdiet urna justo. Nulla vel pellentesque ipsum. Cras congue feugiat dolor ac aliquam. Pellentesque eget dui venenatis, ultrices urna ac, vehicula nibh. Curabitur est lectus, dapibus eu vehicula non, malesuada et dui. Nam enim nulla, egestas et nunc non, elementum aliquet justo. Mauris euismod mauris sapien, eget vestibulum odio dictum sit amet. Morbi nisl elit, placerat at auctor in, finibus ac neque. Curabitur placerat feugiat risus non vestibulum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque quis cursus est, nec posuere libero. diff --git a/exampleSite/content/en/blog/fourth-post.md b/exampleSite/content/en/blog/fourth-post.md index 535fd8ba..ee024806 100644 --- a/exampleSite/content/en/blog/fourth-post.md +++ b/exampleSite/content/en/blog/fourth-post.md @@ -4,9 +4,12 @@ title: Fourth post date: 2023-01-01 description: This is my fourth blog post. tags: ["blog"] -thumbnail: img/flowers.jpg # https://picsum.photos/id/106/2592/1728 -photoCredits: Arvee Marie -photoSource: Unsplash +thumbnail: + url: img/flowers.jpg + author: Arvee Marie + authorURL: https://unsplash.com/@flutterhappy + origin: Unsplash + originURL: https://unsplash.com/photos/YnfGtpt2gf4 --- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam finibus libero in felis accumsan, vitae imperdiet metus vehicula. Quisque nec dignissim purus. In id dui porta sapien posuere viverra nec vel nisi. Sed varius tincidunt lectus, quis sagittis felis interdum id. Proin purus odio, ultrices auctor libero convallis, volutpat gravida turpis. Ut commodo metus orci, quis sagittis lectus rhoncus non. Nulla et lectus tortor. Suspendisse quam felis, molestie non odio quis, consequat venenatis orci. Etiam sed turpis sit amet elit scelerisque imperdiet. Sed suscipit felis non nibh suscipit egestas. Nulla sodales libero non rhoncus consequat. Nunc in elit at est cursus congue ut ac velit. Cras luctus libero augue, id semper sapien volutpat ultrices. diff --git a/exampleSite/content/en/blog/second-post.md b/exampleSite/content/en/blog/second-post.md index 42bd06b4..635d9916 100644 --- a/exampleSite/content/en/blog/second-post.md +++ b/exampleSite/content/en/blog/second-post.md @@ -4,9 +4,12 @@ title: Second post date: 2022-11-01 description: This is my second blog post. tags: ["blog"] -thumbnail: img/phone.jpg # https://picsum.photos/id/160/3200/2119 -photoCredits: Thom -photoSource: Unsplash +thumbnail: + url: img/phone.jpg + author: Thom + authorURL: https://unsplash.com/@thomweerd + origin: Unsplash + originURL: https://unsplash.com/photos/Zdcq3iKly6g --- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non sollicitudin sapien. Ut porttitor lectus eu tempor ultricies. Sed semper tincidunt nibh pellentesque condimentum. Vivamus dictum sem eu rhoncus semper. Vestibulum convallis congue tincidunt. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Mauris magna urna, egestas sit amet ligula quis, viverra semper arcu. Praesent laoreet nunc vitae nulla posuere facilisis. diff --git a/exampleSite/content/en/blog/third-post.md b/exampleSite/content/en/blog/third-post.md index 4816eccc..dd34835a 100644 --- a/exampleSite/content/en/blog/third-post.md +++ b/exampleSite/content/en/blog/third-post.md @@ -4,9 +4,12 @@ title: Third post date: 2022-12-01 description: This is my third blog post. tags: ["blog"] -thumbnail: https://picsum.photos/id/184/4288/2848.jpg -photoCredits: Tim de Groot -photoSource: Unsplash +thumbnail: + url: https://picsum.photos/id/184/4288/2848.jpg + author: Tim de Groot + authorURL: https://unsplash.com/@timdegroot + origin: Unsplash + originURL: https://unsplash.com/photos/yNGQ830uFB4 --- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id scelerisque ligula. Vestibulum eu lorem tortor. Suspendisse tristique ultrices mauris, non maximus lorem faucibus in. Suspendisse sagittis eleifend dapibus. Curabitur dignissim luctus sapien eu consequat. Proin congue dui vel ipsum bibendum varius. Pellentesque cursus nisi metus, egestas eleifend ipsum sollicitudin vitae. Sed vitae erat elementum, semper turpis sed, molestie nulla. diff --git a/exampleSite/content/en/browserconfig.md b/exampleSite/content/en/browserconfig.md index 07a5f61f..a8005977 100644 --- a/exampleSite/content/en/browserconfig.md +++ b/exampleSite/content/en/browserconfig.md @@ -3,4 +3,4 @@ draft: false outputs: - xml url: browserconfig.xml ---- \ No newline at end of file +--- diff --git a/exampleSite/content/nl/_index.md b/exampleSite/content/nl/_index.md index 7a6fab7e..827df67c 100644 --- a/exampleSite/content/nl/_index.md +++ b/exampleSite/content/nl/_index.md @@ -1,6 +1,14 @@ --- author: Mark Dumay title: Welkom bij Hinode! +thumbnail: + url: /img/sunrise.jpg + author: Harris Vo + authorURL: https://unsplash.com/@hoanvokim + origin: https://unsplash.com/photos/ZX6BPboJrYk + originName: Unsplash --- Een documentatie en blog thema voor Hugo gebaseerd op Bootstrap 5. + +{{< button href="over-mij" >}}Over mij{{< /button>}} diff --git a/exampleSite/content/nl/blog/bootstrap-elements.md b/exampleSite/content/nl/blog/bootstrap-elements.md index 2534bcfd..4f6a93c5 100644 --- a/exampleSite/content/nl/blog/bootstrap-elements.md +++ b/exampleSite/content/nl/blog/bootstrap-elements.md @@ -5,9 +5,12 @@ slug: bootstrap-elementen date: 2023-08-05 description: Gebruik shortcodes om eenvoudig Bootstrap elementen toe te voegen. tags: ["bootstrap", "shortcode"] -thumbnail: img/boots.jpg -photoCredits: Nathan Dumlao -photoSource: Unsplash +thumbnail: + url: img/boots.jpg + author: Nathan Dumlao + authorURL: https://unsplash.com/@nate_dumlao + origin: Unsplash + originURL: https://unsplash.com/photos/QLPWQvHvmII --- Hinode beschikt over meerdere shortcodes om eenvoudig Bootstrap elementen toe te voegen aan je website. De [officiële documentatie]({{< param "links.hinode_docs" >}}) bevat meer details. diff --git a/exampleSite/content/nl/blog/components.md b/exampleSite/content/nl/blog/components.md index f322907a..dc2d7a04 100644 --- a/exampleSite/content/nl/blog/components.md +++ b/exampleSite/content/nl/blog/components.md @@ -5,9 +5,12 @@ slug: componenten date: 2023-07-21 description: Gebruik shortcodes om voorgedefiniëerde componenten toe te voegen die gebruikmaken van externe libraries. tags: ["bootstrap", "shortcode"] -thumbnail: img/puzzle.jpg -photoCredits: Ryoji Iwata -photoSource: Unsplash +thumbnail: + url: img/puzzle.jpg + author: Ryoji Iwata + authorURL: https://unsplash.com/@ryoji__iwata + origin: Unsplash + originURL: https://unsplash.com/photos/5siQcvSxCP8 modules: ["katex", "leaflet"] --- @@ -35,3 +38,5 @@ De volgende shortcode toont een interactieve kaart van Amsterdam. {{}} {{< /example >}} + +[bar]({{< param "links" >}}) diff --git a/exampleSite/content/nl/blog/first-post.md b/exampleSite/content/nl/blog/first-post.md index 5fe7640e..5643a7ac 100644 --- a/exampleSite/content/nl/blog/first-post.md +++ b/exampleSite/content/nl/blog/first-post.md @@ -5,9 +5,12 @@ slug: eerste-artikel date: 2022-10-01 description: Dit is mijn eerste artikel. tags: ["blog"] -thumbnail: img/notepad.jpg -photoCredits: Frederick Medina -photoSource: Unsplash +thumbnail: + url: img/notepad.jpg + author: Frederick Medina + authorURL: https://unsplash.com/@frederickjmedina + origin: Unsplash + originURL: https://unsplash.com/photos/PdfRE-xB--s --- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vulputate, ante in luctus congue, leo risus semper justo, vel consequat sapien lectus quis ipsum. In imperdiet urna justo. Nulla vel pellentesque ipsum. Cras congue feugiat dolor ac aliquam. Pellentesque eget dui venenatis, ultrices urna ac, vehicula nibh. Curabitur est lectus, dapibus eu vehicula non, malesuada et dui. Nam enim nulla, egestas et nunc non, elementum aliquet justo. Mauris euismod mauris sapien, eget vestibulum odio dictum sit amet. Morbi nisl elit, placerat at auctor in, finibus ac neque. Curabitur placerat feugiat risus non vestibulum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque quis cursus est, nec posuere libero. diff --git a/exampleSite/content/nl/blog/fourth-post.md b/exampleSite/content/nl/blog/fourth-post.md index 5dc6a0fb..fb7b2115 100644 --- a/exampleSite/content/nl/blog/fourth-post.md +++ b/exampleSite/content/nl/blog/fourth-post.md @@ -5,9 +5,12 @@ slug: vierde-artikel date: 2023-01-01 description: Dit is mijn vierde artikel. tags: ["blog"] -thumbnail: img/flowers.jpg # https://picsum.photos/id/106/2592/1728 -photoCredits: Arvee Marie -photoSource: Unsplash +thumbnail: + url: img/flowers.jpg + author: Arvee Marie + authorURL: https://unsplash.com/@flutterhappy + origin: Unsplash + originURL: https://unsplash.com/photos/YnfGtpt2gf4 --- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam finibus libero in felis accumsan, vitae imperdiet metus vehicula. Quisque nec dignissim purus. In id dui porta sapien posuere viverra nec vel nisi. Sed varius tincidunt lectus, quis sagittis felis interdum id. Proin purus odio, ultrices auctor libero convallis, volutpat gravida turpis. Ut commodo metus orci, quis sagittis lectus rhoncus non. Nulla et lectus tortor. Suspendisse quam felis, molestie non odio quis, consequat venenatis orci. Etiam sed turpis sit amet elit scelerisque imperdiet. Sed suscipit felis non nibh suscipit egestas. Nulla sodales libero non rhoncus consequat. Nunc in elit at est cursus congue ut ac velit. Cras luctus libero augue, id semper sapien volutpat ultrices. diff --git a/exampleSite/content/nl/blog/second-post.md b/exampleSite/content/nl/blog/second-post.md index 2382ac18..de3e157f 100644 --- a/exampleSite/content/nl/blog/second-post.md +++ b/exampleSite/content/nl/blog/second-post.md @@ -5,9 +5,12 @@ slug: tweede-artikel date: 2022-11-01 description: Dit is mijn tweede artikel. tags: ["blog"] -thumbnail: img/phone.jpg # https://picsum.photos/id/160/3200/2119 -photoCredits: Thom -photoSource: Unsplash +thumbnail: + url: img/phone.jpg + author: Thom + authorURL: https://unsplash.com/@thomweerd + origin: Unsplash + originURL: https://unsplash.com/photos/Zdcq3iKly6g --- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non sollicitudin sapien. Ut porttitor lectus eu tempor ultricies. Sed semper tincidunt nibh pellentesque condimentum. Vivamus dictum sem eu rhoncus semper. Vestibulum convallis congue tincidunt. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Mauris magna urna, egestas sit amet ligula quis, viverra semper arcu. Praesent laoreet nunc vitae nulla posuere facilisis. diff --git a/exampleSite/content/nl/blog/third-post.md b/exampleSite/content/nl/blog/third-post.md index 96b484ab..80ffcf29 100644 --- a/exampleSite/content/nl/blog/third-post.md +++ b/exampleSite/content/nl/blog/third-post.md @@ -5,9 +5,12 @@ slug: derde-artikel date: 2022-12-01 description: Dit is mijn derde artikel. tags: ["blog"] -thumbnail: https://picsum.photos/id/184/4288/2848.jpg -photoCredits: Tim de Groot -photoSource: Unsplash +thumbnail: + url: https://picsum.photos/id/184/4288/2848.jpg + author: Tim de Groot + authorURL: https://unsplash.com/@timdegroot + origin: Unsplash + originURL: https://unsplash.com/photos/yNGQ830uFB4 --- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent id scelerisque ligula. Vestibulum eu lorem tortor. Suspendisse tristique ultrices mauris, non maximus lorem faucibus in. Suspendisse sagittis eleifend dapibus. Curabitur dignissim luctus sapien eu consequat. Proin congue dui vel ipsum bibendum varius. Pellentesque cursus nisi metus, egestas eleifend ipsum sollicitudin vitae. Sed vitae erat elementum, semper turpis sed, molestie nulla. diff --git a/exampleSite/content/nl/browserconfig.md b/exampleSite/content/nl/browserconfig.md index 07a5f61f..a8005977 100644 --- a/exampleSite/content/nl/browserconfig.md +++ b/exampleSite/content/nl/browserconfig.md @@ -3,4 +3,4 @@ draft: false outputs: - xml url: browserconfig.xml ---- \ No newline at end of file +--- diff --git a/exampleSite/go.mod b/exampleSite/go.mod new file mode 100644 index 00000000..e2de61b4 --- /dev/null +++ b/exampleSite/go.mod @@ -0,0 +1,11 @@ +module github.com/markdumay/minimal-test + +go 1.19 + +require ( + github.com/gethinode/mod-bootstrap v1.1.1 // indirect + github.com/gethinode/mod-flexsearch v1.2.0 // indirect + github.com/gethinode/mod-fontawesome v1.2.4 // indirect + github.com/gethinode/mod-katex v1.0.2 // indirect + github.com/gethinode/mod-leaflet v0.3.4 // indirect +) diff --git a/exampleSite/go.sum b/exampleSite/go.sum new file mode 100644 index 00000000..a94fe973 --- /dev/null +++ b/exampleSite/go.sum @@ -0,0 +1,10 @@ +github.com/gethinode/mod-bootstrap v1.1.1 h1:Tx4M5hGVOFrEaxnUONDAm6N9xuRi5UphKlT7F26HujU= +github.com/gethinode/mod-bootstrap v1.1.1/go.mod h1:DcpPc2cNaXUPGEvhD7npuEEPA7573NvakTlrwFbyjr8= +github.com/gethinode/mod-flexsearch v1.2.0 h1:SSMpWzK9SMbi9QRYfil9PJZLLWWLHWzlTc69UxtSWAA= +github.com/gethinode/mod-flexsearch v1.2.0/go.mod h1:TXbGbWsvmhBdsTzRt887mcpFfr4ORpzG3+h/l4W3YM4= +github.com/gethinode/mod-fontawesome v1.2.4 h1:SqE3CQ+boaBIhrVh3MPu4nz0uoHPfEH5t60nNY1CfsI= +github.com/gethinode/mod-fontawesome v1.2.4/go.mod h1:Ki1qkWEOiF0hQpCgWeZRw+HkpL6nd1DxKFptU0O2feI= +github.com/gethinode/mod-katex v1.0.2 h1:pIG4n3qLl/IVe7BEiwn+GL8r5lOCtF6FDxlcrPKdAXk= +github.com/gethinode/mod-katex v1.0.2/go.mod h1:byAfpI3wuqNJIooTGVEGc1cjBhhCy4+CcK1H6495MYg= +github.com/gethinode/mod-leaflet v0.3.4 h1:oY+YQ0JiJuhFQNrk9XgFdg0NMsTUQPXNfnILp4ia4r4= +github.com/gethinode/mod-leaflet v0.3.4/go.mod h1:uGggt87x4Fw7wBoJpSiUvNkYg+s/Ujne7klAX2rxMRk= From 5b919458243ea3ade51506e169f4b16ca4e24e2a Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 9 Aug 2023 15:01:26 +0200 Subject: [PATCH 20/23] Include example site in scripts --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index af1ce2dd..39817225 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,11 @@ }, "scripts": { "start": "hugo server --bind=0.0.0.0 --disableFastRender", + "start:example": "hugo server --bind=0.0.0.0 --disableFastRender -s exampleSite", "start:prod": "hugo server --bind=0.0.0.0 --disableFastRender --printI18nWarnings -e production", "prebuild": "npm run clean:public && npm run -s mod:install", "build": "hugo --gc --minify", + "build:example": "hugo --gc --minify -s exampleSite", "build:debug": "hugo -e debug --debug", "build:preview": "npm run build -D -F", "clean:public": "rimraf public", @@ -28,8 +30,8 @@ "lint": "npm run -s lint:scripts && npm run -s lint:styles && npm run -s lint:markdown", "lint:scripts": "eslint assets/js", "lint:styles": "stylelint \"assets/scss/**/*.{css,sass,scss,sss,less}\"", - "lint:markdown": "markdownlint-cli2 \"*.md\" \"content/**/*.md\"", - "lint:markdown-fix": "markdownlint-cli2-fix \"*.md\" \"content/**/*.md\"", + "lint:markdown": "markdownlint-cli2 \"*.md\" \"content/**/*.md\" \"exampleSite/**/*.md\"", + "lint:markdown-fix": "markdownlint-cli2-fix \"*.md\" \"content/**/*.md\" \"exampleSite/**/*.md\"", "mod:clean": "hugo mod clean", "mod:install": "hugo mod get ./... && npm run -s mod:vendor && npm run -s mod:tidy", "mod:update": "hugo mod get -u ./... && npm run -s mod:vendor && npm run -s mod:tidy", From e0f464dc7de006a38038a3a1f3761c66469e26c2 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 9 Aug 2023 15:01:44 +0200 Subject: [PATCH 21/23] Ignore public files of example site --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f5fb0686..ea0c21dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /_vendor -/public +public/ resources/ node_modules/ From 4de1b7dce7cdf518784f018dd444de35b0808d9b Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 9 Aug 2023 15:02:31 +0200 Subject: [PATCH 22/23] Update package release --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 38b34738..54b4cd9e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "@gethinode/hinode", - "version": "0.17.4", + "name": "@markdumay/minimal", + "version": "0.18.0-alpha", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "@gethinode/hinode", - "version": "0.17.4", + "name": "@markdumay/minimal", + "version": "0.18.0-alpha", "license": "MIT", "devDependencies": { "@fullhuman/postcss-purgecss": "^5.0.0", diff --git a/package.json b/package.json index 39817225..7a4fe9fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@markdumay/minimal", - "version": "0.17.4", + "version": "0.18.0-alpha", "description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator", "keywords": [ "hugo", From de9c00a6ecd8034d446e7bbcebd2ee77cb7ca5b2 Mon Sep 17 00:00:00 2001 From: mark Date: Wed, 9 Aug 2023 15:06:05 +0200 Subject: [PATCH 23/23] Reset package name --- exampleSite/config/_default/hugo.toml | 4 ++-- exampleSite/go.mod | 2 +- go.mod | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exampleSite/config/_default/hugo.toml b/exampleSite/config/_default/hugo.toml index bffbbd30..1e7ab31a 100644 --- a/exampleSite/config/_default/hugo.toml +++ b/exampleSite/config/_default/hugo.toml @@ -73,6 +73,6 @@ home = ["HTML", "RSS", "REDIR"] name = "xml" [module] - replacements = 'github.com/markdumay/minimal -> ../..' + replacements = 'github.com/gethinode/hinode -> ../..' [[module.imports]] - path = "github.com/markdumay/minimal" + path = "github.com/gethinode/hinode" diff --git a/exampleSite/go.mod b/exampleSite/go.mod index e2de61b4..b5ac03e2 100644 --- a/exampleSite/go.mod +++ b/exampleSite/go.mod @@ -1,4 +1,4 @@ -module github.com/markdumay/minimal-test +module github.com/gethinode/hinode-test go 1.19 diff --git a/go.mod b/go.mod index e090acc2..27ce1ffb 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/markdumay/minimal +module github.com/gethinode/hinode go 1.19 diff --git a/package-lock.json b/package-lock.json index 54b4cd9e..70629d2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "@markdumay/minimal", + "name": "@gethinode/hinode", "version": "0.18.0-alpha", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "@markdumay/minimal", + "name": "@gethinode/hinode", "version": "0.18.0-alpha", "license": "MIT", "devDependencies": { diff --git a/package.json b/package.json index 7a4fe9fd..3933c819 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@markdumay/minimal", + "name": "@gethinode/hinode", "version": "0.18.0-alpha", "description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator", "keywords": [