Merge branch 'master' into wordpress-icon

This commit is contained in:
Aditya Telange 2023-11-11 20:53:29 +05:30 committed by GitHub
commit 6936ccee06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 429 additions and 61 deletions

View File

@ -26,7 +26,7 @@ Please fill the template below
- Device/Os: [e.g. Android 10] - Device/Os: [e.g. Android 10]
- Type: [e.g. Desktop/Mobile] - Type: [e.g. Desktop/Mobile]
- Browser and version [e.g. Chrome 86.0]: - Browser and version [e.g. Chrome 86.0]:
- Hugo Version [ >=0.83.0 expected]: - Hugo Version [ >=0.97.1 expected]:
- Theme Version [e.g. v4.0, master, or commit-id ]: - Theme Version [e.g. v4.0, master, or commit-id ]:
**Steps to reproduce the behavior:** **Steps to reproduce the behavior:**

View File

@ -15,7 +15,7 @@ on:
hugoVersion: hugoVersion:
description: "Hugo Version" description: "Hugo Version"
required: false required: false
default: "0.83.0" default: "0.97.1"
# Allow one concurrent deployment # Allow one concurrent deployment
concurrency: concurrency:
@ -38,7 +38,7 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
HUGO_VERSION: "0.83.0" HUGO_VERSION: "0.97.1"
steps: steps:
- name: Check version - name: Check version
if: ${{ github.event.inputs.hugoVersion }} if: ${{ github.event.inputs.hugoVersion }}
@ -53,7 +53,7 @@ jobs:
ref: exampleSite ref: exampleSite
- name: Setup Pages - name: Setup Pages
id: pages id: pages
uses: actions/configure-pages@v1 uses: actions/configure-pages@v3
- name: Get Theme - name: Get Theme
run: git submodule update --init --recursive run: git submodule update --init --recursive
- name: Update theme to Latest commit - name: Update theme to Latest commit
@ -64,7 +64,7 @@ jobs:
--buildDrafts --gc --verbose \ --buildDrafts --gc --verbose \
--baseURL ${{ steps.pages.outputs.base_url }} --baseURL ${{ steps.pages.outputs.base_url }}
- name: Upload artifact - name: Upload artifact
uses: actions/upload-pages-artifact@v1 uses: actions/upload-pages-artifact@v2
with: with:
path: ./public path: ./public
# Deployment job # Deployment job
@ -77,4 +77,4 @@ jobs:
steps: steps:
- name: Deploy to GitHub Pages - name: Deploy to GitHub Pages
id: deployment id: deployment
uses: actions/deploy-pages@v1 uses: actions/deploy-pages@v2

View File

