Compare commits

...

10 Commits

Author SHA1 Message Date
Neil Hanlon
ea95b94a3d
shrugpw.com 2025-08-08 10:09:39 -04:00
Aditya Telange
5a4651783f
Fix breadcumb alignment in post-single
fixes: #1732
2025-05-24 10:28:29 +05:30
Atte
22da2f8c02
Add Finnish language translation (#1736) 2025-05-24 10:21:17 +05:30
Anthony Accioly
d3bc6af9b6
Add social icon for zcal (#1746) 2025-05-24 10:20:20 +05:30
James
ee1e0f3aa3
Add rel=edit attribute to change suggestion link 2025-05-17 23:32:29 +05:30
Jake Bailey
7cf752f864
Implement fixes for refreshed template system for Hugo v0.146.0+ (#1726) 2025-04-20 11:46:23 +05:30
Bjørn Erik Pedersen
149f12cea7
Add demosite link to theme.toml (#1724) 2025-04-14 23:14:24 +05:30
Aditya Telange
72615b6d49
Feat/improve cover image gen (#1628)
* Refactor cover.html

* Refactor 2

* Refactor 3

* Refactor 4

* Refactor 5

* add comments and refactor more

* Refactor cover.html to use <figcaption> for image captions

* Add comments and manage whitespace

* Remove pointer-event prevention from entry-cover image
2025-03-08 23:30:00 +05:30
David Guillot
e2e1011bde
[FEATURE] new opengraph 'fediverse:creator' meta (#1619)
**Usage**

Site level:

params:
  social:
    fediverse_creator: "@username@mastodon.social"

Page (Overrides Site level value):

---
title: "My Page"
social:
  fediverse_creator: "@username@mastodon.social"
---


Closes #1618 #1642

---------

Co-authored-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
2025-03-01 20:51:06 +05:30
PepeV_nRT
b4a056662a
Add social icon for Nextcloud (#1683) 2025-03-01 19:28:49 +05:30
17 changed files with 204 additions and 58 deletions

View File

@ -39,8 +39,8 @@ body:
label: Hugo Version
description: What version of Hugo are you running?
options:
- Hugo >= 0.125.7 (Recommended - Minimum version required for PaperMod)
- Hugo < 0.125.7 (Incompatible - Not recommended to build PaperMod on lower versions)
- Hugo >= 0.146.0 (Recommended - Minimum version required for PaperMod)
- Hugo < 0.146.0 (Incompatible - Not recommended to build PaperMod on lower versions)
validations:
required: true
- type: input

View File

@ -15,7 +15,7 @@ on:
hugoVersion:
description: "Hugo Version"
required: false
default: "0.125.7"
default: "0.146.0"
# Allow one concurrent deployment
concurrency:
@ -38,7 +38,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.125.7' }}
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.146.0' }}
steps:
- name: Install Hugo CLI
run: |

View File

@ -11,7 +11,7 @@
**ExampleSite** can be found here: [**exampleSite**](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite). Demo is built up with [exampleSite](https://github.com/adityatelange/hugo-PaperMod/tree/exampleSite) as source.
[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/themes/hugo-papermod/)
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=v0.125.7&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.125.7)
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=v0.146.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.146.0)
[![Discord](https://img.shields.io/discord/971046860317921340?label=Discord&logo=discord)](https://discord.gg/ahpmTvhVmp)
[![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE)
![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod)

View File

@ -97,7 +97,6 @@
.entry-cover img {
border-radius: var(--radius);
pointer-events: none;
width: 100%;
height: auto;
}

View File

@ -19,6 +19,7 @@
font-size: 14px;
display: flex;
flex-wrap: wrap;
align-items: center;
}
.post-meta .i18n_list li {
@ -124,8 +125,8 @@
padding-inline-start: 10px;
}
.post-content dd ~ dd,
.post-content dt ~ dt {
.post-content dd~dd,
.post-content dt~dt {
margin-top: 10px;
}
@ -160,7 +161,7 @@
direction: ltr;
}
.post-content li > .highlight {
.post-content li>.highlight {
margin-inline-end: 0;
}
@ -239,14 +240,14 @@
text-align: center;
}
.post-content figure > figcaption {
.post-content figure>figcaption {
color: var(--primary);
font-size: 16px;
font-weight: bold;
margin: 8px 0 16px;
}
.post-content figure > figcaption > p {
.post-content figure>figcaption>p {
color: var(--secondary);
font-size: 14px;
font-weight: normal;

33
i18n/fi.yaml Normal file
View File

@ -0,0 +1,33 @@
- id: prev_page
translation: "Edellinen"
- id: next_page
translation: "Seuraava"
- id: read_time
translation:
one : "1 min"
other: "{{ .Count }} minuuttia"
- id: words
translation:
one : "sana"
other: "{{ .Count }} sanaa"
- id: toc
translation: "Sisällysluettelo"
- id: translations
translation: "Käännökset"
- id: home
translation: "Etusivu"
- id: edit_post
translation: "Muokkaa"
- id: code_copy
translation: "Kopioi"
- id: code_copied
translation: "Kopioitu!"

View File

@ -1,5 +1,5 @@
{{- if lt hugo.Version "0.125.7" }}
{{- errorf "=> hugo v0.125.7 or greater is required for hugo-PaperMod to build " }}
{{- if lt hugo.Version "0.146.0" }}
{{- errorf "=> hugo v0.146.0 or greater is required for hugo-PaperMod to build " }}
{{- end -}}
<!DOCTYPE html>

View File

@ -116,6 +116,20 @@
</footer>
{{- end }}
{{- if site.Params.EnableFooterCTA }}
<div class="cta-block">
<p class="cta-lead">Want to keep going?</p>
<div class="cta-row">
<a href="/contact/" class="cta-button" >
Start a Conversation →
</a>
<a href="/posts/" class="cta-button ghost">
Read More Posts →
</a>
</div>
</div>
{{- end }}{{/* end EnableFooterCTA */}}
{{- end }}{{/* end profileMode */}}
{{- end }}{{- /* end main */ -}}

View File

@ -1,42 +1,64 @@
{{- with .cxt}} {{/* Apply proper context from dict */}}
{{- if (and .Params.cover.image (not $.isHidden)) }}
{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
{{- $loading := cond $.IsSingle "eager" "lazy" }}
<figure class="entry-cover">
{{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }}
{{- $loading := cond $.IsSingle "eager" "lazy" }}
{{- $addLink := (and site.Params.cover.linkFullImages $.IsSingle) }}
{{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }}
{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }}
{{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }}
{{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- $cover := (or $pageBundleCover $globalResourcesCover)}}
{{- if $cover -}}{{/* i.e it is present in page bundle */}}
{{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank"
rel="noopener noreferrer">{{ end -}}
{{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}}
{{- if hugo.IsExtended -}}
{{- $processableFormats = $processableFormats | append "webp" -}}
{{- end -}}
{{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }}
{{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }}
<img loading="{{$loading}}" srcset="{{- range $size := $sizes -}}
{{- if (ge $cover.Width $size) -}}
{{ printf "%s %s" (($cover.Resize (printf "%sx" $size)).Permalink) (printf "%sw ," $size) -}}
{{ end }}
{{- end -}}{{$cover.Permalink }} {{printf "%dw" ($cover.Width)}}"
sizes="(min-width: 768px) 720px, 100vw" src="{{ $cover.Permalink }}" alt="{{ $alt }}"
width="{{ $cover.Width }}" height="{{ $cover.Height }}">
{{- else }}{{/* Unprocessable image or responsive images disabled */}}
<img loading="{{$loading}}" src="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" alt="{{ $alt }}">
{{- end }}
{{- else }}{{/* For absolute urls and external links, no img processing here */}}
{{- if $addLink }}<a href="{{ (.Params.cover.image) | absURL }}" target="_blank"
rel="noopener noreferrer">{{ end -}}
<img loading="{{$loading}}" src="{{ (.Params.cover.image) | absURL }}" alt="{{ $alt }}">
{{- /* We are not using the .Param.cover.relative to decide the location of image */}}
{{- /* If we have the image in pageBundle or globalResources we can process the image */}}
{{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}}
{{- if hugo.IsExtended -}}
{{- $processableFormats = $processableFormats | append "webp" -}}
{{- end -}}
{{- $imgdl := (.Params.cover.image) | absURL }}
{{- if $cover -}}
{{- $imgdl = $cover.Permalink }}
{{- end -}}
{{- if $addLink }}
<a href="{{ $imgdl }}" target="_blank" rel="noopener noreferrer">
{{- end }}
{{- if $addLink }}</a>{{ end -}}
{{/* Display Caption */}}
{{- if $cover -}}
{{/* i.e it is present in page bundle */}}
{{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }}
<img loading="{{$loading}}"
srcset='{{- range $size := $sizes -}}
{{- if (ge $cover.Width $size) }}
{{- printf "%s %s" (($cover.Resize (printf "%sx" $size)).Permalink) (printf "%sw," $size) }}
{{- end }}
{{- end }}
{{- printf "%s %dw" ($cover.Permalink) ($cover.Width) }}'
src="{{ $cover.Permalink }}"
sizes="(min-width: 768px) 720px, 100vw"
width="{{ $cover.Width }}" height="{{ $cover.Height }}"
alt="{{ $alt }}">
{{- else }}{{/* Unprocessable image or responsive images disabled */}}
<img loading="{{ $loading }}" src="{{ $imgdl }}" alt="{{ $alt }}">
{{- end }}
{{- else }}
{{- /* For absolute urls and external links, no img processing here */}}
<img loading="{{ $loading }}" src="{{ $imgdl }}" alt="{{ $alt }}">
{{- end }}
{{- if $addLink }}
</a>
{{- end -}}
{{- /* Display Caption */}}
{{- if $.IsSingle }}
{{ with .Params.cover.caption }}<p>{{ . | markdownify }}</p>{{- end }}
{{ with .Params.cover.caption -}}
<figcaption>{{ . | markdownify }}</figcaption>
{{- end }}
{{- end }}
</figure>
{{- end }}{{/* End image */}}

View File

@ -2,7 +2,7 @@
{{- $fileUrlPath := path.Join .File.Path }}
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }}&nbsp;|&nbsp;{{- end -}}
<a href="{{ .Params.editPost.URL | default site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer" target="_blank">
<a href="{{ .Params.editPost.URL | default site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer edit" target="_blank">
{{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
</a>
{{- end }}

View File

@ -18,10 +18,23 @@
{{- range $i, $e := .Params.keywords }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- else }}
{{- range $i, $e := .Params.tags }}{{ if $i }}, {{ end }}{{ $e }}{{ end }} {{- end -}}">
{{- end }}
{{- if (not site.Params.ExternalSEO) }}
<meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if or .IsPage .IsSection}}
{{- .Summary | default (printf "%s - %s" .Title site.Title) }}{{- else }}
{{- with site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}">
{{- end }}
<meta name="author" content="{{ (partial "author.html" . ) }}">
{{- if site.Params.assets.logo }}
<meta propety="og:logo" content="{{ site.Params.assets.logo | absURL }}">
{{- end }}
<script defer data-domain="shrugpw.com" src="https://plausible.io/js/script.file-downloads.hash.outbound-links.js"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
<link rel="canonical" href="{{ if .Params.canonicalURL -}} {{ trim .Params.canonicalURL " " }} {{- else -}} {{ .Permalink }} {{- end }}">
{{- if site.Params.analytics.google.SiteVerificationTag }}
<meta name="google-site-verification" content="{{ site.Params.analytics.google.SiteVerificationTag }}">
@ -89,10 +102,14 @@
{{- end }}
{{- end -}}
{{- if (not site.Params.ExternalSEO) }}
{{- /* Favicons */}}
<link rel="icon" href="{{ site.Params.assets.favicon | default "favicon.ico" | absURL }}">
<link rel="icon" type="image/svg+xml" href="{{ site.Params.assets.iconSVG | default "favicon.ico" | absURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.Params.assets.favicon16x16 | default "favicon-16x16.png" | absURL }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.Params.assets.favicon32x32 | default "favicon-32x32.png" | absURL }}">
<link rel="icon" type="image/png" sizes="96x96" href="{{ site.Params.assets.favicon96x96 | default "favicon-96x96.png" | absURL }}">
<link rel="apple-touch-icon" href="{{ site.Params.assets.apple_touch_icon | default "apple-touch-icon.png" | absURL }}">
<link rel="mask-icon" href="{{ site.Params.assets.safari_pinned_tab | default "safari-pinned-tab.svg" | absURL }}">
<meta name="theme-color" content="{{ site.Params.assets.theme_color | default "#2e2e33" }}">
@ -106,6 +123,8 @@
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .Permalink }}">
{{ end -}}
{{- end }}
<noscript>
<style>
#theme-toggle,
@ -150,8 +169,17 @@
{{- /* Misc */}}
{{- if hugo.IsProduction | or (eq site.Params.env "production") }}
{{- template "_internal/google_analytics.html" . }}
{{- template "partials/templates/opengraph.html" . }}
{{- template "partials/templates/twitter_cards.html" . }}
{{- template "partials/templates/schema_json.html" . }}
{{- partial "google_analytics.html" . }}
{{- if site.Params.ExternalSEO }}
{{- partial "seo/modules/base/index" . }}
{{- partial "seo/modules/alternatives/index" . }}
{{- partial "seo/modules/favicons/index" . }}
{{- partial "seo/modules/open-graph/index" . }}
{{- partial "seo/modules/schema/index" . }}
{{- partial "seo/modules/twitter-cards/index" . }}
{{- else }}
{{- partial "templates/opengraph.html" . }}
{{- partial "templates/twitter_cards.html" . }}
{{- partial "templates/schema_json.html" . }}
{{- end }}
{{- end -}}

View File

@ -61,15 +61,19 @@
{{- end }}
{{- end }}
<img src="{{ $img.Permalink }}" alt="" aria-label="logo"
height="{{- site.Params.label.iconHeight | default "30" -}}">
height="{{- site.Params.label.iconHeight | default "30" -}}" {{- if site.Params.label.noText }}class="notext"{{- end -}}>
{{- else }}
<img src="{{- site.Params.label.icon | absURL -}}" alt="" aria-label="logo"
height="{{- site.Params.label.iconHeight | default "30" -}}">
height="{{- site.Params.label.iconHeight | default "30" -}}" {{- if site.Params.label.noText }}class="notext"{{- end -}}>
{{- end -}}
{{- else if hasPrefix site.Params.label.iconSVG "<svg" }}
{{ site.Params.label.iconSVG | safeHTML }}
{{- else if site.Params.label.iconSVGPath }}
{{ partial "icon.html" site.Params.label.iconSVGPath }}
{{- end -}}
{{- if not site.Params.label.noText }}
{{- $label_text -}}
{{- end -}}
</a>
{{- end }}
<div class="logo-switches">
@ -125,10 +129,20 @@
{{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
{{- $page_url:= $currentPage.Permalink | absLangURL }}
{{- $is_search := eq (site.GetPage .KeyName).Layout `search` }}
<li>
{{- $is_active := eq $menu_item_url $page_url }}
{{- if and (not $is_active) .HasChildren }}
{{- range .Children }}
{{- $child_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL)) | absLangURL }}
{{- if eq $child_url $page_url }}
{{- $is_active = true }}
{{- end }}
{{- end }}
{{- end }}
<li class="nav-item {{ if .HasChildren }}dropdown{{ end }}">
<a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}"
{{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }}>
<span {{- if eq $menu_item_url $page_url }} class="active" {{- end }}>
{{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }} class="nav-link {{ if .HasChildren }}dropdown-toggle {{ end }}" {{ if .HasChildren }}role=button data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" {{end}}>
<span {{- if $is_active }} class="active" {{- end }}>
{{- .Pre }}
{{- .Name -}}
{{ .Post -}}
@ -142,6 +156,20 @@
</svg>
{{- end }}
</a>
{{- if .HasChildren }}
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
{{- range .Children }}
{{- $is_active = false }}
{{- $child_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL)) | absLangURL }}
{{- if eq $child_url $page_url }}
{{- $is_active = true }}
{{- end }}
<li>
<a href="{{ .URL | absLangURL }}" class="dropdown-item{{- if $is_active }} active{{- end }}">{{ .Name }}</a>
</li>
{{- end }}
</ul>
{{- end }}
</li>
{{- end }}
</ul>

View File

@ -574,6 +574,11 @@
<path
d="M10.98,23.65c-2.69,0-5.26-1.05-7.24-2.95C1.59,18.63,.35,15.72,.35,12.73,.35,8.21,3.21,4.11,7.46,2.52c.15-.05,.3-.08,.45-.08,.42,0,.78,.21,.93,.55,.12,.26,.13,.51,.03,.75-.12,.28-.38,.52-.7,.64-3.48,1.3-5.82,4.66-5.82,8.36,0,2.46,1.02,4.84,2.79,6.54,1.6,1.54,3.68,2.39,5.85,2.39,.1,0,.2,0,.29,0,3.49-.12,6.22-1.91,7.47-4.89,.08-.2,2.01-4.93-2.59-7.9-.41-.27-.89-.46-1.42-.58l-.6-.14,.18,.58c.21,.68,.78,2.52,.84,2.93,.07,.46,.07,.51,.1,.92v.18c0,2.3-1.89,4.19-4.22,4.19-2.2,0-3.97-1.73-4.23-4.1-.25-2.35,.74-4.4,2.73-5.61,.53-.32,1.11-.57,1.73-.75l.33-.1-.48-1.74c-.16-.54-.53-2.38,1.5-3.72,.57-.38,1.22-.57,1.91-.57,1.38,0,2.62,.74,3.12,1.23,.22,.22,.36,.56,.36,.9,0,.26-.08,.48-.23,.63-.15,.15-.37,.23-.63,.23-.33,0-.67-.13-.89-.35-.06-.05-.85-.66-1.7-.66-.31,0-.59,.08-.82,.24-.04,.03-.08,.05-.12,.08-.23,.19-.71,.73-.47,1.82l.09,.34,.02,.07h0s.35,1.29,.35,1.29h.25c1.24,.08,2.39,.42,3.32,1.01l.05,.03c4.82,3.12,4.29,8.12,3.34,10.33-1.54,3.67-4.99,5.95-9.23,6.1-.12,0-.25,0-.37,0Zm.82-15.26c-.43,.13-.84,.31-1.2,.53-.94,.57-2.01,1.68-1.79,3.71,.12,1.12,.87,2.33,2.24,2.33,1.23,0,2.24-1,2.24-2.22h0s.03-.21-.05-.71c-.07-.46-.91-3.1-1-3.4l-.1-.33-.33,.1Z" />
</svg>
{{- else if (eq $icon_name "nextcloud") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<path
d="M12.018 6.537c-2.5 0-4.6 1.712-5.241 4.015-.56-1.232-1.793-2.105-3.225-2.105A3.569 3.569 0 0 0 0 12a3.569 3.569 0 0 0 3.552 3.553c1.432 0 2.664-.874 3.224-2.106.641 2.304 2.742 4.016 5.242 4.016 2.487 0 4.576-1.693 5.231-3.977.569 1.21 1.783 2.067 3.198 2.067A3.568 3.568 0 0 0 24 12a3.569 3.569 0 0 0-3.553-3.553c-1.416 0-2.63.858-3.199 2.067-.654-2.284-2.743-3.978-5.23-3.977zm0 2.085c1.878 0 3.378 1.5 3.378 3.378 0 1.878-1.5 3.378-3.378 3.378A3.362 3.362 0 0 1 8.641 12c0-1.878 1.5-3.378 3.377-3.378zm-8.466 1.91c.822 0 1.467.645 1.467 1.468s-.644 1.467-1.467 1.468A1.452 1.452 0 0 1 2.085 12c0-.823.644-1.467 1.467-1.467zm16.895 0c.823 0 1.468.645 1.468 1.468s-.645 1.468-1.468 1.468A1.452 1.452 0 0 1 18.98 12c0-.823.644-1.467 1.467-1.467z" />
</svg>
{{- else if (eq $icon_name "nuget") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor" stroke-width="2">
<g>
@ -954,6 +959,11 @@
</path>
<polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon>
</svg>
{{- else if (eq $icon_name "zcal") -}}
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke="none" stroke-width="2">
<path
d="M 6.3361243,0.07808093 C 5.8180004,0.26764401 5.5778938,0.65939444 5.5778938,1.3291631 v 0.657135 L 4.0993445,2.0368425 C 2.8735383,2.0747533 2.5196977,2.137941 2.0773961,2.3654147 1.4328997,2.7066112 0.81367829,3.4395676 0.63675749,4.0587918 0.5609351,4.3620871 0.52302343,7.71094 0.54829756,13.347115 c 0.0379117,7.923511 0.0631858,8.858662 0.25274319,9.199865 0.24010655,0.442301 0.65713395,0.947789 0.79614215,0.947789 0.050549,0 0.22747,0.113734 0.4043899,0.252743 0.3159299,0.252744 0.5181249,0.252744 10.0339192,0.252744 h 9.692714 l 0.556036,-0.417027 C 22.587534,23.35576 22.96665,22.913458 23.14357,22.610167 L 23.4595,22.041494 V 13.069097 4.0967026 L 23.168845,3.565943 C 23.004562,3.275291 22.688632,2.8961743 22.461163,2.7192545 22.031499,2.3906822 21.121622,1.9862981 20.919428,2.0242088 c -0.06319,0.012634 -0.581311,0.012634 -1.149984,0 L 18.720559,2.011575 V 1.506083 c 0,-1.18789452 -0.909878,-1.83238624 -1.88294,-1.3395374 -0.417027,0.22746432 -0.644496,0.68240244 -0.644496,1.3395374 V 2.011575 H 12.149226 8.1053295 V 1.53136 c 0,-1.02360844 -0.8972396,-1.76920805 -1.7692052,-1.45327907 z M 5.5778938,4.7159268 c 0,0.9477869 0.2780183,1.4153683 0.9225148,1.5291004 C 7.4355589,6.4219471 8.1053295,5.7269014 8.1053295,4.5642839 V 3.907149 h 4.0438965 4.043897 v 0.7835008 c 0.01264,0.8340548 0.176921,1.1752608 0.720319,1.478556 0.568673,0.3032858 1.326903,0.063178 1.630196,-0.5054921 0.101097,-0.2021968 0.176921,-0.6697687 0.176921,-1.0615191 V 3.907149 h 0.985699 c 0.89724,0 1.023611,0.025277 1.415364,0.3664734 l 0.442301,0.3664829 0.03791,3.5384066 0.03791,3.5510451 -0.417028,0.126371 c -0.227469,0.06319 -0.644495,0.202195 -0.922514,0.315929 -0.480212,0.176921 -3.829064,1.377453 -4.486197,1.604922 -0.176921,0.05055 -0.796142,0.278019 -1.39009,0.480214 l -1.07416,0.379114 -0.06319,-2.641169 -0.06318,-2.6538124 -0.40439,-0.4043842 C 12.275598,8.3933386 11.808022,8.4059819 10.190464,9.0125629 9.4954189,9.2653042 8.5349935,9.6065101 8.0421437,9.78343 c -0.859328,0.290652 -2.9065504,1.023608 -3.9175251,1.402725 -0.2780173,0.1011 -0.7329564,0.265384 -1.0109737,0.353844 -0.2780183,0.101097 -0.6065848,0.214832 -0.7203198,0.26538 -0.2148315,0.08846 -0.227469,-0.126371 -0.227469,-3.3362094 0,-2.8054559 0.037912,-3.5005015 0.1895583,-3.8037873 C 2.6839809,4.0208811 2.9872724,3.907149 4.3394511,3.907149 h 1.2384427 z m 5.3076142,9.5410662 c 0,2.577983 0.01264,2.666443 0.290655,2.982373 0.429665,0.518124 1.175258,0.556036 2.363153,0.126372 1.630196,-0.581311 4.423012,-1.579648 6.065845,-2.173595 0.871965,-0.303292 1.680745,-0.593947 1.807117,-0.631859 0.214831,-0.06319 0.227469,0.101097 0.189557,3.437313 l -0.03791,3.500498 -0.35384,0.303292 -0.353842,0.303292 H 11.90912 2.9619982 L 2.6207951,21.763475 C 2.4438743,21.586554 2.2543169,21.308537 2.2164053,21.169528 c -0.025274,-0.151646 -0.037912,-1.680744 -0.025274,-3.3994 l 0.037911,-3.146658 0.4423016,-0.151646 c 0.429664,-0.151646 2.3126032,-0.821416 5.3076145,-1.882939 0.7961422,-0.278018 1.7439301,-0.606585 2.0851336,-0.732957 0.353841,-0.126371 0.669772,-0.227469 0.732956,-0.227469 0.05055,-0.01264 0.08846,1.175257 0.08846,2.628534 z" />
</svg>
{{- else if (eq $icon_name "zhihu") -}}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" stroke="none" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round">

View File

@ -1,3 +1,4 @@
<meta property="og:url" content="{{ .Permalink }}">
{{- with or site.Title site.Params.title | plainify }}
@ -35,6 +36,10 @@
<meta property="og:type" content="website">
{{- end }}
{{- if site.Params.assets.logo }}
<meta propety="og:logo" content="{{ site.Params.assets.logo | absURL }}">
{{- end }}
{{- if .Params.cover.image -}}
{{- if (ne .Params.cover.relative true) }}
<meta property="og:image" content="{{ .Params.cover.image | absURL }}">
@ -80,3 +85,7 @@
{{- end }}
{{- end }}
{{- end }}
{{- with (.Param "social.fediverse_creator") }}
<meta name="fediverse:creator" content="{{ . }}">
{{- end }}

View File

@ -1,4 +1,5 @@
{{ if .IsHome }}
<script type="application/ld+json">
{
"@context": "https://schema.org",
@ -9,7 +10,7 @@
{{- if (eq site.Params.schema.publisherType "Person") }}
"image": {{ site.Params.assets.favicon | default "favicon.ico" | absURL }},
{{- else }}
"logo": {{ site.Params.assets.favicon | default "favicon.ico" | absURL }},
"logo": {{ site.Params.assets.logo | default "favicon.ico" | absURL }},
{{- end }}
"sameAs": [
{{- if site.Params.schema.sameAs }}
@ -85,7 +86,7 @@
{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }},
{{- end}}
{{- else }}
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
{{- $images := partial "templates/_funcs/get-page-images" . -}}
{{- with index $images 0 -}}
"image": {{ .Permalink }},
{{- end }}

View File

@ -6,7 +6,7 @@
<meta name="twitter:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}">
{{- end}}
{{- else }}
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
{{- $images := partial "templates/_funcs/get-page-images" . -}}
{{- with index $images 0 -}}
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ .Permalink }}">

View File

@ -6,6 +6,7 @@ license = "MIT"
licenselink = "https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE"
description = "A fast, clean, responsive Hugo theme"
homepage = "https://adityatelange.github.io/hugo-PaperMod/"
demosite = "https://adityatelange.github.io/hugo-PaperMod/"
tags = [
"responsive",
"simple",
@ -37,7 +38,7 @@ features = [
"scroll-to-top",
"search"
]
min_version = "0.125.7"
min_version = "0.146.0"
[author]
name = "Aditya Telange"