Compare commits
16 Commits
2069d6bec8
...
9da42cdb9e
Author | SHA1 | Date |
---|---|---|
Daniel Perry | 9da42cdb9e | |
Aditya Telange | 0989c28a0e | |
Aditya Telange | fb1c0aeb6f | |
Aditya Telange | 69e5e085ab | |
Aditya Telange | f8e125c7ee | |
Aditya Telange | 5f624757ae | |
Aditya Telange | e3ad0aeb70 | |
Aditya Telange | f51ad49819 | |
Joe Mooring | ff7443b17f | |
Joe Mooring | 00488d0146 | |
Joe Mooring | cf62fa3c40 | |
Joe Mooring | 87df659c18 | |
Joe Mooring | 3fb112bc85 | |
Razon Yang | 102e089bc3 | |
Aditya Telange | 86362ebd72 | |
Daniel Perry | 3440731889 |
|
@ -26,7 +26,7 @@ Please fill the template below
|
|||
- Device/Os: [e.g. Android 10]
|
||||
- Type: [e.g. Desktop/Mobile]
|
||||
- Browser and version [e.g. Chrome 86.0]:
|
||||
- Hugo Version [ >=0.97.1 expected]:
|
||||
- Hugo Version [ >=0.112.4 expected]:
|
||||
- Theme Version [e.g. v4.0, master, or commit-id ]:
|
||||
|
||||
**Steps to reproduce the behavior:**
|
||||
|
|
|
@ -15,7 +15,7 @@ on:
|
|||
hugoVersion:
|
||||
description: "Hugo Version"
|
||||
required: false
|
||||
default: "0.97.1"
|
||||
default: "0.112.4"
|
||||
|
||||
# Allow one concurrent deployment
|
||||
concurrency:
|
||||
|
@ -38,14 +38,14 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: "0.97.1"
|
||||
HUGO_VERSION: "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-64bit.deb \
|
||||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \
|
||||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<h4 align=center>☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive</h4>
|
||||
<br>
|
||||
|
||||
> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3).
|
||||
> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3).<br>
|
||||
> The goal of this project is to add more features and customization to the og theme.
|
||||
|
||||
**Documentation** can be found here: [**📚 Wiki**](https://github.com/adityatelange/hugo-PaperMod/wiki)
|
||||
|
@ -11,10 +11,12 @@
|
|||
**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=HUGO-version&message=>0.97.1&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.97.1)
|
||||
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=>=v0.112.4&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.112.4)
|
||||
[![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)
|
||||
[![X (formerly Twitter) URL](https://img.shields.io/badge/-Share%20on%20X-gray?style=flat&logo=x)](https://x.com/intent/tweet/?text=Checkout%20Hugo%20PaperMod%20%E2%9C%A8%0AA%20fast,%20clean,%20responsive%20Hugo%20theme.&url=https://github.com/adityatelange/hugo-PaperMod&hashtags=Hugo,PaperMod)
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -27,12 +27,10 @@
|
|||
margin-inline-start: auto;
|
||||
}
|
||||
|
||||
.social-icons {
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.social-icons a:not(:last-of-type) {
|
||||
margin-inline-end: 12px;
|
||||
.social-icons a {
|
||||
display: inline-flex;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.social-icons a svg {
|
||||
|
|
|
@ -10,19 +10,20 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.profile .profile_inner h1 {
|
||||
padding: 12px 0;
|
||||
.profile .profile_inner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.profile img {
|
||||
display: inline-table;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
flex-wrap: wrap;
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.button {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{- if lt hugo.Version "0.97.1" }}
|
||||
{{- errorf "=> hugo v0.97.1 or greater is required for hugo-PaperMod to build " }}
|
||||
{{- if lt hugo.Version "0.112.4" }}
|
||||
{{- errorf "=> hugo v0.112.4 or greater is required for hugo-PaperMod to build " }}
|
||||
{{- end -}}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
|
|
@ -45,7 +45,8 @@
|
|||
{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }}
|
||||
{{- end }}
|
||||
|
||||
{{- $paginator := .Paginate $pages }}
|
||||
{{- $sorted := ($pages.ByParam "date").Reverse }}
|
||||
{{- $paginator := .Paginate $sorted }}
|
||||
|
||||
{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }}
|
||||
{{- partial "home_info.html" . }}
|
||||
|
|
|
@ -1,21 +1,53 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}{{ $pctx = site }}{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
|
||||
{{- $authorEmail := "" }}
|
||||
{{- with site.Params.author }}
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- with .email }}
|
||||
{{- $authorEmail = . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Author.email }}
|
||||
{{- $authorEmail = . }}
|
||||
{{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
|
||||
{{- $authorName := "" }}
|
||||
{{- with site.Params.author }}
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- with .name }}
|
||||
{{- $authorName = . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $authorName = . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Author.name }}
|
||||
{{- $authorName = . }}
|
||||
{{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- $pctx := . }}
|
||||
{{- if .IsHome }}{{ $pctx = site }}{{ end }}
|
||||
{{- $pages := slice }}
|
||||
{{- if or $.IsHome $.IsSection }}
|
||||
{{- $pages = $pctx.RegularPages }}
|
||||
{{- else }}
|
||||
{{- $pages = $pctx.Pages }}
|
||||
{{- end }}
|
||||
{{- $limit := site.Config.Services.RSS.Limit }}
|
||||
{{- if ge $limit 1 }}
|
||||
{{- $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" xmlns:content="http://purl.org/rss/1.0/modules/content/">
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ site.Title }}{{ end }}</title>
|
||||
<title>{{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ site.Title }}</description>
|
||||
<description>Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }}</description>
|
||||
{{- with site.Params.images }}
|
||||
<image>
|
||||
<title>{{ site.Title }}</title>
|
||||
|
@ -23,22 +55,22 @@
|
|||
<link>{{ index . 0 | absURL }}</link>
|
||||
</image>
|
||||
{{- end }}
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with site.LanguageCode }}
|
||||
<language>{{.}}</language>{{end}}{{ with site.Author.email }}
|
||||
<managingEditor>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with site.Author.email }}
|
||||
<webMaster>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with site.Copyright }}
|
||||
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>{{ site.Language.LanguageCode }}</language>{{ with $authorEmail }}
|
||||
<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 }}
|
||||
{{- with .OutputFormats.Get "RSS" -}}
|
||||
{{- with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end -}}
|
||||
{{ range $pages }}
|
||||
{{- end }}
|
||||
{{- range $pages }}
|
||||
{{- if and (ne .Layout `search`) (ne .Layout `archives`) }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{ with site.Author.email }}<author>{{.}}{{ with site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
{{- with $authorEmail }}<author>{{ . }}{{ with $authorName }} ({{ . }}){{ end }}</author>{{ end }}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}}</description>
|
||||
{{- if site.Params.ShowFullTextinRSS }}
|
||||
|
@ -46,6 +78,6 @@
|
|||
{{- end }}
|
||||
</item>
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
{{- end }}
|
||||
</channel>
|
||||
</rss>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{{ .Content | markdownify }}
|
||||
</div>
|
||||
<footer class="entry-footer">
|
||||
{{ partial "social_icons.html" site.Params.socialIcons }}
|
||||
{{ partial "social_icons.html" (dict "align" site.Params.homeInfoParams.AlignSocialIconsTo) }}
|
||||
</footer>
|
||||
</article>
|
||||
{{- end -}}
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
{{- end }}
|
||||
<h1>{{ .title | default site.Title | markdownify }}</h1>
|
||||
<span>{{ .subtitle | markdownify }}</span>
|
||||
{{- partial "social_icons.html" site.Params.socialIcons -}}
|
||||
{{- partial "social_icons.html" -}}
|
||||
|
||||
{{- with .buttons }}
|
||||
<div class="buttons">
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<div class="social-icons">
|
||||
{{- range . }}
|
||||
<a href="{{ trim .url " " | safeURL }}" target="_blank" rel="noopener noreferrer me" title="{{ (.title | default .name) | title }}">
|
||||
<div class="social-icons" {{ with .align}}align="{{.}}" {{- end }}>
|
||||
{{- range site.Params.socialIcons }}
|
||||
<a href="{{ trim .url " " | safeURL }}" target="_blank" rel="noopener noreferrer me"
|
||||
title="{{ (.title | default .name) | title }}">
|
||||
{{ partial "svg.html" . }}
|
||||
</a>
|
||||
{{- end }}
|
||||
|
|
|
@ -41,12 +41,27 @@
|
|||
{{- /* If it is part of a series, link to related articles */}}
|
||||
{{- $permalink := .Permalink }}
|
||||
{{- $siteSeries := site.Taxonomies.series }}
|
||||
{{- if $siteSeries }}
|
||||
{{ with .Params.series }}{{- range $name := . }}
|
||||
{{- $series := index $siteSeries ($name | urlize) }}
|
||||
{{- range $page := first 6 $series.Pages }}
|
||||
{{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }}
|
||||
{{- end }}
|
||||
{{ end }}{{ end }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
|
||||
{{- $facebookAdmin := "" }}
|
||||
{{- with site.Params.social }}
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- $facebookAdmin = .facebook_admin }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Social.facebook_admin }}
|
||||
{{- $facebookAdmin = . }}
|
||||
{{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Facebook Page Admin ID for Domain Insights */}}
|
||||
{{- with site.Social.facebook_admin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}
|
||||
{{ with $facebookAdmin }}<meta property="fb:admins" content="{{ . }}" />{{ end }}
|
||||
|
|
|
@ -28,6 +28,23 @@
|
|||
{{- 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 -}}"/>
|
||||
{{ with site.Social.twitter -}}
|
||||
<meta name="twitter:site" content="@{{ . }}"/>
|
||||
{{ end -}}
|
||||
{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}}
|
||||
{{- $twitterSite := "" }}
|
||||
{{- with site.Params.social }}
|
||||
{{- if reflect.IsMap . }}
|
||||
{{- $twitterSite = .twitter }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with site.Social.twitter }}
|
||||
{{- $twitterSite = . }}
|
||||
{{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- with $twitterSite }}
|
||||
{{- $content := . }}
|
||||
{{- if not (strings.HasPrefix . "@") }}
|
||||
{{- $content = printf "@%v" $twitterSite }}
|
||||
{{- end }}
|
||||
<meta name="twitter:site" content="{{ $content }}"/>
|
||||
{{- end }}
|
||||
|
|
|
@ -37,7 +37,7 @@ features = [
|
|||
"scroll-to-top",
|
||||
"search"
|
||||
]
|
||||
min_version = "0.97.1"
|
||||
min_version = "0.112.4"
|
||||
|
||||
[author]
|
||||
name = "Aditya Telange"
|
||||
|
|
Loading…
Reference in New Issue