Merge branch 'adityatelange:master' into master

This commit is contained in:
Soaibuzzaman 2024-03-21 11:01:21 +01:00 committed by GitHub
commit eaea984457
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 200 additions and 67 deletions

View File

@ -2,4 +2,4 @@ blank_issues_enabled: false
contact_links:
- name: PaperMod Discussions
url: https://github.com/adityatelange/hugo-PaperMod/discussions
about: Please ask and answer questions/doubts here, do not open an issue for questions.
about: Please ask and answer questions/doubts here, DO NOT open an issue for questions.

View File

@ -1,7 +0,0 @@
---
name: New Blank Issue
about: Anything other than bug report
title: ""
labels: ""
assignees: ""
---

7
.github/ISSUE_TEMPLATE/proposal.md vendored Normal file
View File

@ -0,0 +1,7 @@
---
name: Proposal
about: Propose a new feature or change to a feature for Hugo-PaperMod.
title: ""
labels: "enhancement"
assignees: ""
---

17
.github/stale.yml vendored
View File

@ -1,17 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 7
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 3
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- keep
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

View File

@ -38,11 +38,8 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: "0.112.4"
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.112.4' }}
steps:
- name: Check version
if: ${{ github.event.inputs.hugoVersion }}
run: export HUGO_VERSION="${{ github.event.inputs.hugoVersion }}"
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \
@ -61,7 +58,7 @@ jobs:
- name: Build with Hugo
run: |
hugo \
--buildDrafts --gc --verbose \
--buildDrafts --gc \
--baseURL ${{ steps.pages.outputs.base_url }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v2

View File

@ -35,19 +35,20 @@
- [Profile Mode.](https://github.com/adityatelange/hugo-PaperMod/wiki/Features#profile-mode)
- Table of Content Generation (newer implementation).
- Archive of posts.
- Social Icons (home-info and profile-mode)
- Social Icons (home-info and profile-mode).
- Social-Media Share buttons on posts.
- Menu location indicator.
- Multilingual support. (with language selector)
- Taxonomies
- Multilingual support. (with language selector).
- Taxonomies.
- Cover image for each post (with Responsive image support).
- Light/Dark theme (automatic theme switch a/c to browser theme and theme-switch button).
- SEO Friendly.
- Multiple Author support.
- Search Page with Fuse.js
- Other Posts suggestion below a post
- Breadcrumb Navigation
- Code Block Copy buttons
- Breadcrumb Navigation.
- Code Block Copy buttons.
- Hugo's Chroma syntax highlighter.
- No webpack, nodejs and other dependencies are required to edit the theme.
Read Wiki For More Details => **[PaperMod - Features](https://github.com/adityatelange/hugo-PaperMod/wiki/Features)**

33
i18n/pa.yaml Normal file
View File

@ -0,0 +1,33 @@
- id: prev_page
translation: "ਪਿਛਲਾ"
- id: next_page
translation: "ਅਗਲਾ"
- id: read_time
translation:
one: "1 ਮਿੰਟ"
other: "{{ .Count }} ਮਿੰਟ"
- id: words
translation:
one: "ਸ਼ਬਦ"
other: "{{ .Count }} ਸ਼ਬਦ"
- id: toc
translation: "ਤਤਕਰਾ"
- id: translations
translation: "ਅਨੁਵਾਦ"
- id: home
translation: "ਘਰ"
- id: edit_post
translation: "ਸੋਧ"
- id: code_copy
translation: "ਕਾਪੀ"
- id: code_copied
translation: "ਕਾਪੀ ਕੀਤੀ ਗਈ!!"

33
i18n/pnb.yaml Normal file
View File

@ -0,0 +1,33 @@
- id: prev_page
translation: "پِچھلا"
- id: next_page
translation: "اگلا"
- id: read_time
translation:
one: "ایک منٹ"
other: "مِنٹ {{ .Count }}"
- id: words
translation:
one: "لفظ"
other: "لفظ {{ .Count }}"
- id: toc
translation: "تتکرا"
- id: translations
translation: "انوواد"
- id: home
translation: "گھر"
- id: edit_post
translation: "سودھ"
- id: code_copy
translation: "کاپی"
- id: code_copied
translation: "کاپی کیتی گئی!"

View File

@ -43,7 +43,7 @@
{{- $pages = $pages | first $limit }}
{{- end }}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
@ -60,7 +60,7 @@
<managingEditor>{{.}}{{ with $authorName }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with $authorEmail }}
<webMaster>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with site.Copyright }}
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
@ -73,7 +73,7 @@
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
<guid>{{ .Permalink }}</guid>
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
{{- if site.Params.ShowFullTextinRSS }}
{{- if and site.Params.ShowFullTextinRSS .Content }}
<content:encoded>{{ (printf "<![CDATA[%s]]>" .Content) | safeHTML }}</content:encoded>
{{- end }}
</item>

