Compare commits

..

No commits in common. "608b0cde2861573650ff889dceada607dd647e6d" and "143341838df06f7259fa3289393696555916654a" have entirely different histories.

7 changed files with 38 additions and 30 deletions

View File

@ -1,11 +1,9 @@
baseURL = "https://foo-dogsquared.github.io/hugo-theme-more-contentful"
title = "More Contentful"
enableGitInfo = false
paginate = 20
rssLimit = 2
[pagination]
pagerSize = 20
[security]
enableInlineShortcodes = true
[security.exec]

6
flake.lock generated
View File

@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1744536153,
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
"lastModified": 1731890469,
"narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
"rev": "5083ec887760adfe12af64830a66807423a859a7",
"type": "github"
},
"original": {

View File

@ -12,7 +12,7 @@ Otherwise, we take the pages of a section. */ -}}
{{- range (.Paginate $pages).Pages }}
<article class="post">
<h1><a href="{{ .RelPermalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
{{ partial "components/post-meta.html" . }}
{{ partial "partials/components/post-meta.html" . }}
</article>
{{- end }}

View File

@ -5,7 +5,7 @@
<article>
<header>
<h1>{{ .Title }}</h1>
{{ partial "components/post-meta.html" . }}
{{ partial "partials/components/post-meta.html" . }}
</header>
{{ $is_toc := cond (ne .Params.toc nil) .Params.toc $.Site.Params.toc }}

View File

@ -0,0 +1,32 @@
{{- /*
Here's where all of the inline partials are defined.
If the partial is short enough, it should be put here.
*/ -}}
{{- /*
A partial that aliases the Heroicon template from the icon partial.
*/ -}}
{{- define "partials/components/heroicon.html" }}
{{- $name := default .id .name }}
{{- $res := resources.ExecuteAsTemplate (printf "icons/generic/%s.svg" .id)
(dict "id" .id
"name" $name)
(resources.Get "templates/heroicon.svg") }}
<svg class="site__icon">
<use href="{{ $res.RelPermalink }}#{{ $name }}"></use>
</svg>
{{ end }}
{{- /*
A partial for easily using icons from Simple Icons set.
*/ -}}
{{- define "partials/components/simple-icon.html" }}
{{- $name := default .id .name }}
{{- $res := resources.ExecuteAsTemplate (printf "icons/brand/%s.svg" .id)
(dict "id" .id
"name" $name)
(resources.Get "templates/simple-icon.svg") }}
<svg class="site__icon">
<use href="{{ $res.RelPermalink }}#{{ $name }}"></use>
</svg>
{{- end }}

View File

@ -1,11 +0,0 @@
{{- /*
A partial that aliases the Heroicon template from the icon partial.
*/ -}}
{{- $name := default .id .name }}
{{- $res := resources.ExecuteAsTemplate (printf "icons/generic/%s.svg" .id)
(dict "id" .id
"name" $name)
(resources.Get "templates/heroicon.svg") }}
<svg class="site__icon">
<use href="{{ $res.RelPermalink }}#{{ $name }}"></use>
</svg>

View File

@ -1,11 +0,0 @@
{{- /*
A partial for easily using icons from Simple Icons set.
*/ -}}
{{- $name := default .id .name }}
{{- $res := resources.ExecuteAsTemplate (printf "icons/brand/%s.svg" .id)
(dict "id" .id
"name" $name)
(resources.Get "templates/simple-icon.svg") }}
<svg class="site__icon">
<use href="{{ $res.RelPermalink }}#{{ $name }}"></use>
</svg>