diff --git a/.gitignore b/.gitignore index f5fb0686..ea0c21dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /_vendor -/public +public/ resources/ node_modules/ 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: +--- 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/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 94e2c096..9ef65156 100644 --- a/config/_default/languages.toml +++ b/config/_default/languages.toml @@ -1,33 +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" - [nl.params.sections.projects] - title = "Projecten" 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/params.toml b/config/_default/params.toml index 86744539..b84b99fd 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 @@ -37,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 = "" @@ -102,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] @@ -196,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>}} diff --git a/content/en/_index.md b/content/en/_index.md deleted file mode 100644 index cae4b198..00000000 --- a/content/en/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -author: Mark Dumay -title: Welcome to Hinode! ---- - -A clean documentation and blog theme for your Hugo site based on Bootstrap 5. diff --git a/content/nl/_index.md b/content/nl/_index.md deleted file mode 100644 index 7a6fab7e..00000000 --- a/content/nl/_index.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -author: Mark Dumay -title: Welkom bij Hinode! ---- - -Een documentatie en blog thema voor Hugo gebaseerd op Bootstrap 5. diff --git a/exampleSite/config/_default/hugo.toml b/exampleSite/config/_default/hugo.toml new file mode 100644 index 00000000..1e7ab31a --- /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/gethinode/hinode -> ../..' + [[module.imports]] + path = "github.com/gethinode/hinode" 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/config/_default/menus/menus.nl.toml b/exampleSite/config/_default/menus/menus.nl.toml similarity index 100% rename from config/_default/menus/menus.nl.toml rename to exampleSite/config/_default/menus/menus.nl.toml 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 new file mode 100644 index 00000000..75b1d575 --- /dev/null +++ b/exampleSite/content/en/_index.md @@ -0,0 +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/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 98% rename from content/en/blog/bootstrap-elements.md rename to exampleSite/content/en/blog/bootstrap-elements.md index 1bb205e5..370bd5f7 100644 --- a/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/content/en/blog/components.md b/exampleSite/content/en/blog/components.md similarity index 86% rename from content/en/blog/components.md rename to exampleSite/content/en/blog/components.md index 3bdf4a56..731df970 100644 --- a/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/content/en/blog/first-post.md b/exampleSite/content/en/blog/first-post.md similarity index 89% rename from content/en/blog/first-post.md rename to exampleSite/content/en/blog/first-post.md index 03fa18f2..45256e90 100644 --- a/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/content/en/blog/fourth-post.md b/exampleSite/content/en/blog/fourth-post.md similarity index 90% rename from content/en/blog/fourth-post.md rename to exampleSite/content/en/blog/fourth-post.md index 535fd8ba..ee024806 100644 --- a/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/content/en/blog/second-post.md b/exampleSite/content/en/blog/second-post.md similarity index 87% rename from content/en/blog/second-post.md rename to exampleSite/content/en/blog/second-post.md index 42bd06b4..635d9916 100644 --- a/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/content/en/blog/third-post.md b/exampleSite/content/en/blog/third-post.md similarity index 91% rename from content/en/blog/third-post.md rename to exampleSite/content/en/blog/third-post.md index 4816eccc..dd34835a 100644 --- a/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/content/en/browserconfig.md b/exampleSite/content/en/browserconfig.md similarity index 93% rename from content/en/browserconfig.md rename to exampleSite/content/en/browserconfig.md index 07a5f61f..a8005977 100644 --- a/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/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/exampleSite/content/nl/_index.md b/exampleSite/content/nl/_index.md new file mode 100644 index 00000000..827df67c --- /dev/null +++ b/exampleSite/content/nl/_index.md @@ -0,0 +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/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 98% rename from content/nl/blog/bootstrap-elements.md rename to exampleSite/content/nl/blog/bootstrap-elements.md index 2534bcfd..4f6a93c5 100644 --- a/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/content/nl/blog/components.md b/exampleSite/content/nl/blog/components.md similarity index 84% rename from content/nl/blog/components.md rename to exampleSite/content/nl/blog/components.md index f322907a..dc2d7a04 100644 --- a/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. {{* map lat=52.377 long=4.90 zoom=13 popup="Amsterdam CS" popup-lat=52.378062 popup-long=4.900562 */>}} {{< /example >}} + +[bar]({{< param "links" >}}) diff --git a/content/nl/blog/first-post.md b/exampleSite/content/nl/blog/first-post.md similarity index 89% rename from content/nl/blog/first-post.md rename to exampleSite/content/nl/blog/first-post.md index 5fe7640e..5643a7ac 100644 --- a/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/content/nl/blog/fourth-post.md b/exampleSite/content/nl/blog/fourth-post.md similarity index 90% rename from content/nl/blog/fourth-post.md rename to exampleSite/content/nl/blog/fourth-post.md index 5dc6a0fb..fb7b2115 100644 --- a/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/content/nl/blog/second-post.md b/exampleSite/content/nl/blog/second-post.md similarity index 88% rename from content/nl/blog/second-post.md rename to exampleSite/content/nl/blog/second-post.md index 2382ac18..de3e157f 100644 --- a/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/content/nl/blog/third-post.md b/exampleSite/content/nl/blog/third-post.md similarity index 91% rename from content/nl/blog/third-post.md rename to exampleSite/content/nl/blog/third-post.md index 96b484ab..80ffcf29 100644 --- a/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/content/nl/browserconfig.md b/exampleSite/content/nl/browserconfig.md similarity index 93% rename from content/nl/browserconfig.md rename to exampleSite/content/nl/browserconfig.md index 07a5f61f..a8005977 100644 --- a/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/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 diff --git a/exampleSite/go.mod b/exampleSite/go.mod new file mode 100644 index 00000000..b5ac03e2 --- /dev/null +++ b/exampleSite/go.mod @@ -0,0 +1,11 @@ +module github.com/gethinode/hinode-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= 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/_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/_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 1298a520..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 := site.Params.home.sections -}} + {{- range $index, $section := $sections -}} {{- $sectionPage := site.GetPage "section" $section -}} {{- $sectionURL := $sectionPage.RelPermalink -}} - {{- $title := $sectionPage.Title -}} - {{- $thumbnail := $sectionPage.Params.Thumbnail -}} + {{- $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 -}} - {{- $description := $sectionPage.Description -}} {{- $content := $sectionPage.Content -}} - - {{- $moreTitle := (T (printf "more%s" (strings.FirstUpper $section))) -}} + {{- $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 diff --git a/layouts/partials/assets/card-group.html b/layouts/partials/assets/card-group.html index 9f8f7f12..b5b3d40d 100644 --- a/layouts/partials/assets/card-group.html +++ b/layouts/partials/assets/card-group.html @@ -106,15 +106,16 @@ "footer" $footer "orientation" $orientation ) -}} - + {{- 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.Content) - "thumbnail" $element.Params.thumbnail + "description" (partial "utilities/GetDescription.html" $element) + "thumbnail" $thumbnail "icon" $element.Params.icon ) -}} {{- end -}} diff --git a/layouts/partials/assets/card.html b/layouts/partials/assets/card.html index a4f2c777..7b22de47 100644 --- a/layouts/partials/assets/card.html +++ b/layouts/partials/assets/card.html @@ -112,8 +112,8 @@ {{- with $page -}} {{- if not $title }}{{ $title = .Title }}{{ end -}} {{- if not $href }}{{ $href = .RelPermalink }}{{ end -}} - {{- if not $description }}{{ $description = .Description }}{{ end -}} - {{- if not $thumbnail }}{{ $thumbnail = .Params.thumbnail }}{{ 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/list.html b/layouts/partials/assets/list.html index 6649d276..92dab0e1 100644 --- a/layouts/partials/assets/list.html +++ b/layouts/partials/assets/list.html @@ -52,6 +52,7 @@
{{ .Site.Params.footer.socialCaption }}
+ {{ if gt .Site.Menus.social 0 }} +{{ or .Site.Params.footer.socialCaption .Site.Params.social.caption }}
+ {{ end }}{{ .Title }}
-{{ .Content }}
- {{ if .Site.Params.feature.link }} - - {{ end }} -{{ .Title }}
+{{ .Content }}