View File

@ -98,7 +98,7 @@
{{- $lang := .Lang}}
{{- $separator := or $label_text (not site.Params.disableThemeToggle)}}
{{- with site.Home.AllTranslations }}
{{- with site.Home.Translations }}
<ul class="lang-switch">
{{- if $separator }}<li>|</li>{{ end }}
{{- range . -}}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,47 @@
{{- $imgs := slice }}
{{- $imgParams := .Params.images }}
{{- $resources := .Resources.ByType "image" -}}
{{/* Find featured image resources if the images parameter is empty. */}}
{{- if not $imgParams }}
{{- $featured := $resources.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $resources.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured }}
{{- $imgs = $imgs | append (dict
"Image" .
"RelPermalink" .RelPermalink
"Permalink" .Permalink) }}
{{- end }}
{{- end }}
{{/* Use the first one of site images as the fallback. */}}
{{- if and (not $imgParams) (not $imgs) }}
{{- with site.Params.images }}
{{- $imgParams = first 1 . }}
{{- end }}
{{- end }}
{{/* Parse page's images parameter. */}}
{{- range $imgParams }}
{{- $img := . }}
{{- $url := urls.Parse $img }}
{{- if eq $url.Scheme "" }}
{{/* Internal image. */}}
{{- with $resources.GetMatch $img -}}
{{/* Image resource. */}}
{{- $imgs = $imgs | append (dict
"Image" .
"RelPermalink" .RelPermalink
"Permalink" .Permalink) }}
{{- else }}
{{- $imgs = $imgs | append (dict
"RelPermalink" (relURL $img)
"Permalink" (absURL $img)
) }}
{{- end }}
{{- else }}
{{/* External image */}}
{{- $imgs = $imgs | append (dict
"RelPermalink" $img
"Permalink" $img
) }}
{{- end }}
{{- end }}
{{- return $imgs }}

View File

@ -10,18 +10,10 @@
{{- end}}
{{- else }}
{{- with $.Params.images -}}
{{- range first 6 . }}<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
{{- else -}}
{{- $images := $.Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}}
<meta property="og:image" content="{{ $featured.Permalink }}"/>
{{- else -}}
{{- with site.Params.images }}<meta property="og:image" content="{{ index . 0 | absURL }}"/>{{ end -}}
{{- end -}}
{{- end -}}
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
{{- range first 6 $images }}
<meta property="og:image" content="{{ .Permalink }}" />
{{ end -}}
{{- end }}
{{- if .IsPage }}

View File

@ -80,6 +80,11 @@
{{- else -}}
{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }},
{{- end}}
{{- else }}
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
{{- with index $images 0 -}}
"image": {{ .Permalink }},
{{- end }}
{{- end -}}
"datePublished": {{ .PublishDate }},
"dateModified": {{ .Lastmod }},

View File

@ -6,25 +6,13 @@
<meta name="twitter:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}" />
{{- end}}
{{- else }}
{{- with $.Params.images -}}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
{{ else -}}
{{- $images := $.Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- with $featured -}}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ $featured.Permalink }}"/>
{{- $images := partial "partials/templates/_funcs/get-page-images" . -}}
{{- with index $images 0 -}}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="{{ .Permalink }}" />
{{- else -}}
{{- with site.Params.images -}}
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
{{ else -}}
<meta name="twitter:card" content="summary"/>
{{- end -}}
{{- end -}}
{{- end }}
{{- end }}
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>