@ -1,7 +1,7 @@
MIT License MIT License
Copyright (c) 2020 nanxiaobei and adityatelange Copyright (c) 2020 nanxiaobei and adityatelange
Copyright (c) 2021-2022 adityatelange Copyright (c) 2021-2023 adityatelange
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -3,20 +3,18 @@
<h4 align=center>☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive</h4> <h4 align=center>☄️ Fast | ☁️ Fluent | 🌙 Smooth | 📱 Responsive</h4>
<br> <br>
> Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper). > Hugo PaperMod is a theme based on [hugo-paper](https://github.com/nanxiaobei/hugo-paper/tree/4330c8b12aa48bfdecbcad6ad66145f679a430b3).
> The goal of this project is to add more features and customization to the og theme. > The goal of this project is to add more features and customization to the og theme.
The [demo](https://adityatelange.github.io/hugo-PaperMod/) includes a lot of documentation about Installation, Features with a few more stuff. Make sure you visit it, to get an awesome hands-on experience and get to know about the features ... **Documentation** can be found here: [**📚 Wiki**](https://github.com/adityatelange/hugo-PaperMod/wiki)
**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. **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.
[![Minimum Hugo Version](https://img.shields.io/static/v1?label=min-HUGO-version&message=0.83.0&color=blue&logo=hugo)](https://github.com/gohugoio/hugo/releases/tag/v0.83.0)
[![Build GH-Pages](https://github.com/adityatelange/hugo-PaperMod/workflows/Build%20GH-Pages/badge.svg)](https://github.com/adityatelange/hugo-PaperMod/deployments/activity_log?environment=github-pages)
[![GitHub](https://img.shields.io/github/license/adityatelange/hugo-PaperMod)](https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE)
[![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/themes/hugo-papermod/) [![hugo-papermod](https://img.shields.io/badge/Hugo--Themes-@PaperMod-blue)](https://themes.gohugo.io/themes/hugo-papermod/)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=adityatelange_hugo-PaperMod&metric=alert_status)](https://sonarcloud.io/dashboard?id=adityatelange_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)
[![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) ![code-size](https://img.shields.io/github/languages/code-size/adityatelange/hugo-PaperMod)
[![Discord](https://img.shields.io/discord/971046860317921340?label=Discord)](https://discord.gg/ahpmTvhVmp)
--- ---
@ -60,18 +58,18 @@ Read Wiki For More Details => **[PaperMod - Installation](https://github.com/adi
--- ---
## Social-Icons/Share-Icons 🖼️
Read Wiki For More Details => **[PaperMod-Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)**
---
## FAQs / How To's Guide 🙋 ## FAQs / How To's Guide 🙋
Read Wiki For More Details => **[PaperMod-FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)** Read Wiki For More Details => **[PaperMod-FAQs](https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs)**
--- ---
## Social-Icons/Share-Icons 🖼️
Read Wiki For More Details => **[PaperMod-Icons](https://github.com/adityatelange/hugo-PaperMod/wiki/Icons)**
---
## Release Changelog 📃 ## Release Changelog 📃
Release ChangeLog has info about stuff added: **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)** Release ChangeLog has info about stuff added: **[Releases](https://github.com/adityatelange/hugo-PaperMod/releases)**
@ -82,6 +80,14 @@ Release ChangeLog has info about stuff added: **[Releases](https://github.com/ad
--- ---
## Support 🫶
- Star 🌟 this repository.
- Help spread the word about PaperMod by sharing it on social media and recommending it to your friends. 🗣️
- You can also sponsor 🏅 on [Github Sponsors](https://github.com/sponsors/adityatelange) / [Ko-Fi](https://ko-fi.com/adityatelange).
---
## Special Thanks 🌟 ## Special Thanks 🌟
- [**Highlight.js**](https://github.com/highlightjs/highlight.js) - [**Highlight.js**](https://github.com/highlightjs/highlight.js)
@ -90,7 +96,8 @@ Release ChangeLog has info about stuff added: **[Releases](https://github.com/ad
- [**Simple Icons**](https://github.com/simple-icons/simple-icons) - [**Simple Icons**](https://github.com/simple-icons/simple-icons)
- **All Contributors and Supporters** - **All Contributors and Supporters**
---
## Stargazers over time 📈 ## Stargazers over time 📈
<kbd>[![Stargazers over time](https://starchart.cc/adityatelange/hugo-PaperMod.svg)](https://starchart.cc/adityatelange/hugo-PaperMod)</kbd> <kbd>[![Stargazers over time](https://starchart.cc/adityatelange/hugo-PaperMod.svg)](https://starchart.cc/adityatelange/hugo-PaperMod)</kbd>

View File

@ -83,8 +83,7 @@
} }
.post-content del { .post-content del {
text-decoration: none; text-decoration: line-through;
background: linear-gradient(to right, var(--primary) 100%, transparent 0) 0 50%/1px 1px repeat-x;
} }
.post-content dl, .post-content dl,
@ -400,4 +399,4 @@ h1>a>svg {
img.in-text { img.in-text {
display: inline; display: inline;
margin: auto; margin: auto;
} }

View File

@ -1,6 +1,6 @@
/* /*
PaperMod v6 PaperMod v7
License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE
Copyright (c) 2020 nanxiaobei and adityatelange Copyright (c) 2020 nanxiaobei and adityatelange
Copyright (c) 2021-2022 adityatelange Copyright (c) 2021-2023 adityatelange
*/ */

View File

@ -7,6 +7,8 @@
html { html {
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
overflow-y: scroll; overflow-y: scroll;
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
} }
a, a,

View File

@ -77,7 +77,12 @@ sInput.onkeyup = function (e) {
// run a search query (for "term") every time a letter is typed // run a search query (for "term") every time a letter is typed
// in the search box // in the search box
if (fuse) { if (fuse) {
const results = fuse.search(this.value.trim()); // the actual query being run using fuse.js let results;
if (params.fuseOpts) {
results = fuse.search(this.value.trim(), {limit: params.fuseOpts.limit}); // the actual query being run using fuse.js along with options
} else {
results = fuse.search(this.value.trim()); // the actual query being run using fuse.js
}
if (results.length !== 0) { if (results.length !== 0) {
// build our html if result exists // build our html if result exists
let resultSet = ''; // our results bucket let resultSet = ''; // our results bucket

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
/* /*
PaperMod v6 PaperMod v7
License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE License: MIT https://github.com/adityatelange/hugo-PaperMod/blob/master/LICENSE
Copyright (c) 2020 nanxiaobei and adityatelange Copyright (c) 2020 nanxiaobei and adityatelange
Copyright (c) 2021-2022 adityatelange Copyright (c) 2021-2023 adityatelange
*/ */

View File

@ -1,8 +1,8 @@
- id: prev_page - id: prev_page
translation: "الصفحة السابقة" translation: "السابق"
- id: next_page - id: next_page
translation: "الصفحة التالية" translation: "التالي"
- id: read_time - id: read_time
translation: translation:
@ -20,3 +20,9 @@
- id: home - id: home
translation: "الصفحة الرئيسية" translation: "الصفحة الرئيسية"
- id: code_copied
translation: "تم النسخ!"
- id: code_copy
translation: "نسخ الكود"

39
i18n/be.yaml Normal file
View File

@ -0,0 +1,39 @@
- id: prev_page
translation: "Папярэдняя"
- id: next_page
translation: "Наступная"
- id: read_time
translation:
zero: "0 хвілін"
one: "1 хвіліна"
few: "{{ .Count }} хвіліны"
many: "{{ .Count }} хвілін"
other: "{{ .Count }} хвілін"
- id: words
translation:
zero: "няма слоў"
one: "1 слова"
few: "{{ .Count }} слова"
many: "{{ .Count }} слоў"
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/el.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: "αντιγράφηκε!"

View File

@ -1,8 +1,8 @@
- id: prev_page - id: prev_page
translation: "Page précédente" translation: "Précédent"
- id: next_page - id: next_page
translation: "Page suivante" translation: "Suivant"
- id: read_time - id: read_time
translation: translation:

View File

@ -1,8 +1,8 @@
- id: prev_page - id: prev_page
translation: "Pag Prec" translation: "Precedente"
- id: next_page - id: next_page
translation: "Pag Succ" translation: "Successivo"
- id: read_time - id: read_time
translation: translation:
@ -15,11 +15,17 @@
other: "{{ .Count }} parole" other: "{{ .Count }} parole"
- id: toc - id: toc
translation: "Tabella dei Contenuti" translation: "Indice contenuti"
- id: translations - id: translations
translation: "Traduzioni" translation: "Traduzioni"
- id: home
translation: "Home"
- id: edit_post
translation: "Modifica"
- id: code_copy - id: code_copy
translation: "copia" translation: "copia"

View File

@ -1,8 +1,8 @@
- id: prev_page - id: prev_page
translation: "前のページ" translation: "前"
- id: next_page - id: next_page
translation: "次のページ" translation: "次"
- id: read_time - id: read_time
translation: translation:

33
i18n/no.yaml Normal file
View File

@ -0,0 +1,33 @@
- id: prev_page
translation: "Forrige Side"
- id: next_page
translation: "Neste Side"
- id: read_time
translation:
one: "1 min"
other: "{{ .Count }} min"
- id: words
translation:
one: "ord"
other: "{{ .Count }} ord"
- id: toc
translation: "Innholdsfortegnelse"
- id: translations
translation: "Oversettelser"
- id: home
translation: "Hjem"
- id: edit_post
translation: "Rediger"
- id: code_copy
translation: "Kopier"
- id: code_copied
translation: "Kopiert!"

View File

@ -1,14 +1,19 @@
- id: prev_page - id: prev_page
translation: "Poprzednia strona" translation: "Poprzednia"
- id: next_page - id: next_page
translation: "Następna strona" translation: "Następna"
- id: read_time - id: read_time
translation: translation:
one: "1 min" one: "1 min"
other: "{{ .Count }} min" other: "{{ .Count }} min"
- id: words
translation:
one : "słowo"
other: "{{ .Count }} słów"
- id: toc - id: toc
translation: "Spis treści" translation: "Spis treści"

View File

@ -19,3 +19,15 @@
- id: translations - id: translations
translation: "Traduções" translation: "Traduções"
- id: home
translation: "Início"
- id: edit_post
translation: "Editar"
- id: code_copy
translation: "copiar"
- id: code_copied
translation: "copiado!"

33
i18n/sw.yaml Normal file
View File

@ -0,0 +1,33 @@
- id: prev_page
translation: "Uliopita"
- id: next_page
translation: "Ujao"
- id: read_time
translation:
one : "dakika 1"
other: "dakika {{ .Count }}"
- id: words
translation:
one : "neno"
other: "maneno {{ .Count }}"
- id: toc
translation: "Jedwali la Yaliyomo"
- id: translations
translation: "Tafsiri"
- id: home
translation: "Mwanzo"
- id: edit_post
translation: "Hariri"
- id: code_copy
translation: "nakili"
- id: code_copied
translation: "nakiliwa!"

33
i18n/th.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: "คัดลอกแล้ว!"

View File

@ -6,9 +6,14 @@
- id: read_time - id: read_time
translation: translation:
one : "1 phút" one: "1 phút"
other: "{{ .Count }} phút" other: "{{ .Count }} phút"
- id: words
translation:
one: "từ"
other: "{{ .Count }} từ"
- id: toc - id: toc
translation: "Mục lục" translation: "Mục lục"
@ -18,6 +23,9 @@
- id: home - id: home
translation: "Trang chủ" translation: "Trang chủ"
- id: edit_post
translation: "Chỉnh sửa"
- id: code_copy - id: code_copy
translation: "Sao chép" translation: "Sao chép"

View File

@ -1,7 +1,25 @@
{{- define "main" }} {{- define "main" }}
<header class="page-header"> <header class="page-header">
<h1>{{ .Title }}</h1> <h1>
{{ .Title }}
{{- if (.Param "ShowRssButtonInSectionTermList") }}
{{- $rss := (.OutputFormats.Get "rss") }}
{{- if (eq .Kind `page`) }}
{{- $rss = (.Parent.OutputFormats.Get "rss") }}
{{- end }}
{{- with $rss }}
<a href="{{ .RelPermalink }}" title="RSS" aria-label="RSS">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round" height="23">
<path d="M4 11a9 9 0 0 1 9 9" />
<path d="M4 4a16 16 0 0 1 16 16" />
<circle cx="5" cy="19" r="1" />
</svg>
</a>
{{- end }}
{{- end }}
</h1>
{{- if .Description }} {{- if .Description }}
<div class="post-description"> <div class="post-description">
{{ .Description }} {{ .Description }}

View File

@ -1,3 +1,7 @@
{{- if lt hugo.Version "0.97.1" }}
{{- errorf "=> hugo v0.97.1 or greater is required for hugo-PaperMod to build " }}
{{- end -}}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}"> <html lang="{{ site.Language }}" dir="{{ .Language.LanguageDirection | default "auto" }}">

View File

@ -10,7 +10,8 @@
<h1> <h1>
{{ .Title }} {{ .Title }}
{{- if and (or (eq .Kind `term`) (eq .Kind `section`)) (.Param "ShowRssButtonInSectionTermList") }} {{- if and (or (eq .Kind `term`) (eq .Kind `section`)) (.Param "ShowRssButtonInSectionTermList") }}
<a href="index.xml" title="RSS" aria-label="RSS"> {{- with .OutputFormats.Get "rss" }}
<a href="{{ .RelPermalink }}" title="RSS" aria-label="RSS">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round" height="23"> stroke-linecap="round" stroke-linejoin="round" height="23">
<path d="M4 11a9 9 0 0 1 9 9" /> <path d="M4 11a9 9 0 0 1 9 9" />
@ -19,6 +20,7 @@
</svg> </svg>
</a> </a>
{{- end }} {{- end }}
{{- end }}
</h1> </h1>
{{- if .Description }} {{- if .Description }}
<div class="post-description"> <div class="post-description">

View File

@ -18,6 +18,7 @@
<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 }} {{- with site.Params.images }}
<image> <image>
<title>{{ site.Title }}</title>
<url>{{ index . 0 | absURL }}</url> <url>{{ index . 0 | absURL }}</url>
<link>{{ index . 0 | absURL }}</link> <link>{{ index . 0 | absURL }}</link>
</image> </image>

View File

@ -22,7 +22,7 @@
<div id="searchbox"> <div id="searchbox">
<input id="searchInput" autofocus placeholder="{{ .Params.placeholder | default (printf "%s " .Title) }}" <input id="searchInput" autofocus placeholder="{{ .Params.placeholder | default (printf "%s " .Title) }}"
aria-label="search" type="search" autocomplete="off"> aria-label="search" type="search" autocomplete="off" maxlength="64">
<ul id="searchResults" aria-label="search results"></ul> <ul id="searchResults" aria-label="search results"></ul>
</div> </div>

View File

@ -4,7 +4,9 @@
<figure class="entry-cover"> <figure class="entry-cover">
{{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }} {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }}
{{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }} {{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }}
{{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} {{- $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 $cover -}}{{/* i.e it is present in page bundle */}}
{{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank" {{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank"
rel="noopener noreferrer">{{ end -}} rel="noopener noreferrer">{{ end -}}

View File

@ -1,4 +1,4 @@
{{- if or .Params.editPost.URL site.Params.editPost.URL -}} {{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}}
{{- $fileUrlPath := path.Join .File.Path }} {{- $fileUrlPath := path.Join .File.Path }}
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }}&nbsp;|&nbsp;{{- end -}} {{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }}&nbsp;|&nbsp;{{- end -}}

View File

@ -12,10 +12,12 @@
{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }} {{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }}
{{- end }} {{- end }}
{{- if not (.Param "hideAuthor") -}}
{{- with (partial "author.html" .) }} {{- with (partial "author.html" .) }}
{{- $scratch.Add "meta" (slice .) }} {{- $scratch.Add "meta" (slice .) }}
{{- end }} {{- end }}
{{- end }}
{{- with ($scratch.Get "meta") }} {{- with ($scratch.Get "meta") }}
{{- delimit . "&nbsp;·&nbsp;" -}} {{- delimit . "&nbsp;·&nbsp;" | safeHTML -}}
{{- end -}} {{- end -}}

View File

@ -14,12 +14,12 @@
{{- with $ShareButtons }}{{ $custom = true }}{{ end }} {{- with $ShareButtons }}{{ $custom = true }}{{ end }}
<div class="share-buttons"> <div class="share-buttons">
{{- if (cond ($custom) (in $ShareButtons "twitter") (true)) }} {{- if (or (cond ($custom) (in $ShareButtons "x") (true)) (cond ($custom) (in $ShareButtons "twitter") (true))) }}
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on twitter" <a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on x"
href="https://twitter.com/intent/tweet/?text={{ $title }}&amp;url={{ $pageurl }}&amp;hashtags={{- $.Scratch.Get "tags" -}}"> href="https://x.com/intent/tweet/?text={{ $title }}&amp;url={{ $pageurl }}&amp;hashtags={{- $.Scratch.Get "tags" -}}">
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve" height="30px" width="30px" fill="currentColor"> <svg version="1.1" viewBox="0 0 512 512" xml:space="preserve" height="30px" width="30px" fill="currentColor">
<path <path
d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-386.892,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Zm-253.927,424.544c135.939,0 210.268,-112.643 210.268,-210.268c0,-3.218 0,-6.437 -0.153,-9.502c14.406,-10.421 26.973,-23.448 36.935,-38.314c-13.18,5.824 -27.433,9.809 -42.452,11.648c15.326,-9.196 26.973,-23.602 32.49,-40.92c-14.252,8.429 -30.038,14.56 -46.896,17.931c-13.487,-14.406 -32.644,-23.295 -53.946,-23.295c-40.767,0 -73.87,33.104 -73.87,73.87c0,5.824 0.613,11.494 1.992,16.858c-61.456,-3.065 -115.862,-32.49 -152.337,-77.241c-6.284,10.881 -9.962,23.601 -9.962,37.088c0,25.594 13.027,48.276 32.95,61.456c-12.107,-0.307 -23.448,-3.678 -33.41,-9.196l0,0.92c0,35.862 25.441,65.594 59.311,72.49c-6.13,1.686 -12.72,2.606 -19.464,2.606c-4.751,0 -9.348,-0.46 -13.946,-1.38c9.349,29.426 36.628,50.728 68.965,51.341c-25.287,19.771 -57.164,31.571 -91.8,31.571c-5.977,0 -11.801,-0.306 -17.625,-1.073c32.337,21.15 71.264,33.41 112.95,33.41Z" /> d="M512 62.554 L 512 449.446 C 512 483.97 483.97 512 449.446 512 L 62.554 512 C 28.03 512 0 483.97 0 449.446 L 0 62.554 C 0 28.03 28.029 0 62.554 0 L 449.446 0 C 483.971 0 512 28.03 512 62.554 Z M 269.951 190.75 L 182.567 75.216 L 56 75.216 L 207.216 272.95 L 63.9 436.783 L 125.266 436.783 L 235.9 310.383 L 332.567 436.783 L 456 436.783 L 298.367 228.367 L 432.367 75.216 L 371.033 75.216 Z M 127.633 110 L 164.101 110 L 383.481 400.065 L 349.5 400.065 Z"/>
</svg> </svg>
</a> </a>
{{- end }} {{- end }}
@ -68,4 +68,14 @@
</svg> </svg>
</a> </a>
{{- end }} {{- end }}
</div> {{- if (cond ($custom) (in $ShareButtons "ycombinator") (true)) }}
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on ycombinator"
href="https://news.ycombinator.com/submitlink?t={{ $title }}&u={{ $pageurl }}">
<svg version="1.1" xml:space="preserve" width="30px" height="30px" viewBox="0 0 512 512" fill="currentColor"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape">
<path
d="M449.446 0C483.971 0 512 28.03 512 62.554L512 449.446C512 483.97 483.97 512 449.446 512L62.554 512C28.03 512 0 483.97 0 449.446L0 62.554C0 28.03 28.029 0 62.554 0L449.446 0ZM183.8767 87.9921H121.8427L230.6673 292.4508V424.0079H281.3328V292.4508L390.1575 87.9921H328.1233L256 238.2489z" />
</svg>
</a>
{{- end }}
</div>

View File

@ -1,6 +1,6 @@
<div class="social-icons"> <div class="social-icons">
{{- range . }} {{- range . }}
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ (.title | default .name) | title }}"> <a href="{{ trim .url " " | safeURL }}" target="_blank" rel="noopener noreferrer me" title="{{ (.title | default .name) | title }}">
{{ partial "svg.html" . }} {{ partial "svg.html" . }}
</a> </a>
{{- end }} {{- end }}

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@
{{- if site.Params.schema.sameAs }} {{- if site.Params.schema.sameAs }}
{{ range $i, $e := site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ trim $e " " }}{{ end }} {{ range $i, $e := site.Params.schema.sameAs }}{{ if $i }}, {{ end }}{{ trim $e " " }}{{ end }}
{{- else}} {{- else}}
{{ range $i, $e := site.Params.SocialIcons }}{{ if $i }}, {{ end }}{{ trim $e.url " " }}{{ end }} {{ range $i, $e := site.Params.SocialIcons }}{{ if $i }}, {{ end }}{{ trim $e.url " " | safeURL }}{{ end }}
{{- end}} {{- end}}
] ]
} }

View File

@ -37,7 +37,7 @@ features = [
"scroll-to-top", "scroll-to-top",
"search" "search"
] ]
min_version = "0.83.0" min_version = "0.97.1"
[author] [author]
name = "Aditya Telange" name = "Aditya Telange"