mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-07-07 04:27:31 -05:00
Compare commits
22 Commits
hugo-0.146
...
rewrite-fi
Author | SHA1 | Date | |
---|---|---|---|
e0d2c536e4
|
|||
8fafc843ef
|
|||
1f82ad4f0b
|
|||
7e016547ec
|
|||
b4bff1e36d
|
|||
1f9477759d
|
|||
cc7cec07df
|
|||
be12afb50d
|
|||
9d761b2f81
|
|||
ba9c106a88
|
|||
150ee40fd5
|
|||
ca0f8d390c
|
|||
62f0d42140
|
|||
16f08dce7f
|
|||
c06e7eb938
|
|||
5a957bc745
|
|||
67ac36e9e2
|
|||
6ff0ffb80b
|
|||
ff4998f31b
|
|||
1aa2f8ea5c
|
|||
6e7160efbb
|
|||
04c3c007a8
|
@ -198,14 +198,14 @@ video {
|
|||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-media > figure.border img,
|
.post-media > figure img,
|
||||||
.post-media > figure.border video {
|
.post-media > figure video {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: 7px solid var(--figure-border);
|
border: 7px solid var(--figure-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
figure.border img,
|
figure img,
|
||||||
figure.border video {
|
figure video {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border: 2px solid var(--figure-border);
|
border: 2px solid var(--figure-border);
|
||||||
}
|
}
|
||||||
@ -291,17 +291,17 @@ table.simple tbody tr:nth-child(even) {
|
|||||||
|
|
||||||
/* Icons */
|
/* Icons */
|
||||||
.icon {
|
.icon {
|
||||||
width: 20px;
|
width: 1em;
|
||||||
height: 20px;
|
height: 1em;
|
||||||
color: var(--text-1);
|
color: var(--text-1);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline;
|
display: inline;
|
||||||
vertical-align: middle;
|
vertical-align: sub;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 svg.icon {
|
/* workarounds for some icons from jam-icons being non-square aspect ratio */
|
||||||
width: 30px;
|
.icon-code {
|
||||||
height: 30px;
|
width: 1.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
@ -315,11 +315,6 @@ h1 svg.icon {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heading-link svg {
|
|
||||||
width: 15px;
|
|
||||||
height: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
/* Top bar formatting {{{ */
|
/* Top bar formatting {{{ */
|
||||||
@ -676,6 +671,7 @@ h1 svg.icon {
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
font-size: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-buttons a {
|
.share-buttons a {
|
||||||
@ -690,8 +686,7 @@ h1 svg.icon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.share-buttons svg {
|
.share-buttons svg {
|
||||||
width: 32px;
|
display: block;
|
||||||
height: 32px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* https://stackoverflow.com/a/72073682/19003757 */
|
/* https://stackoverflow.com/a/72073682/19003757 */
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
function share_event(service) {
|
|
||||||
// this function does nothing by default
|
|
||||||
}
|
|
@ -1,68 +0,0 @@
|
|||||||
baseURL: https://example.com
|
|
||||||
theme: bobatheme
|
|
||||||
defaultContentLanguage: en
|
|
||||||
copyright: '© 2021 bbaovanc <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>'
|
|
||||||
sectionPagesMenu: main
|
|
||||||
enableRobotsTXT: true
|
|
||||||
enableGitInfo: true
|
|
||||||
|
|
||||||
pagination:
|
|
||||||
pagerSize: 5
|
|
||||||
|
|
||||||
taxonomies:
|
|
||||||
_merge: deep
|
|
||||||
|
|
||||||
markup: # this just keeps the bobatheme markup styling
|
|
||||||
_merge: deep
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
_merge: deep
|
|
||||||
|
|
||||||
outputFormats:
|
|
||||||
_merge: deep
|
|
||||||
|
|
||||||
params:
|
|
||||||
author:
|
|
||||||
name: bbaovanc
|
|
||||||
|
|
||||||
# these are for the OpenGraph/Twitter embeds in Hugo
|
|
||||||
description: Example website for bobatheme
|
|
||||||
|
|
||||||
# these are for favicons in bobatheme (disabled by default)
|
|
||||||
# faviconSVG: favicon.svg
|
|
||||||
# appleTouchPNG: apple-touch-icon.png
|
|
||||||
|
|
||||||
# show reading time (enabled by default)
|
|
||||||
# readingtime: true
|
|
||||||
|
|
||||||
# used for "View source" (unset by default)
|
|
||||||
# gitFileURL: https://github.com/BBaoVanC/bobatheme/blob/master
|
|
||||||
# gitFileIcon: github-circle
|
|
||||||
# gitHistoryURL: https://github.com/BBaoVanC/bobatheme/commits/master
|
|
||||||
|
|
||||||
# social media share icons
|
|
||||||
# shareButtons:
|
|
||||||
# twitter: true
|
|
||||||
# facebook: true
|
|
||||||
# linkedin: true
|
|
||||||
# reddit: true
|
|
||||||
# telegram: true
|
|
||||||
# print: true
|
|
||||||
|
|
||||||
# show "Latest Posts" section at bottom of content pages
|
|
||||||
# latestPostsOnContent: true
|
|
||||||
|
|
||||||
# footer: >-
|
|
||||||
# Some example text for the footer.
|
|
||||||
|
|
||||||
|
|
||||||
# see https://gohugo.io/about/hugo-and-gdpr/#all-privacy-settings
|
|
||||||
# you probably want to keep this default
|
|
||||||
privacy:
|
|
||||||
_merge: deep
|
|
||||||
|
|
||||||
languages:
|
|
||||||
en:
|
|
||||||
languageName: English
|
|
||||||
title: Example Website
|
|
||||||
weight: 1
|
|
@ -4,6 +4,8 @@ markup:
|
|||||||
lineNos: true
|
lineNos: true
|
||||||
goldmark:
|
goldmark:
|
||||||
parser:
|
parser:
|
||||||
|
# don't put <p> around ![]() image in markdown (used to embed any resource now)
|
||||||
|
wrapStandAloneImageWithinParagraph: false
|
||||||
attribute:
|
attribute:
|
||||||
block: true
|
block: true
|
||||||
# this is enabled by default already
|
# this is enabled by default already
|
||||||
|
@ -7,6 +7,8 @@ table_of_contents:
|
|||||||
|
|
||||||
browser_no_video_support:
|
browser_no_video_support:
|
||||||
other: "Your browser does not support video."
|
other: "Your browser does not support video."
|
||||||
|
browser_no_video_support_link:
|
||||||
|
other: "Click here to download it instead."
|
||||||
|
|
||||||
latest_posts:
|
latest_posts:
|
||||||
other: "Latest Posts"
|
other: "Latest Posts"
|
||||||
|
12
layouts/_markup/render-image.html
Normal file
12
layouts/_markup/render-image.html
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{{/* TODO: should we use .PageInner */}}
|
||||||
|
{{ partial "embed-resource.html" (.Page.Resources.Get .Destination) }}
|
||||||
|
{{ with .Title }}
|
||||||
|
{{ errorf "%q" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Attributes }}
|
||||||
|
{{/* FIXME: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_markup/render-image.html */}}
|
||||||
|
{{ errorf "%q" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Text }}
|
||||||
|
{{ errorf "%q" . }}
|
||||||
|
{{ end }}
|
21
layouts/_partials/embed-resource.html
Normal file
21
layouts/_partials/embed-resource.html
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{{ if eq .ResourceType "image" }}
|
||||||
|
{{/* TODO: figure out whether loading="lazy" should be set because MDN
|
||||||
|
* claims that images won't work with JS disabled since it would
|
||||||
|
* make tracking possible, but my experience says otherwise
|
||||||
|
*/}}
|
||||||
|
<img src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
|
||||||
|
{{ else if eq .ResourceType "video" }}
|
||||||
|
<video controls preload="metadata">
|
||||||
|
{{/* FIXME
|
||||||
|
<source src="{{ .Permalink }}" {{ with .Params.alt }}alt="{{ . }}"{{ end }} />
|
||||||
|
*/}}
|
||||||
|
{{ i18n "browser_no_video_support" }}
|
||||||
|
<a href="{{ .Permalink }}" target="_blank" rel="noopener">
|
||||||
|
{{ i18n "browser_no_video_support_link" }}
|
||||||
|
</video>
|
||||||
|
{{ else }}
|
||||||
|
{{/* TODO: could consider implementing more types, listed at:
|
||||||
|
* https://www.iana.org/assignments/media-types/media-types.xhtml
|
||||||
|
*/}}
|
||||||
|
{{ errorf "Handling %q resource not supported" .ResourceType }}
|
||||||
|
{{ end }}
|
10
layouts/_partials/feature-figure.html
Normal file
10
layouts/_partials/feature-figure.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{{ with .Resources.Get "feature" }}
|
||||||
|
<div class="post-media">
|
||||||
|
<figure>
|
||||||
|
{{ partial "embed-resource.html" . }}
|
||||||
|
{{ with .Title }}
|
||||||
|
<figcaption>{{ . }}</figcaption>
|
||||||
|
{{ end }}
|
||||||
|
</figure>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
@ -16,9 +16,6 @@
|
|||||||
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
{{ with resources.Get "js/bobatheme.js" | fingerprint "sha512" }}
|
||||||
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with resources.Get "js/share-event.js" | fingerprint "sha512" }}
|
|
||||||
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ with .Site.Params.faviconSVG }}
|
{{ with .Site.Params.faviconSVG }}
|
||||||
<link rel="icon" href="{{ . | absURL }}" />
|
<link rel="icon" href="{{ . | absURL }}" />
|
||||||
@ -27,11 +24,7 @@
|
|||||||
<link rel="apple-touch-icon" href="{{ . | absURL }}" />
|
<link rel="apple-touch-icon" href="{{ . | absURL }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ if .IsHome }}
|
<title>{{ .Render "head_title" }}</title>
|
||||||
<title>{{ .Site.Title | plainify }}</title>
|
|
||||||
{{ else }}
|
|
||||||
<title>{{ (print .Title " | " .Site.Title) | plainify }}</title>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ partial "seo-tags/opengraph.html" . }}
|
{{ partial "seo-tags/opengraph.html" . }}
|
||||||
{{ partial "seo-tags/twitter-cards.html" . }}
|
{{ partial "seo-tags/twitter-cards.html" . }}
|
@ -1,6 +1,6 @@
|
|||||||
{{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}}
|
{{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}}
|
||||||
{{- $icon := $icon_resource.Content -}}
|
{{- $icon := $icon_resource.Content -}}
|
||||||
{{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}}
|
{{- $icon = replaceRE `<svg` (printf `<svg class="icon icon-%s"` .) $icon -}}
|
||||||
{{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}}
|
{{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}}
|
||||||
{{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}}
|
{{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}}
|
||||||
{{- $icon | safeHTML -}}
|
{{- $icon | safeHTML -}}
|
1
layouts/_partials/page-metadata/custom-full.html
Normal file
1
layouts/_partials/page-metadata/custom-full.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
<!-- Placeholder for website to add custom post metadata to summaries -->
|
@ -1,5 +1,5 @@
|
|||||||
{{ with .Params.authors }}
|
{{ with .Params.authors }}
|
||||||
<span class="page-metadata-item" aria-label="{{ i18n "aria_post_meta_authors" }}">
|
<span class="page-metadata-item" data-pagefind-meta="authors" aria-label="{{ i18n "aria_post_meta_authors" }}">
|
||||||
{{ partial "icon.html" "user-circle" }}
|
{{ partial "icon.html" "user-circle" }}
|
||||||
|
|
||||||
{{ if index $.Site.Taxonomies "authors" }}
|
{{ if index $.Site.Taxonomies "authors" }}
|
@ -4,7 +4,7 @@
|
|||||||
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
{{ $categories = $categories | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="page-metadata-section categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
<div class="page-metadata-section categories" data-pagefind-meta="categories" aria-label="{{ i18n "aria_post_meta_categories" }}">
|
||||||
{{ partial "icon.html" "folder" }}
|
{{ partial "icon.html" "folder" }}
|
||||||
{{ delimit $categories ", " | safeHTML }}
|
{{ delimit $categories ", " | safeHTML }}
|
||||||
</div>
|
</div>
|
@ -4,7 +4,7 @@
|
|||||||
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
{{ $series = $series | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="page-metadata-section series" aria-label="{{ i18n "aria_post_meta_series" }}">
|
<div class="page-metadata-section series" data-pagefind-meta="series" aria-label="{{ i18n "aria_post_meta_series" }}">
|
||||||
{{ partial "icon.html" "files" }}
|
{{ partial "icon.html" "files" }}
|
||||||
{{ delimit $series ", " | safeHTML }}
|
{{ delimit $series ", " | safeHTML }}
|
||||||
</div>
|
</div>
|
@ -4,7 +4,7 @@
|
|||||||
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
{{ $tags = $tags | append (printf `<a href="%s">%s</a>` .Permalink .LinkTitle) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="page-metadata-section tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
|
<div class="page-metadata-section tags" data-pagefind-meta="tags" aria-label="{{ i18n "aria_post_meta_tags" }}">
|
||||||
{{ partial "icon.html" "tag" }}
|
{{ partial "icon.html" "tag" }}
|
||||||
{{ delimit $tags ", " | safeHTML }}
|
{{ delimit $tags ", " | safeHTML }}
|
||||||
</div>
|
</div>
|
@ -22,6 +22,8 @@
|
|||||||
{{ partial "page-metadata/item/edithistory.html" . }}
|
{{ partial "page-metadata/item/edithistory.html" . }}
|
||||||
{{ partial "page-metadata/item/viewraw.html" . }}
|
{{ partial "page-metadata/item/viewraw.html" . }}
|
||||||
|
|
||||||
|
{{ partial "page-metadata/custom-full.html" . }}
|
||||||
|
|
||||||
{{ partial "page-metadata/item/categories.html" . }}
|
{{ partial "page-metadata/item/categories.html" . }}
|
||||||
|
|
||||||
{{ partial "page-metadata/item/tags.html" . }}
|
{{ partial "page-metadata/item/tags.html" . }}
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
{{ partial "page-metadata/item/authors.html" . }}
|
{{ partial "page-metadata/item/authors.html" . }}
|
||||||
{{ partial "page-metadata/item/readingtime.html" . }}
|
{{ partial "page-metadata/item/readingtime.html" . }}
|
||||||
|
|
||||||
{{ partial "page-metadata/item/series.html" . }}
|
{{ partial "page-metadata/item/series.html" . }}
|
||||||
{{ partial "page-metadata/item/categories.html" . }}
|
{{ partial "page-metadata/item/categories.html" . }}
|
||||||
{{ partial "page-metadata/item/tags.html" . }}
|
{{ partial "page-metadata/item/tags.html" . }}
|
@ -33,7 +33,7 @@
|
|||||||
<meta property="og:locale" content="{{ . }}">
|
<meta property="og:locale" content="{{ . }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Site.Params.title }}
|
{{ with .Site.Title }}
|
||||||
<meta property="og:site_name" content="{{ . }}">
|
<meta property="og:site_name" content="{{ . }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
@ -1,3 +1,7 @@
|
|||||||
|
{{/* we do not need to duplicate what's already covered by OpenGraph tags
|
||||||
|
* see: https://demo.bbaovanc.com/test/remove-twitter-tags/blog/swapfile-guide/
|
||||||
|
* so, no twitter:image/title/description
|
||||||
|
*/}}
|
||||||
{{ $images := $.Resources.ByType "image" }}
|
{{ $images := $.Resources.ByType "image" }}
|
||||||
{{ $featured := $images.GetMatch "*feature*" }}
|
{{ $featured := $images.GetMatch "*feature*" }}
|
||||||
{{ if not $featured }}
|
{{ if not $featured }}
|
||||||
@ -17,13 +21,21 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
<meta name="twitter:card" content="summary">
|
<meta name="twitter:card" content="summary">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
<meta name="twitter:image" content="{{ $featured.Permalink }}">
|
<meta name="twitter:card" content="summary">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<meta name="twitter:title" content="{{ .Title | plainify }}">
|
{{/* twitter:site is the site author; twitter:creator is page author
|
||||||
<meta name="twitter:description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
* https://developer.x.com/en/docs/x-for-websites/cards/guides/getting-started
|
||||||
|
* "Card and Content Attribution"
|
||||||
|
*/}}
|
||||||
{{ with .Site.Params.social.twitter }}
|
{{ with .Site.Params.social.twitter }}
|
||||||
<meta name="twitter:site" content="@{{ . }}">
|
<meta name="twitter:site" content="@{{ . }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ with .GetTerms "authors" }}
|
||||||
|
{{ range . }}
|
||||||
|
{{ with .Params.twitter }}
|
||||||
|
<meta name="twitter:creator" content="@{{ . }}">
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
17
layouts/_shortcodes/figure.html
Normal file
17
layouts/_shortcodes/figure.html
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<figure>
|
||||||
|
{{ with .Get "src" }}
|
||||||
|
{{ with $.Page.Resources.Get . }}
|
||||||
|
{{ partial "embed-resource.html" . }}
|
||||||
|
{{ with .Title }}
|
||||||
|
<figcaption>{{ . | markdownify }}</figcaption>
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "resource %q not found" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ .Inner }}
|
||||||
|
{{ with .Get "caption" }}
|
||||||
|
<figcaption>{{ . | markdownify }}</figcaption>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</figure>
|
14
layouts/_shortcodes/include.html
Normal file
14
layouts/_shortcodes/include.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{{/* https://github.com/gohugoio/hugo/issues/13823#issuecomment-3015270202 */}}
|
||||||
|
{{ with .Get 0 -}}
|
||||||
|
{{ with $.Page.GetPage . -}}
|
||||||
|
{{ .RenderShortcodes -}}
|
||||||
|
{{ else with $.Page.Resources.Get . -}}
|
||||||
|
{{ .RenderShortcodes -}}
|
||||||
|
{{ else with resources.Get . -}}
|
||||||
|
{{ .Content -}}
|
||||||
|
{{ else -}}
|
||||||
|
{{ errorf "The %q shortcode was unable to find %q. See %s" $.Name . $.Position -}}
|
||||||
|
{{ end -}}
|
||||||
|
{{ else -}}
|
||||||
|
{{ errorf "The %q shortcode requires a positional parameter indicating the logical path of the file to include. See %s" .Name .Position -}}
|
||||||
|
{{ end -}}
|
9
layouts/_shortcodes/resource.html
Normal file
9
layouts/_shortcodes/resource.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{{ with .Get 0 }}
|
||||||
|
{{ with $.Page.Resources.Get . }}
|
||||||
|
{{ partial "embed-resource.html" . }}
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "resource %q not found" . }}
|
||||||
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ errorf "resource name not provided as first parameter" }}
|
||||||
|
{{ end }}
|
1
layouts/authors/term.head_title.html
Normal file
1
layouts/authors/term.head_title.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ (print .Title "'s Posts | " .Site.Title) | plainify }}
|
@ -13,7 +13,7 @@
|
|||||||
{{ partial "breadcrumb.html" . }}
|
{{ partial "breadcrumb.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<main id="main-content">
|
<main id="main-content" {{ if .IsPage }}data-pagefind-body{{ end }}>
|
||||||
{{ block "main" . }}
|
{{ block "main" . }}
|
||||||
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
THIS TEXT SHOULD NOT SHOW. YUZSIQGHE (that string is so I can grep for it)
|
||||||
{{ end }}
|
{{ end }}
|
1
layouts/head_title.html
Normal file
1
layouts/head_title.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ (print .Title " | " .Site.Title) | plainify }}
|
1
layouts/home.head_title.html
Normal file
1
layouts/home.head_title.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{ .Site.Title | plainify }}
|
@ -1,28 +0,0 @@
|
|||||||
{{ $hidecaption := index . "hidecaption" }}
|
|
||||||
|
|
||||||
{{ if index . "noborder" }}
|
|
||||||
<figure>
|
|
||||||
{{ else }}
|
|
||||||
<figure class="border">
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ with index . "src" }}
|
|
||||||
{{ $media := . }}
|
|
||||||
{{ if eq .MediaType.MainType "image" }}
|
|
||||||
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" loading="lazy" />
|
|
||||||
{{ else if eq .MediaType.MainType "video" }}
|
|
||||||
<video controls preload="metadata">
|
|
||||||
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
|
|
||||||
{{ i18n "browser_no_video_support" }}
|
|
||||||
</video>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if not $hidecaption }}
|
|
||||||
{{ with $media.Title }}
|
|
||||||
<figcaption>
|
|
||||||
{{ . | markdownify }}
|
|
||||||
</figcaption>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</figure>
|
|
@ -1,28 +0,0 @@
|
|||||||
{{ $hidecaption := index . "hidecaption" }}
|
|
||||||
{{ $type := index . "type" }}
|
|
||||||
{{ $src := index . "src" }}
|
|
||||||
{{ $alt := index . "alt" }}
|
|
||||||
|
|
||||||
{{ if index . "border" }}
|
|
||||||
<figure class="border">
|
|
||||||
{{ else }}
|
|
||||||
<figure>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if eq $type "image" }}
|
|
||||||
<img src="{{ $src }}" alt="{{ $alt }}" loading="lazy" />
|
|
||||||
{{ else if eq $type "video" }}
|
|
||||||
<video controls preload="metadata">
|
|
||||||
<source src="{{ $src }}" alt="{{ $alt }}">
|
|
||||||
{{ i18n "browser_no_video_support" }}
|
|
||||||
</video>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if not $hidecaption }}
|
|
||||||
{{ with $alt }}
|
|
||||||
<figcaption>
|
|
||||||
{{ . | markdownify }}
|
|
||||||
</figcaption>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</figure>
|
|
@ -1,15 +0,0 @@
|
|||||||
{{ $resource := .Page.Resources.GetMatch (.Get "src") }}
|
|
||||||
|
|
||||||
{{ $noborder := false }}
|
|
||||||
{{ if .Get "noborder" }}
|
|
||||||
{{ $noborder = true }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $hidecaption := false }}
|
|
||||||
{{ if .Get "hidecaption" }}
|
|
||||||
{{ $hidecaption = true }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<p>
|
|
||||||
{{ partial "figure.html" (dict "src" $resource "noborder" $noborder "hidecaption" $hidecaption) }}
|
|
||||||
</p>
|
|
@ -1,20 +0,0 @@
|
|||||||
{{ $path := "" }}
|
|
||||||
{{ $markdown := false }}
|
|
||||||
{{ if .IsNamedParams }}
|
|
||||||
{{ $path = .Get "path" }}
|
|
||||||
{{ with .Get "markdown" }}
|
|
||||||
{{ $markdown = . }}
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $path = .Get 0 }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ with ($path | readFile) }}
|
|
||||||
{{ if $markdown }}
|
|
||||||
{{ $path | readFile | $.Page.RenderString (dict "display" "block") }}
|
|
||||||
{{ else }}
|
|
||||||
{{ $path | readFile }}
|
|
||||||
{{ end }}
|
|
||||||
{{ else }}
|
|
||||||
{{ errorf "file not found: %s" $path }}
|
|
||||||
{{ end }}
|
|
@ -1,13 +0,0 @@
|
|||||||
{{ $border := false }}
|
|
||||||
{{ if .Get "border" }}
|
|
||||||
{{ $border = true }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ $hidecaption := false }}
|
|
||||||
{{ if .Get "hidecaption" }}
|
|
||||||
{{ $hidecaption = true }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<p>
|
|
||||||
{{ partial "remote_figure.html" (dict "src" (.Get "src") "border" $border "hidecaption" $hidecaption "type" (.Get "type") "alt" (.Get "alt")) }}
|
|
||||||
</p>
|
|
@ -22,11 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ with .Resources.GetMatch "feature" }}
|
{{ partial "feature-figure.html" . }}
|
||||||
<div class="post-media">
|
|
||||||
{{ partial "figure.html" (dict "src" .) }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<article class="post-content">
|
<article class="post-content">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
@ -6,11 +6,7 @@
|
|||||||
|
|
||||||
{{ partial "page-metadata/post-short.html" . }}
|
{{ partial "page-metadata/post-short.html" . }}
|
||||||
|
|
||||||
{{ with .Resources.GetMatch "feature" }}
|
{{ partial "feature-figure.html" . }}
|
||||||
<div class="post-media">
|
|
||||||
{{ partial "figure.html" (dict "src" .) }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
<div class="page-description">
|
<div class="page-description">
|
||||||
{{ partial "description-or-summary.html" . }}
|
{{ partial "description-or-summary.html" . }}
|
Reference in New Issue
Block a user