Compare commits

..

1 Commits

Author SHA1 Message Date
Cell c91c0c8d52 ♻️ Refactor: refactor reading progress with css animation 2025-03-06 15:02:41 +08:00
81 changed files with 564 additions and 888 deletions
+1 -3
View File
@@ -10,9 +10,7 @@ jsconfig.json
node_modules/
# VSCode
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
.vscode
# OS Files
## Windows
-7
View File
@@ -1,7 +0,0 @@
{
"recommendations": [
"budparr.language-hugo-vscode",
"kaellarkin.hugo-shortcode-syntax",
"eliostruyf.vscode-hugo-themer"
]
}
-9
View File
@@ -1,9 +0,0 @@
{
"todo-tree.tree.scanMode": "workspace only",
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"tsconfig.json": "tsconfig.*.json, env.d.ts",
"vite.config.*": "jsconfig*, vitest.config.*, cypress.config.*, playwright.config.*",
"package.json": "package-lock.json, pnpm*, .yarnrc*, yarn*, .eslint*, eslint*, .oxlint*, oxlint*, .prettier*, prettier*, .editorconfig"
}
}
+4 -4
View File
@@ -15,7 +15,7 @@ git clone https://github.com/hugo-fixit/FixIt.git && cd FixIt
Then, install the dev dependencies.
```bash
pnpm install
npm install
```
And now you are ready to go!
@@ -24,15 +24,15 @@ Here are some useful commands.
```bash
# run a local debugging server with watch
pnpm server
npm run server
# run a local debugging server with watch in production environment
pnpm server:production
npm run server:production
```
If you want to do docs-related theme changes, the simplest way is to have both `FixIt` and `fixit-docs` cloned as sibling directories, and then run:
```bash
pnpm server:docs
npm run server:docs
```
Finally, create a new pull request at <https://github.com/hugo-fixit/FixIt/pulls> to submit your contribution 🎉
+1 -3
View File
@@ -25,7 +25,7 @@
> It is based on the original [LoveIt](https://github.com/dillonzq/LoveIt) Theme, [KeepIt](https://github.com/Fastbyte01/KeepIt) Theme and [LeaveIt](https://github.com/liuzc/LeaveIt) Theme.
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.146.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.141.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)
@@ -217,8 +217,6 @@ The FixIt theme balances **simplicity** and **extensibility** with extra [Hugo t
一个含有 caniuse shortcode 的 Hugo 主题组件。
- [shortcode-docs-bookmark](https://github.com/hugo-fixit/shortcode-docs-bookmark)\
🔖 Embed bookmark of FixIt Docs.
- [shortcode-mmt-netease](https://github.com/hugo-fixit/shortcode-mmt-netease)\
🎶 A Hugo theme component with a NetEase Cloud random comment shortcode.
- [shortcode-rewards](https://github.com/hugo-fixit/shortcode-rewards)\
A Hugo theme component with reward-log or sponsor-log shortcode.
<!-- HUGO_FIXIT_COMPONENTS:END -->
+1 -3
View File
@@ -25,7 +25,7 @@
> 它的原型基于 [LoveIt](https://github.com/dillonzq/LoveIt) 主题,[KeepIt](https://github.com/Fastbyte01/KeepIt) 主题和 [LeaveIt](https://github.com/liuzc/LeaveIt) 主题。
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/hugo-fixit/FixIt?style=flat)](https://github.com/hugo-fixit/FixIt/releases)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.146.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.141.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)
@@ -221,8 +221,6 @@ FixIt 主题旨在在**简洁性**和**可扩展性**之间取得平衡。为此
一个含有 caniuse shortcode 的 Hugo 主题组件。
- [shortcode-docs-bookmark](https://github.com/hugo-fixit/shortcode-docs-bookmark)\
🔖 Embed bookmark of FixIt Docs.
- [shortcode-mmt-netease](https://github.com/hugo-fixit/shortcode-mmt-netease)\
🎶 A Hugo theme component with a NetEase Cloud random comment shortcode.
- [shortcode-rewards](https://github.com/hugo-fixit/shortcode-rewards)\
A Hugo theme component with reward-log or sponsor-log shortcode.
<!-- HUGO_FIXIT_COMPONENTS:END -->
-9
View File
@@ -54,15 +54,6 @@ abbr[title] {
text-decoration-skip-ink: none;
}
img {
object-fit: cover;
}
img,video {
max-width: 100%;
height: auto;
}
@include link(true, true);
@import '../_partials/scrollbar';
+2 -18
View File
@@ -109,7 +109,8 @@
}
.page {
.taxonomy-cards {
.categories-card,
.collections-card {
.card-item {
width: 100%;
}
@@ -128,23 +129,6 @@
}
@media only print {
// 确保打印时没有 scrollbar
:root {
--fi-scrollbar-width: none !important;
}
*::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
}
.scrollbar-thin {
scrollbar-width: none !important;
-ms-overflow-style: none !important;
}
@page {
size: A4 portrait;
margin: 1.27cm;
+1 -2
View File
@@ -16,10 +16,9 @@
// Set breadcrumb height to 0px if breadcrumb is disabled
--#{$prefix}breadcrumb-height: 0px;
// hr / divider style
// hr style
--#{$prefix}hr-background-color: #{darken($global-border-color, 5%)};
--#{$prefix}hr-before-color: #{lighten($single-link-hover-color, 4%)};
--#{$prefix}divider-edge-weak: linear-gradient(to right, transparent, var(--#{$prefix}divider-bg, #d0d0d5), transparent);
// Scrollbar related variables
--#{$prefix}scrollbar-thumb-color: #{$scrollbar-color};
+25 -5
View File
@@ -1,7 +1,6 @@
@import '../_partials/_single/toc';
@import '../_partials/_single/fixit-decryptor';
@import '../_partials/_single/collections';
@import '../_partials/_single/related';
.single {
.single-title {
@@ -367,9 +366,31 @@
img {
max-width: 100%;
// SVG performs differently in Safari compared to other browsers
&:not([src*='.svg']) {
min-height: 1em;
min-height: 1em;
&:not([height]) {
height: auto;
}
&[loading='lazy'][srcset]:not([data-lazyloaded]) {
&:not(.suffix-invalid__small) {
width: var(--width-small, var(--width));
aspect-ratio: var(--aspect-ratio-small, var(--aspect-ratio));
}
&:not(.suffix-invalid) {
@media (min-resolution: 1.01dppx) and (max-resolution: 1.5dppx) {
width: calc(var(--width) / 1.5);
aspect-ratio: var(--aspect-ratio);
}
}
&:not(.suffix-invalid__large) {
@media (min-resolution: 1.51dppx) {
width: calc(var(--width-large, var(--width)) / 2);
aspect-ratio: var(--aspect-ratio-large, var(--aspect-ratio));
}
}
}
&.version {
@@ -398,7 +419,6 @@
img {
display: block;
margin: 0 auto;
height: auto;
overflow: hidden;
}
}
+2 -1
View File
@@ -1,4 +1,5 @@
.taxonomy-cards {
.categories-card,
.collections-card {
margin: 0 auto;
display: flex;
align-items: flex-start;
@@ -1,73 +0,0 @@
// Related Content List (aside)
.related-details {
&:not(:first-of-type)::before {
content: '';
display: block;
border: 0;
padding-top: 1px;
background: var(--#{$prefix}divider-edge-weak);
margin-block: 1rem 0.5rem;
}
&:not(:last-of-type) {
margin-bottom: 0.5rem;
}
.related-summary {
display: flex;
align-items: baseline;
gap: 0.25em;
padding: 0.2em 0.5em;
> i.fa-layer-group {
flex-shrink: 0;
}
.related-title {
font-weight: bold;
font-size: $related-title-font-size;
}
.related-count {
flex-shrink: 0;
color: var(--#{$prefix}secondary);
}
.details-icon {
flex-shrink: 0;
}
@include user-select(none);
}
.related-content {
font-size: $related-list-font-size;
.related-list {
margin: 0;
padding-inline: 1.6em 0.8em;
padding-block: 0.4em;
text-indent: -0.8em;
list-style: none;
overflow-y: scroll;
max-height: 60vh;
@include scrollbar-width(none, 0);
.related-item > a::before,
.related-item > span::before {
content: '|';
font-weight: 600;
margin-right: 0.5em;
position: relative;
bottom: 2px;
color: $single-link-color;
[data-theme='dark'] & {
color: $single-link-color-dark;
}
}
}
}
}
-1
View File
@@ -2,6 +2,5 @@
@import '_widgets/fixed-button';
@import '_widgets/github-corner';
@import '_widgets/noscript-warning';
@import '_widgets/post-chat';
@import '_widgets/reading-progress';
@import '_widgets/typeit';
@@ -1,4 +0,0 @@
#postChat_button,
.post-TianliGPT {
@extend .print-d-none;
}
@@ -1,13 +1,37 @@
.reading-progress-bar {
--progress: 0;
height: var(--progress-h, 2px);
width: var(--progress);
background-color: var(--bg-progress, var(--#{$prefix}info));
height: var(--#{$prefix}progress-h, 2px);
background-color: var(--#{$prefix}progress-bg, var(--#{$prefix}info));
position: fixed;
left: 0;
right: 0;
transform-origin: var(--#{$prefix}progress-start, left) 50%;
animation: grow-progress 3s linear;
animation-timeline: scroll();
@include z-index(2);
@extend .print-d-none;
&[data-reversed=true] {
animation-name: grow-progress-reversed;
}
[data-theme="dark"] & {
background-color: var(--bg-progress-dark, var(--#{$prefix}info-dark));
background-color: var(--#{$prefix}progress-bg-dark, var(--#{$prefix}info-dark));
}
@keyframes grow-progress {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
@keyframes grow-progress-reversed {
from { transform: scaleX(1); }
to { transform: scaleX(0); }
}
/**
* After the CSS property `animation-timeline: scroll()` exceeds 90% browser support in the future, this code can be removed
* See https://caniuse.com/mdn-css_properties_animation-timeline_scroll
*/
@supports not (animation-timeline: scroll()) {
display: none;
}
}
-4
View File
@@ -103,10 +103,6 @@ $toc-content-font-size: 0.875rem !default;
$collection-title-font-size: 1rem !default;
$collection-list-font-size: 0.875rem !default;
// Font size of the Related Content List
$related-title-font-size: 1rem !default;
$related-list-font-size: 0.875rem !default;
// Color of the single link
$single-link-color: #2376b7 !default; // 花青
$single-link-color-dark: #1781b5 !default; // 釉蓝
+6 -52
View File
@@ -1,4 +1,3 @@
// TODO use ESLint to check the code style
import Util from './util';
class FixIt {
@@ -684,53 +683,12 @@ class FixIt {
this._echartsArr = [];
const stagingDOM = this.util.getStagingDOM()
this.util.forEach(document.getElementsByClassName('echarts'), ($echarts) => {
const $dataEl = $echarts.nextElementSibling;
if ($dataEl.tagName !== 'TEMPLATE') {
return;
}
const chart = echarts.init($echarts, this.isDark ? 'dark' : 'light', { renderer: 'svg' });
chart.showLoading();
stagingDOM.stage($dataEl.content.cloneNode(true));
const _setOption = (option) => {
if (!option) {
chart.hideLoading();
console.warn('ECharts option is missing or invalid. Chart disposed.', {
element: $echarts,
option: $dataEl,
});
chart.dispose();
$echarts.removeAttribute('style');
return;
}
chart.hideLoading();
chart.setOption(option);
if ($echarts.nextElementSibling.tagName === 'TEMPLATE') {
const chart = echarts.init($echarts, this.isDark ? 'dark' : 'light', { renderer: 'svg' });
stagingDOM.stage($echarts.nextElementSibling.content.cloneNode(true));
chart.setOption(stagingDOM.contentAsJson());
this._echartsArr.push(chart);
};
// support JS object literal or JS code
if ($dataEl.dataset.fmt === 'js') {
try {
const jsCodes = stagingDOM.contentAsText();
/**
* Get ECharts option
* @param {Object} fixit FixIt instance
* @param {Object} chart ECharts instance
* @returns {Object|Promise} ECharts option or Promise
*/
const _getOption = new Function('fixit', 'chart',
this.util.isObjectLiteral(jsCodes) ? `return ${jsCodes}` : jsCodes
);
if ($dataEl.dataset.async === 'true') {
return Promise.resolve(_getOption(this, chart)).then(option => {
_setOption(option);
});
}
return _setOption(_getOption(this, chart));
} catch (err) {
return console.error(err);
}
}
// support JSON
_setOption(stagingDOM.contentAsJson());
});
stagingDOM.destroy();
});
@@ -1113,10 +1071,10 @@ class FixIt {
this.initEcharts();
this.initTypeit();
this.initMapbox();
this.fixTocScroll();
this.initToc();
this.initTocListener();
this.initPangu();
this.fixTocScroll();
this.util.forEach(document.querySelectorAll('.encrypted-hidden'), ($element) => {
$element.classList.replace('encrypted-hidden', 'decrypted-shown');
});
@@ -1213,7 +1171,6 @@ class FixIt {
const ACCURACY = 20;
const $fixedButtons = document.querySelector('.fixed-buttons');
const $backToTop = document.querySelector('.back-to-top');
const $readingProgressBar = document.querySelector('.reading-progress-bar');
if (document.body.dataset.headerDesktop === 'auto') {
$headers.push(document.getElementById('header-desktop'));
}
@@ -1246,9 +1203,6 @@ class FixIt {
});
const contentHeight = document.body.scrollHeight - window.innerHeight;
const scrollPercent = Math.max(Math.min(100 * Math.max(this.newScrollTop, 0) / contentHeight, 100), 0);
if ($readingProgressBar) {
$readingProgressBar.style.setProperty('--progress', `${scrollPercent.toFixed(2)}%`);
}
// whether to show fixed buttons
if ($fixedButtons) {
if (scrollPercent > 1) {
@@ -1352,9 +1306,9 @@ class FixIt {
window.setTimeout(() => {
this.initComment();
if (!this.config.encryption?.all) {
this.fixTocScroll();
this.initToc();
this.initTocListener();
this.fixTocScroll();
}
this.onScroll();
this.onResize();
+2 -19
View File
@@ -42,7 +42,7 @@ export default class Util {
isValidDate(date) {
return date instanceof Date && !isNaN(date.getTime());
}
/**
* scroll some element into view
* @param {String} selector element to scroll
@@ -109,23 +109,6 @@ export default class Util {
reject();
}
});
return this.copyText(text);
}
/**
* check if a string is a JS object string
* @example isObjectLiteral("{a:1,b:2}") // true
* @param {String} str string to check
* @returns {Boolean} whether the string is a JS object string
*/
isObjectLiteral(str) {
if (typeof str !== 'string') {
return false;
}
str = str.replace(/\s+/g, ' ').trim().replace(/;$/, '')
if (str.startsWith('{') && str.endsWith('}')) {
return true;
}
return false;
return this.copyText(text);
}
}
+6 -14
View File
@@ -34,8 +34,6 @@ enableRobotsTXT = true
enableGitInfo = true
# whether to use emoji code
enableEmoji = true
# the main sections of a site
mainSections = []
# -------------------------------------------------------------------------------------
# Menu Configuration
@@ -137,7 +135,7 @@ mainSections = []
[module]
[module.hugoVersion]
extended = true
min = "0.146.0"
min = "0.141.0"
# -------------------------------------------------------------------------------------
# Markup related configuration in Hugo
@@ -945,13 +943,6 @@ mainSections = []
[params.feed.follow]
feedId = ""
userId = ""
# FixIt 0.3.17 | NEW Image config
[params.image]
# cache remote images for better optimisations
cacheRemote = false
# Image resizing and optimisation
optimise = false
# FixIt 0.3.12 | NEW Custom partials config
# Custom partials must be stored in the /layouts/partials/ directory.
@@ -1015,8 +1006,6 @@ mainSections = []
linkToEdit = true
# FixIt 0.3.0 | NEW whether to show link to report issue for the post
linkToReport = true
# FixIt 0.3.20 | NEW whether to show link to view the post in VSCode
linkToVscode = true
# FixIt 0.3.10 | CHANGED Page style ["narrow", "normal", "wide", ...]
pageStyle = "normal"
# FixIt 0.2.17 | CHANGED Auto Bookmark Support
@@ -1118,12 +1107,15 @@ mainSections = []
scale = true
# whether to add FullscreenControl
fullscreen = true
# FixIt 0.3.0 | NEW [Experimental] cache remote images locally, see: https://github.com/hugo-fixit/FixIt/pull/362
[params.page.cacheRemoteImages]
enable = false
# replace remote image url with local image url (place in public/images/remote/)
replace = false
# FixIt 0.3.0 | NEW Related content config (https://gohugo.io/content-management/related/)
[params.page.related]
enable = false
count = 5
# FixIt 0.3.20 | NEW position of related content, optional values: ["aside", "footer"]
position = ["aside", "footer"]
# FixIt 0.2.17 | NEW Donate (Sponsor) settings
[params.page.reward]
enable = false
-1
View File
@@ -123,7 +123,6 @@ readMarkdown = "Markdown anzeigen"
viewSource = "Quelle anzeigen"
editThisPage = "Diese Seite bearbeiten"
reportIssue = "Problem melden"
openInEditor = "Im Editor öffnen"
back = "Zurück"
home = "Startseite"
readMore = "Mehr lesen"
-1
View File
@@ -123,7 +123,6 @@ readMarkdown = "Read Markdown"
viewSource = "View source"
editThisPage = "Edit this page"
reportIssue = "Report issue"
openInEditor = "Open in editor"
back = "Back"
home = "Home"
readMore = "Read More"
-1
View File
@@ -123,7 +123,6 @@ readMarkdown = "Leer Markdown"
viewSource = "Ver fuente"
editThisPage = "Editar esta página"
reportIssue = "Reportar problema"
openInEditor = "Abrir en el editor"
back = "Regresar"
home = "Inicio"
readMore = "Leer más"
-1
View File
@@ -123,7 +123,6 @@ readMarkdown = "Ouvrir le Markdown"
viewSource = "Voir la source"
editThisPage = "Modifier cette page"
reportIssue = "Signaler un problème"
openInEditor = "Ouvrir dans l'éditeur"
back = "Retour"
home = "Accueil"
readMore = "En savoir plus"
-1
View File
@@ -124,7 +124,6 @@ readMarkdown = "मार्कडाउन पढ़ें"
viewSource = "स्रोत देखें"
editThisPage = "इस पृष्ठ को संपादित करें"
reportIssue = "समस्या की रिपोर्ट करें"
openInEditor = "संपादक में खोलें"
back = "पीछे"
home = "घर"
readMore = "और पढ़ें"
-1
View File
@@ -123,7 +123,6 @@ readMarkdown = "Leggi Markdown"
viewSource = "Visualizza sorgente"
editThisPage = "Modifica questa pagina"
reportIssue = "Segnala un problema"
openInEditor = "Apri nell'editor"
back = "Indietro"
home = "Home"
readMore = "Leggi di più"
-1
View File
@@ -123,7 +123,6 @@ readMarkdown = "Zobacz Markdown"
viewSource = "Zobacz źródło"
editThisPage = "Edytuj tą stronę"
reportIssue = "Zgłoś problem"
openInEditor = "Otwórz w edytorze"
back = "Wstecz"
home = "Strona główna"
readMore = "Czytaj więcej"
-1
View File
@@ -124,7 +124,6 @@ readMarkdown = "Leia em Markdown"
viewSource = "Ver a fonte"
editThisPage = "Editar esta página"
reportIssue = "Reportar problema"
openInEditor = "Abrir no editor"
back = "Voltar"
home = "Home"
readMore = "Leia mais"
-1
View File
@@ -123,7 +123,6 @@ readMarkdown = "Citire Markdown"
viewSource = "Vezi sursa"
editThisPage = "Editați această pagină"
reportIssue = "Raportează o problemă"
openInEditor = "Deschide în editor"
back = "Înapoi"
home = "Acasă"
readMore = "Citește mai mult"
-1
View File
@@ -123,7 +123,6 @@ readMarkdown = "Читать Markdown"
viewSource = "Просмотреть источник"
editThisPage = "Редактировать эту страницу"
reportIssue = "Сообщить о проблеме"
openInEditor = "Открыть в редакторе"
back = "Назад"
home = "Домой"
readMore = "Читать больше"
-1
View File
@@ -123,7 +123,6 @@ readMarkdown = "Читај Markdown"
viewSource = "Погледај извор"
editThisPage = "Уреди ову страницу"
reportIssue = "Пријави проблем"
openInEditor = "Отвори у уреднику"
back = "Назад"
home = "Почетна"
readMore = "Прочитај више"
-1
View File
@@ -122,7 +122,6 @@ readMarkdown = "Đọc với định dạng Markdown"
viewSource = "Xem mã nguồn"
editThisPage = "Chỉnh sửa trang này"
reportIssue = "Báo cáo lỗi"
openInEditor = "Mở trong trình chỉnh sửa"
back = "Quay lại"
home = "Trang chủ"
readMore = "Đọc thêm"
-1
View File
@@ -121,7 +121,6 @@ readMarkdown = "阅读原始文档"
viewSource = "查看源码"
editThisPage = "编辑此页"
reportIssue = "报告问题"
openInEditor = "在编辑器中打开"
back = "返回"
home = "主页"
readMore = "阅读全文"
-1
View File
@@ -121,7 +121,6 @@ readMarkdown = "閱讀原始文檔"
viewSource = "查看原始碼"
editThisPage = "編輯此頁"
reportIssue = "報告問題"
openInEditor = "在編輯器中打開"
back = "返回"
home = "主頁"
readMore = "閱讀全文"
@@ -1,8 +1,2 @@
{{- dict
"Options" .Attributes
"Inner" .Inner
"Resources" .Page.Resources
"Position" .Position
| partial "plugin/echarts.html"
-}}
{{- dict "Options" .Attributes "Inner" .Inner | partial "plugin/echarts.html" -}}
{{- .Page.Store.Set "hasEcharts" true -}}
@@ -1,7 +1 @@
{{- dict
"Options" .Attributes
"Inner" .Inner
"Resources" .Page.Resources
"Position" .Position
| partial "plugin/timeline.html"
-}}
{{- dict "Options" .Attributes "Inner" .Inner | partial "plugin/timeline.html" -}}
+2 -15
View File
@@ -7,8 +7,7 @@
{{- end -}}
{{- $headingConfig := $params.heading -}}
{{- /* Only enable in main section pages */ -}}
{{- $intersect := (slice .Page.Section .Page.Type) | intersect site.MainSections -}}
{{- $onlyMainSection := cond $headingConfig.number.onlyMainSection ((gt (len $intersect) 0) | and (eq .Page.Kind "page")) true -}}
{{- $onlyMainSection := cond $headingConfig.number.onlyMainSection (eq .Page.Type "posts") true -}}
{{- $ordered := $toc.ordered | and $headingConfig.number.enable | and $onlyMainSection -}}
{{- $h1Format := $headingConfig.number.format.h1 | default "{title}" -}}
{{- $h2Format := $headingConfig.number.format.h2 | default "{h2} {title}" -}}
@@ -32,21 +31,9 @@
{{- .Page.Scratch.SetInMap "heading-counter" (string (add $level 1)) 0 -}}
{{- end -}}
{{- $attrs := "" }}
{{- range $key, $value := .Attributes }}
{{- $attrs = printf "%s %s=%q" $attrs $key $value }}
{{- end }}
{{- with .Attributes.class }}
{{- $attrs = replace $attrs . (printf "heading-element %s" .) }}
{{- else }}
{{- $attrs = printf "class=%q %s" "heading-element" $attrs }}
{{- end }}
{{- $attrs = partial "function/trim.html" $attrs -}}
{{- /* Force decrease the markup level to avoid multiple h1 */ -}}
{{- $markupLevel := cond (gt $maxMarkupLevel $level) $maxMarkupLevel $level -}}
<h{{ $markupLevel }} {{ $attrs | safeHTMLAttr }}>
<h{{ $markupLevel }} id="{{ .Anchor | safeURL }}" class="heading-element">
{{- $title := .Text -}}
{{- if $ordered -}}
{{- /* Add 1 to the current level */ -}}
+4 -17
View File
@@ -1,27 +1,14 @@
{{- /*
A Markdown image has three components: the image description, the image destination, and optionally the image title.
![white kitten](/images/kitten.jpg "A kitten!")
------------ ------------------ ---------
description destination title
------------ ------------------ ---------
.Text .Destination .Title
*/ -}}
{{- /* TODO refactor */ -}}
{{- $params := .Page.Params | merge site.Params.page -}}
{{- $optim := slice
(dict "Process" "resize 800x webp q75" "descriptor" "800w")
(dict "Process" "resize 1200x webp q75" "descriptor" "1200w")
(dict "Process" "resize 1600x webp q75" "descriptor" "1600w")
-}}
{{- if .Title | and .Text -}}
{{- $linked := ne $params.lightgallery false -}}
<figure>
{{- dict "Src" .Destination "Alt" .PlainText "Title" .Title "Caption" .Text "Linked" $linked "Loading" "lazy" "Resources" .Page.Resources "OptimConfig" $optim | partial "plugin/image.html" -}}
{{- dict "Src" .Destination "Alt" .Text "Caption" .Text "Title" .Title "Linked" $linked "Responsive" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
<figcaption class="image-caption">
{{- .Title | safeHTML -}}
{{- .Text | safeHTML -}}
</figcaption>
</figure>
{{- else -}}
{{- $linked := (eq $params.lightgallery "force") | or ($params.lightgallery | and (ne .Title "")) -}}
{{- dict "Src" .Destination "Alt" .PlainText "Title" .Title "Linked" $linked "Loading" "lazy" "Resources" .Page.Resources "OptimConfig" $optim | partial "plugin/image.html" -}}
{{- dict "Src" .Destination "Alt" .Text "Title" .Title "Linked" $linked "Responsive" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
{{- end -}}
+1 -9
View File
@@ -3,9 +3,6 @@
<article class="single summary" itemscope itemtype="http://schema.org/Article">
{{- /* Featured image */ -}}
{{- $image := $params.featuredimagepreview | default $params.featuredimage -}}
{{- with dict "Path" $image "Resources" .Resources | partial "function/resource.html" }}
{{- $image = .RelPermalink }}
{{- end }}
{{- with .Resources.GetMatch "featured-image" -}}
{{- $image = .RelPermalink -}}
{{- end -}}
@@ -15,12 +12,7 @@
{{- with $image -}}
<div class="featured-image-preview">
<a href="{{ $.RelPermalink }}" aria-label="{{ $.Title }}">
{{- $optim := slice
(dict "Process" "fill 800x240 Center webp q75" "descriptor" "800w")
(dict "Process" "fill 1200x360 Center webp q75" "descriptor" "1200w")
(dict "Process" "fill 1600x480 Center webp q75" "descriptor" "1600w")
-}}
{{- dict "Src" . "Title" $.Title "Resources" $.Resources "Loading" "eager" "Width" "800" "Height" "240" "Sizes" "(max-width: 680px) 100vw, (max-width: 960px) 80vw, (max-width: 1440px) 56vw, 800px" "OptimConfig" $optim "Alt" (printf "Featured image for %v" $.Title) | partial "plugin/image.html" -}}
{{- dict "Src" . "Title" $.Description "Alt" $.Title "Resources" $.Resources "Width" "50%" "Height" "50%" | partial "plugin/image.html" -}}
</a>
</div>
{{- end -}}
@@ -17,7 +17,7 @@
<script src="//at.alicdn.com/t/font_578712_g26jo2kbzd5qm2t9.js" async defer></script>
<div class="friend-links">
{{ range $index, $friend := .Site.Data.friends }}
<a class="friend-link" title="{{ $friend.description | safeHTML }}" href="{{ $friend.url | safeURL }}" rel="external noopener" target="_blank">
<a class="friend-link" title="{{ $friend.description }}" href="{{ $friend.url | safeURL }}" rel="external noopener" target="_blank">
{{ if $friend.avatar }}
{{- dict "Src" $friend.avatar "Alt" $friend.nickname "Title" $friend.description "Class" "friend-avatar" | partial "plugin/image.html" -}}
{{ else }}
+6 -2
View File
@@ -32,9 +32,13 @@
{{- $params := .Params | merge .Site.Params.Page }}
{{- $fullText := ((.Params.feed | default dict) | merge $.Config ).fulltext }}
{{- $author := partial "function/get-author-map.html" .Params.author }}
{{- $cacheRemoteImages := $params.cacheRemoteImages }}
{{- $image := $params.featuredimagepreview | default $params.featuredimage }}
{{- with dict "Path" $image "Resources" .Resources | partial "function/resource.html" }}
{{- $image = .Permalink }}
{{- with dict "Path" $image "Resources" .Resources "CacheRemoteImages" $cacheRemoteImages.enable | partial "function/resource.html" }}
{{- $url := urls.Parse $image }}
{{- if not $url.Host | or $cacheRemoteImages.replace }}
{{- $image = .Permalink }}
{{- end }}
{{- end }}
{{- with .Resources.GetMatch "featured-image" }}
{{- $image = .Permalink }}
@@ -1,18 +1,21 @@
{{- /* cache remote image locally */ -}}
{{- $resource := 0 -}}
{{- $isRemote := urls.Parse .Src | partial "function/is-url-remote.html" -}}
{{- $suffixList := slice ".jpeg" ".jpg" ".png" ".gif" ".bmp" ".tif" ".tiff" ".webp" ".avif" ".svg" -}}
{{- $suffixValid := (dict "Path" .Path "Suffixes" $suffixList | partial "function/suffix-validation.html") -}}
{{- /* maybe could add domain validation */ -}}
{{- $pass := $suffixValid | or .Pass -}}
{{- if $isRemote -}}
{{- with try (resources.GetRemote .Src) -}}
{{- if $pass -}}
{{- with try ($remoteResource := resources.GetRemote .Path) -}}
{{- with .Err -}}
{{- warnf "%s" . -}}
{{- erroridf "error-get-remote-image" "%s" . -}}
{{- else with .Value -}}
{{- if .ResourceType | eq "image" -}}
{{- if eq $remoteResource.ResourceType "image" -}}
{{- /* placed remote image in public/images/remote/ */ -}}
{{- $resource = . | resources.Copy (add "/images/remote/" .Name) -}}
{{- $resource = $remoteResource | resources.Copy (add "/images/remote/" $remoteResource.Name) -}}
{{- end -}}
{{- else -}}
{{- warnf "Unable to get remote image %q" $.Src -}}
{{- erroridf "error-get-remote-image" "Unable to get remote image %q" $.Path -}}
{{- end -}}
{{- end -}}
{{- end -}}
@@ -1 +0,0 @@
{{- return and (not (eq .Scheme "")) .Host -}}
+8 -4
View File
@@ -1,18 +1,22 @@
{{- $Resources := .Resources | default page.Resources -}}
{{- $resource := 0 -}}
{{- $url := urls.Parse .Path -}}
{{- if not (partial "function/is-url-remote.html" $url) -}}
{{- $dest := strings.TrimPrefix "./" $url.Path -}}
{{- if not $url.Host | and $url.Path | and (strings.HasSuffix $url.Path "/" | not) -}}
{{- if $Resources -}}
{{- with $Resources.GetMatch $dest -}}
{{- with $Resources.GetMatch $url.Path -}}
{{- $resource = . -}}
{{- end -}}
{{- end -}}
{{- if not $resource -}}
{{- with resources.Get $dest -}}
{{- with resources.Get $url.Path -}}
{{- $resource = . -}}
{{- end -}}
{{- end -}}
{{- else -}}
{{- $cacheRemoteImages := .CacheRemoteImages | default false -}}
{{- if $cacheRemoteImages -}}
{{- $resource = partial "function/get-remote-image.html" (dict "Path" .Path) -}}
{{- end -}}
{{- end -}}
{{- return $resource -}}
@@ -1,8 +1,3 @@
{{- /*
Example:
{{- $suffixList := slice ".jpeg" ".jpg" ".png" ".gif" ".bmp" ".tif" ".tiff" ".webp" ".avif" ".svg" -}}
{{- $suffixValid := (dict "Path" .Path "Suffixes" $suffixList | partial "function/suffix-validation.html") -}}
*/ -}}
{{- $url := urls.Parse .Path -}}
{{- $path := path.Clean ((printf "%v%v" $url.Host $url.Path) | lower) -}}
{{- with $url.Scheme -}}
-2
View File
@@ -1,2 +0,0 @@
{{- /* Trim whitespace from the beginning and end of a string */ -}}
{{- return (. | replaceRE `[\s]+` " " | strings.TrimSpace) -}}
+1 -1
View File
@@ -8,7 +8,7 @@
<a href="{{ $homeRelPermalink }}" title="{{ .Site.Title }}">
{{- with .Site.Params.header.title -}}
{{- with .logo -}}
{{- dict "Src" . "Class" "logo" "Alt" $.Site.Title "Width" 32 "Height" 32 | partial "plugin/image.html" -}}
{{- dict "Src" . "Class" "logo" "Alt" $.Site.Title "Width" 26 "Height" 26 | partial "plugin/image.html" -}}
{{- end -}}
{{- with .pre -}}
<span class="header-title-pre">{{ . | safeHTML }}</span>
+2 -7
View File
@@ -14,11 +14,6 @@
{{- if $avatar -}}
<div class="home-avatar">
{{- $menus := $.Site.Menus.main | default slice -}}
{{- $optim := slice
(dict "Process" "fill center 96x96 webp q75" "descriptor" "96w")
(dict "Process" "fill center 144x144 webp q75" "descriptor" "144w")
(dict "Process" "fill center 192x192 webp q75" "descriptor" "192w")
-}}
{{- $avatarMenuIndex := 0 -}}
{{- if $profile.avatarMenu -}}
{{- range $index, $menu := $menus -}}
@@ -33,10 +28,10 @@
{{- $url = .RelPermalink -}}
{{- end -}}
<a href="{{ $url }}"{{ with .Title | default .Name }} title="{{ . }}"{{ end }}{{ if (urls.Parse $url).Host }} rel="noopener noreferrer" target="_blank"{{ end }}>
{{- dict "Src" $avatar "Alt" "Home avatar" "Width" 96 "Height" 96 "OptimConfig" $optim | partial "plugin/image.html" -}}
{{- dict "Src" $avatar "Alt" $.Site.Params.author.name "Width" 96 "Height" 96 | partial "plugin/image.html" -}}
</a>
{{- else -}}
{{- dict "Src" $avatar "Alt" "Home avatar" "Width" 96 "Height" 96 "OptimConfig" $optim | partial "plugin/image.html" -}}
{{- dict "Src" $avatar "Alt" $.Site.Params.author.name "Width" 96 "Height" 96 | partial "plugin/image.html" -}}
{{- end -}}
</div>
{{- end -}}
+2 -3
View File
@@ -4,9 +4,8 @@
{{- $homeRelPermalink = strings.TrimSuffix "offline/" $homeRelPermalink -}}
{{- .Scratch.Set "homeRelPermalink" $homeRelPermalink -}}
{{- /* Set pages of main sections */ -}}
{{- $pages := where .Site.RegularPages "Section" "in" .Site.MainSections -}}
{{- $pages = $pages | union (where .Site.RegularPages "Type" "in" .Site.MainSections) -}}
{{- /* Set pages of main section */ -}}
{{- $pages := where .Site.RegularPages "Type" "posts" -}}
{{- .Scratch.Set "mainSectionPages" $pages -}}
{{- /* Select the scope named `public_repo` to generate personal access token */ -}}
+1 -1
View File
@@ -1,4 +1,4 @@
{{- .Scratch.Set "version" "v0.3.20" -}}
{{- .Scratch.Set "version" "v0.3.17-8b402129" -}}
{{- .Scratch.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}
+1 -1
View File
@@ -24,7 +24,7 @@
{{- else }}
{{- $attrs = printf "class=%q %s" (printf "alert alert-%s" $.Type) $attrs }}
{{- end }}
{{- $attrs = partial "function/trim.html" $attrs -}}
{{- $attrs = trim $attrs " " -}}
<div {{ $attrs | safeHTMLAttr }}>
{{- $icon := index $iconMap .Type -}}
+2 -35
View File
@@ -1,40 +1,7 @@
{{- /* Echarts support for code fences extended and shortcodes. */ -}}
{{- $width := .Options.width | default "100%" -}}
{{- $height := .Options.height | default "30rem" -}}
{{- $js := .Options.js | default false -}}
{{- $async := .Options.async | default false -}}
{{- $data := .Options.data -}}
{{- $file := .Options.file -}}
{{- $attrs := printf `style="width: %v; height: %v;"` $width $height -}}
<div class="echarts" {{ $attrs | safeHTMLAttr }}></div>
{{- $content := strings.TrimSpace .Inner -}}
{{- if $js | or (hasSuffix $file ".js") -}}
{{- with dict "Path" $file "Resources" .Resources | partial "function/resource.html" }}
{{- $content = .Content -}}
{{- end }}
{{- if hugo.IsProduction -}}
{{- $content = replaceRE `[\s]+` " " $content -}}
{{- end -}}
{{- if not $content -}}
{{- warnf "ECharts: JS Code is empty, executing in file %s" $.Position -}}
{{- end -}}
<template data-fmt="js" data-async="{{ $async }}">{{ $content | safeJS }}</template>
{{- else -}}
{{ with $data }}
{{- $content = index site.Data.echarts (printf "%v.%v" . page.Language) | default (index site.Data.echarts .) -}}
{{- if not $content -}}
{{- warnf "ECharts: data not found, please ensure the data file \"data/echarts/%s.{json|yml|yaml|toml}\" exists." . -}}
{{- end -}}
{{- else -}}
{{- with dict "Path" $file "Resources" .Resources | partial "function/resource.html" }}
{{- $content = .Content -}}
{{- else with $file -}}
{{- warnf "ECharts: no such data file: %s" . -}}
{{- end -}}
{{- $content = $content | transform.Unmarshal -}}
{{- end -}}
{{- if not $content -}}
{{- warnf "ECharts: option is empty, executing in file %s" $.Position -}}
{{- end -}}
<template>{{ $content | jsonify }}</template>
{{- end -}}
<template>{{ .Inner | transform.Unmarshal | jsonify }}</template>
{{- /* EOF */ -}}
-111
View File
@@ -1,111 +0,0 @@
{{- warnf "Deprecated image-legacy.html and will be removed in the next minor release, please use image.html instead." -}}
{{- $params := partial "function/params.html" -}}
{{- $class := .Class | default "" -}}
{{- $style := "" -}}
{{- $loading := .Loading | default "lazy" -}}
{{- $onload := "" -}}
{{- $onerror := "" -}}
{{- $cacheRemoteImages := $params.cacheRemoteImages -}}
{{- $suffixList := slice ".jpeg" ".jpg" ".png" ".gif" ".bmp" ".tif" ".tiff" ".webp" -}}
{{- $responsive := .Responsive -}}
{{- if hasPrefix .Src "data:image" -}}
{{- $responsive = false -}}
{{- end -}}
{{- /* handle for default size image */ -}}
{{- $src := .Src -}}
{{- $suffixValid := dict "Path" $src "Suffixes" $suffixList | partial "function/suffix-validation.html" -}}
{{- with dict "Path" $src "Resources" .Resources "CacheRemoteImages" $cacheRemoteImages.enable | partial "function/resource.html" -}}
{{- $url := urls.Parse $src -}}
{{- if not $url.Host | or $cacheRemoteImages.replace -}}
{{- $src = .RelPermalink -}}
{{- end -}}
{{- /* only available for image resources that are raster images */ -}}
{{- if (eq .ResourceType "image") | and $suffixValid | and $responsive -}}
{{- $style = printf "--width: %vpx;--aspect-ratio: %v / %v;" .Width .Width .Height | safeHTMLAttr -}}
{{- end -}}
{{- end -}}
{{- $srcSmall := .SrcSmall | default $src -}}
{{- $srcMedium := $src -}}
{{- $srcLarge := .SrcLarge | default $src -}}
{{- if $responsive }}
{{- /* handle for small size image */ -}}
{{- $suffixValidSmall := dict "Path" $srcSmall "Suffixes" $suffixList | partial "function/suffix-validation.html" -}}
{{- with dict "Path" .SrcSmall "Resources" .Resources "CacheRemoteImages" $cacheRemoteImages.enable | partial "function/resource.html" -}}
{{- $url := urls.Parse $.SrcSmall -}}
{{- if not $url.Host | or $cacheRemoteImages.replace -}}
{{- $srcSmall = .RelPermalink -}}
{{- end -}}
{{- if (eq .ResourceType "image") | and $suffixValidSmall -}}
{{- $style = printf "%v--width-small: %vpx;--aspect-ratio-small: %v / %v;" $style .Width .Width .Height | safeHTMLAttr -}}
{{- end -}}
{{- end -}}
{{- /* handle for large size image */ -}}
{{- $suffixValidLarge := dict "Path" $srcLarge "Suffixes" $suffixList | partial "function/suffix-validation.html" -}}
{{- with dict "Path" .SrcLarge "Resources" .Resources "CacheRemoteImages" $cacheRemoteImages.enable | partial "function/resource.html" -}}
{{- $url := urls.Parse $.SrcLarge -}}
{{- if not $url.Host | or $cacheRemoteImages.replace -}}
{{- $srcLarge = .RelPermalink -}}
{{- end -}}
{{- if (eq .ResourceType "image") | and $suffixValidLarge -}}
{{- $style = printf "%v--width-large: %vpx;--aspect-ratio-large: %v / %v;" $style .Width .Width .Height | safeHTMLAttr -}}
{{- end -}}
{{- end -}}
{{- /* handle for invalid suffix */ -}}
{{- if not $suffixValid | and $src -}}
{{- $class = printf "%v suffix-invalid" $class -}}
{{- end -}}
{{- if not $suffixValidSmall | and $srcSmall -}}
{{- $class = printf "%v suffix-invalid__small" $class -}}
{{- end -}}
{{- if not $suffixValidLarge | and $srcLarge -}}
{{- $class = printf "%v suffix-invalid__large" $class -}}
{{- end -}}
{{- /* set image srcset */ -}}
{{- if (eq $src $srcSmall) | and (eq $src $srcLarge) -}}
{{- $srcSmall = printf (cond (strings.Contains $srcSmall "?") "%v&size=small" "%v?size=small") $srcSmall -}}
{{- $srcMedium = printf (cond (strings.Contains $srcMedium "?") "%v&size=medium" "%v?size=medium") $srcMedium -}}
{{- $srcLarge = printf (cond (strings.Contains $srcLarge "?") "%v&size=large" "%v?size=large") $srcLarge -}}
{{- end -}}
{{- end -}}
{{- /* set image alt and caption */ -}}
{{- $alt := .Alt | default $src -}}
{{- $caption := .Caption | default $alt -}}
{{- /* set image lazy loading */ -}}
{{- /* for details, see https://lruihao.cn/posts/native-img-loading-lazy/ */ -}}
{{- if eq $loading "lazy" -}}
{{- /* TODO move to theme.js */ -}}
{{- $commonScript := "this.title=this.dataset.title;for(const i of ['style', 'data-title','onerror','onload']){this.removeAttribute(i);}" -}}
{{- $onload = printf " onload=\"%vthis.dataset.lazyloaded='';\"" $commonScript | safeHTMLAttr -}}
{{- $onerror = printf " onerror=\"%v\"" $commonScript | safeHTMLAttr -}}
{{- $style = printf " style=\"%vbackground: url(%v) no-repeat center;\"" $style (resources.Get "images/loading.svg" | minify).RelPermalink | safeHTMLAttr -}}
{{- end -}}
{{- /* structure of lightgallery or img */ -}}
{{- if .Linked -}}
<a class="lightgallery" href="{{ $srcLarge | safeURL }}" data-thumbnail="{{ $srcSmall | safeURL }}"{{ with $caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.Title }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .Rel }} rel="{{ . }}"{{ end }}>
{{- end -}}
<img loading="{{ $loading }}" src="{{ $src | safeURL }}" alt="{{ $alt }}"
{{- if $responsive }} srcset="{{ $srcSmall | safeURL }}, {{ $srcMedium | safeURL }} 1.5x, {{ $srcLarge | safeURL }} 2x"{{- end -}}
{{- if eq $loading "lazy" }} data-title="{{ .Title | default $alt }}"
{{- else }} title="{{ .Title | default $alt }}"{{- end -}}
{{- with .Width }} width="{{ . }}"{{- end -}}
{{- with .Height }} height="{{ . }}"{{- end -}}
{{- with $class }} class="{{ trim . " " }}"{{- end -}}
{{- with .Decoding }} decoding="{{ . }}"{{- end -}}
{{- with .Referrerpolicy }} referrerpolicy="{{ . }}"{{- end -}}
{{- with $style -}}{{ . }}{{- end -}}
{{- with $onload -}}{{ . }}{{- end -}}
{{- with $onerror -}}{{ . }}{{- end -}}
/>
{{- if .Linked -}}
</a>
{{- end -}}
+92 -62
View File
@@ -1,81 +1,111 @@
{{- /*
The image plugin is a partial that handles image resources.
{{- /* TODO refactor */ -}}
{{- $params := partial "function/params.html" -}}
{{- $class := .Class | default "" -}}
{{- $style := "" -}}
{{- $loading := .Loading | default "lazy" -}}
{{- $onload := "" -}}
{{- $onerror := "" -}}
{{- $cacheRemoteImages := $params.cacheRemoteImages -}}
{{- $suffixList := slice ".jpeg" ".jpg" ".png" ".gif" ".bmp" ".tif" ".tiff" ".webp" -}}
{{- $responsive := .Responsive -}}
Parameters:
- Src: The path to the image.
It can be a page resource (inside a page bundle) https://gohugo.io/methods/page/resources/
or a global resource (inside the assets directory) https://gohugo.io/functions/resources/get/
or a link to a remote resource, which can be cached if the site parameter is set https://gohugo.io/functions/resources/getremote/
- Resources: If the image is a page resource, this parameter is required. It is the .Resources of the page.
- OptimConfig: optimisation parameter, defined like
{{- $optim := slice
(dict "Process" "resize 800x Center webp q75" "descriptor" "800w")
(dict "Process" "resize 1200x Center webp q75" "descriptor" "1200w")
(dict "Process" "resize 1600x Center webp q75" "descriptor" "1600w")
-}}
See https://gohugo.io/content-management/image-processing/ for more information.
- Alt: alt text for the image. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#alt
- Height: The intrinsic height of the image, in pixels. Must be an integer without a unit.
We try to generate this value automatically if possible. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#height
- Width: The intrinsic width of the image, in pixels. Must be an integer without a unit.
We try to generate this value automatically if possible. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#width
- Loading: Indicates how the browser should load the image: eager or lazy. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#loading
- Optimise: Override the site parameter to optimise the image.
- CacheRemote: Override the site parameter to cache remote images.
Thanks @HEIGE-PCloud for the original code in the DoIt theme.
https://github.com/HEIGE-PCloud/DoIt/blob/main/layouts/partials/plugin/image.html
*/ -}}
{{- $isInline := strings.HasPrefix .Src "data:image" -}}
{{- $isRemote := urls.Parse .Src | partial "function/is-url-remote.html" -}}
{{- $resource := dict -}}
{{- if not $isRemote | and (not $isInline) -}}
{{- $resource = (.Resources.Get .Src) | default (resources.Get .Src) -}}
{{- if hasPrefix .Src "data:image" -}}
{{- $responsive = false -}}
{{- end -}}
{{- $cacheRemote := .CacheRemote | default site.Params.image.cacheRemote | default false -}}
{{- $optimise := .Optimise | default site.Params.image.optimise | default false -}}
{{- if not $resource | and $cacheRemote -}}
{{- with partial "function/get-remote-image.html" (dict "Src" .Src) -}}
{{- $resource = . -}}
{{- /* handle for default size image */ -}}
{{- $src := .Src -}}
{{- $suffixValid := dict "Path" $src "Suffixes" $suffixList | partial "function/suffix-validation.html" -}}
{{- with dict "Path" $src "Resources" .Resources "CacheRemoteImages" $cacheRemoteImages.enable | partial "function/resource.html" -}}
{{- $url := urls.Parse $src -}}
{{- if not $url.Host | or $cacheRemoteImages.replace -}}
{{- $src = .RelPermalink -}}
{{- end -}}
{{- /* only available for image resources that are raster images */ -}}
{{- if (eq .ResourceType "image") | and $suffixValid | and $responsive -}}
{{- $style = printf "--width: %vpx;--aspect-ratio: %v / %v;" .Width .Width .Height | safeHTMLAttr -}}
{{- end -}}
{{- end -}}
{{- $isSvg := false -}}
{{- if $resource -}}
{{- $isSvg = (eq $resource.MediaType.SubType "svg") -}}
{{- end -}}
{{- $srcSmall := .SrcSmall | default $src -}}
{{- $srcMedium := $src -}}
{{- $srcLarge := .SrcLarge | default $src -}}
{{- $optim := .OptimConfig -}}
{{- $srcset := "" -}}
{{- if $optim | and $resource | and $optimise | and (not $isSvg) -}}
{{ $srcsetSlice := slice -}}
{{- range $optim -}}
{{- if .Process -}}
{{- $processed := $resource.Process .Process -}}
{{- $srcsetSlice = $srcsetSlice | append (printf "%s %s" $processed.RelPermalink .descriptor) -}}
{{- if $responsive }}
{{- /* handle for small size image */ -}}
{{- $suffixValidSmall := dict "Path" $srcSmall "Suffixes" $suffixList | partial "function/suffix-validation.html" -}}
{{- with dict "Path" .SrcSmall "Resources" .Resources "CacheRemoteImages" $cacheRemoteImages.enable | partial "function/resource.html" -}}
{{- $url := urls.Parse $.SrcSmall -}}
{{- if not $url.Host | or $cacheRemoteImages.replace -}}
{{- $srcSmall = .RelPermalink -}}
{{- end -}}
{{- if (eq .ResourceType "image") | and $suffixValidSmall -}}
{{- $style = printf "%v--width-small: %vpx;--aspect-ratio-small: %v / %v;" $style .Width .Width .Height | safeHTMLAttr -}}
{{- end -}}
{{- end -}}
{{- $srcset = delimit $srcsetSlice ", " -}}
{{- /* handle for large size image */ -}}
{{- $suffixValidLarge := dict "Path" $srcLarge "Suffixes" $suffixList | partial "function/suffix-validation.html" -}}
{{- with dict "Path" .SrcLarge "Resources" .Resources "CacheRemoteImages" $cacheRemoteImages.enable | partial "function/resource.html" -}}
{{- $url := urls.Parse $.SrcLarge -}}
{{- if not $url.Host | or $cacheRemoteImages.replace -}}
{{- $srcLarge = .RelPermalink -}}
{{- end -}}
{{- if (eq .ResourceType "image") | and $suffixValidLarge -}}
{{- $style = printf "%v--width-large: %vpx;--aspect-ratio-large: %v / %v;" $style .Width .Width .Height | safeHTMLAttr -}}
{{- end -}}
{{- end -}}
{{- /* handle for invalid suffix */ -}}
{{- if not $suffixValid | and $src -}}
{{- $class = printf "%v suffix-invalid" $class -}}
{{- end -}}
{{- if not $suffixValidSmall | and $srcSmall -}}
{{- $class = printf "%v suffix-invalid__small" $class -}}
{{- end -}}
{{- if not $suffixValidLarge | and $srcLarge -}}
{{- $class = printf "%v suffix-invalid__large" $class -}}
{{- end -}}
{{- /* set image srcset */ -}}
{{- if (eq $src $srcSmall) | and (eq $src $srcLarge) -}}
{{- $srcSmall = printf (cond (strings.Contains $srcSmall "?") "%v&size=small" "%v?size=small") $srcSmall -}}
{{- $srcMedium = printf (cond (strings.Contains $srcMedium "?") "%v&size=medium" "%v?size=medium") $srcMedium -}}
{{- $srcLarge = printf (cond (strings.Contains $srcLarge "?") "%v&size=large" "%v?size=large") $srcLarge -}}
{{- end -}}
{{- end -}}
{{- $src := $resource.RelPermalink | default .Src -}}
{{- /* set image alt and caption */ -}}
{{- $alt := .Alt | default $src -}}
{{- $caption := .Caption | default $alt -}}
{{- $height := .Height -}}
{{- $width := .Width -}}
{{- if not $isSvg -}}
{{- $height = $height | default $resource.Height | default "" -}}
{{- $width = $width | default $resource.Width | default "" -}}
{{- /* set image lazy loading */ -}}
{{- /* for details, see https://lruihao.cn/posts/native-img-loading-lazy/ */ -}}
{{- if eq $loading "lazy" -}}
{{- /* TODO move to theme.js */ -}}
{{- $commonScript := "this.title=this.dataset.title;for(const i of ['style', 'data-title','onerror','onload']){this.removeAttribute(i);}" -}}
{{- $onload = printf " onload=\"%vthis.dataset.lazyloaded='';\"" $commonScript | safeHTMLAttr -}}
{{- $onerror = printf " onerror=\"%v\"" $commonScript | safeHTMLAttr -}}
{{- $style = printf " style=\"%vbackground: url(%v) no-repeat center;\"" $style (resources.Get "images/loading.svg" | minify).RelPermalink | safeHTMLAttr -}}
{{- end -}}
{{- /* structure of lightgallery or img */ -}}
{{- if .Linked -}}
<a class="lightgallery" href="{{ $src }}" title="{{ .Title | default $alt }}" data-thumbnail="{{ $src }}"{{ with $caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.Title }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .Rel }} rel="{{ . }}"{{ end }}>
<a class="lightgallery" href="{{ $srcLarge | safeURL }}" data-thumbnail="{{ $srcSmall | safeURL }}"{{ with $caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.Title }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .Rel }} rel="{{ . }}"{{ end }}>
{{- end -}}
<img {{- with .Class }} class="{{ . }}"{{ end }}{{ with .Loading }} loading="{{ . }}"{{ end }} {{ printf "src='%v'" $src | safeHTMLAttr }}{{ with $srcset }} srcset="{{ . }}"{{ end }}{{ with .Sizes }} sizes="{{ . }}"{{ end }}{{ with $alt }} alt="{{ . }}"{{ end }}{{ with $height }} height="{{ . }}"{{ end }}{{ with $width }} width="{{ . }}"{{ end }}{{ with .Decoding }} decoding="{{ . }}"{{ end }}{{ with .Referrerpolicy }} referrerpolicy="{{ . }}"{{ end }}>
<img loading="{{ $loading }}" src="{{ $src | safeURL }}" alt="{{ $alt }}"
{{- if $responsive }} srcset="{{ $srcSmall | safeURL }}, {{ $srcMedium | safeURL }} 1.5x, {{ $srcLarge | safeURL }} 2x"{{- end -}}
{{- if eq $loading "lazy" }} data-title="{{ .Title | default $alt }}"
{{- else }} title="{{ .Title | default $alt }}"{{- end -}}
{{- with .Width }} width="{{ . }}"{{- end -}}
{{- with .Height }} height="{{ . }}"{{- end -}}
{{- with $class }} class="{{ trim . " " }}"{{- end -}}
{{- with .Decoding }} decoding="{{ . }}"{{- end -}}
{{- with .Referrerpolicy }} referrerpolicy="{{ . }}"{{- end -}}
{{- with $style -}}{{ . }}{{- end -}}
{{- with $onload -}}{{ . }}{{- end -}}
{{- with $onerror -}}{{ . }}{{- end -}}
/>
{{- if .Linked -}}
</a>
</a>
{{- end -}}
+5 -4
View File
@@ -42,10 +42,11 @@
{{- end -}}
{{- else -}}
{{- $cardIcon := .CardIcon -}}
{{- if (not $cardIcon) | and $url.Host -}}
{{- with partial "function/get-remote-image.html" (dict "Src" (add "https://favicon.im/" $url.Host)) -}}
{{- $cardIcon = .RelPermalink -}}
{{- else with partial "function/get-remote-image.html" (dict "Src" (add "https://api.lruihao.cn/google/s2/favicons?sz=64&domain=" $url.Host)) -}}
{{- if $url.Host | and (eq .CardIcon true) -}}
{{- $cardIcon = false -}}
{{- /* 实验性功能:中国大陆地区无法使用,如果你有更好的 API 或者方案,欢迎 PR! */ -}}
{{- $favicon := partial "function/get-remote-image.html" (dict "Path" (add "https://www.google.com/s2/favicons?sz=64&domain=" $url.Host) "Pass" true) -}}
{{- with $favicon -}}
{{- $cardIcon = .RelPermalink -}}
{{- end -}}
{{- end -}}
+3 -19
View File
@@ -4,32 +4,16 @@
{{- $animation := .Options.animation | default false -}}
{{- $size := .Options.size | default "medium" -}}
{{- $node := .Options.node | default "circle" -}}
{{- $data := .Options.data -}}
{{- $file := .Options.file -}}
{{- /* Get Timeline events */ -}}
{{- $content := .Inner -}}
{{ with $data }}
{{- $content = index site.Data.timeline (printf "%v.%v" . page.Language) | default (index site.Data.timeline .) -}}
{{- if not $content -}}
{{- warnf "Timeline: data not found, please ensure the data file \"data/timeline/%s.{json|yml|yaml|toml}\" exists." . -}}
{{- $events := slice -}}
{{- with .Inner -}}
{{- $events = (. | transform.Unmarshal).events -}}
{{- end -}}
{{- else -}}
{{- with dict "Path" $file "Resources" .Resources | partial "function/resource.html" }}
{{- $content = .Content -}}
{{- else with $file -}}
{{- warnf "Timeline: no such data file: %s" . -}}
{{- end -}}
{{- $content = $content | transform.Unmarshal -}}
{{- end -}}
{{- $events := $content.events | default slice -}}
{{- with .Events -}}
{{- $events = . -}}
{{- end -}}
{{- $events = sort $events "timestamp" (cond $reverse "desc" "asc") -}}
{{- if not $events -}}
{{- warnf "Timeline: events is empty, executing in file %s" $.Position -}}
{{- end -}}
{{- /* Set Timeline style */ -}}
{{- $style := "" -}}
+1 -4
View File
@@ -18,10 +18,7 @@
{{- $scopePages = .Scratch.Get "mainSectionPages" -}}
{{- end -}}
{{- $scopePages = where $scopePages.ByLastmod.Reverse "Section" "!=" "" -}}
{{- $hiddenAdapters := .Param "hiddenAdapters" | default false -}}
{{- if $hiddenAdapters -}}
{{- $scopePages = where $scopePages "File.IsContentAdapter" "ne" true -}}
{{- end -}}
{{- /* {{- $scopePages = where $scopePages "File.IsContentAdapter" "ne" true -}} */ -}}
{{- range first $maxPostCount $scopePages -}}
{{- if gt (add .Lastmod.Unix (mul 86900 $days)) now.Unix -}}
{{- if ne .Lastmod.Unix .Date.Unix }}
+6 -14
View File
@@ -24,11 +24,8 @@
{{- dict "Date" . | T "single.updatedOnDate" -}}&nbsp;
{{- if $gitRepo -}}
{{- with $.GitInfo -}}
{{- $title := printf "%v&#10%v&#10Commit: %v [%v]&#10Author: %v<%v>&#10Date: %v" .Subject .Body .Hash .AbbreviatedHash .AuthorName .AuthorEmail (.AuthorDate | dateFormat "2006-01-02 15:04:05") -}}
{{- if ne .AuthorDate .CommitDate -}}
{{- $title = printf "%s&#10Commit Date: %v" $title (.CommitDate | dateFormat "2006-01-02 15:04:05") -}}
{{- end -}}
<a class="git-hash" href="{{ printf `%v/commit/%v` $gitRepo .Hash }}" rel="external nofollow noopener noreferrer" target="_blank" title="{{ $title | safeHTML }}">
{{/* TODO add Git .Body */}}
<a class="git-hash" href="{{ printf `%v/commit/%v` $gitRepo .Hash }}" rel="external nofollow noopener noreferrer" target="_blank" title="commit by {{ .AuthorName }}({{ .AuthorEmail }}) {{ .Hash }}: {{ .Subject }}">
{{- dict "Class" "fa-solid fa-hashtag fa-fw" | partial "plugin/icon.html" -}}
{{- .AbbreviatedHash -}}
</a>
@@ -51,32 +48,27 @@
{{- $linkOptions := slice -}}
{{- if $params.LinkToMarkdown -}}
{{- with .OutputFormats.Get "markdown" -}}
{{- $options := dict "Class" "link-to-markdown" "Destination" .RelPermalink "Title" (T "single.readMarkdown") "Content" (T "single.readMarkdown") -}}
{{- $options := dict "Class" "link-to-markdown" "Destination" .RelPermalink "Title" (T "single.readMarkdown") "Content" (T "single.readMarkdown") "externalIcon" false -}}
{{- $linkOptions = $linkOptions | append $options -}}
{{- end -}}
{{- end -}}
{{- if $params.LinkToSource | and $gitRepo -}}
{{- $link := replace $blobURL "{path}" $.File.Path -}}
{{- $sourceURL = $params.sourceURL | default (add $link "?plain=1") -}}
{{- $options := dict "Class" "link-to-source" "Destination" $sourceURL "Title" (T "single.viewSource") "Content" (T "single.viewSource") -}}
{{- $options := dict "Class" "link-to-source" "Destination" $sourceURL "Title" (T "single.viewSource") "Content" (T "single.viewSource") "externalIcon" false -}}
{{- $linkOptions = $linkOptions | append $options -}}
{{- end -}}
{{- if $params.LinkToEdit | and $gitRepo -}}
{{- $link := replace $editURL "{path}" $.File.Path -}}
{{- $editURL = $params.editURL | default $link -}}
{{- $options := dict "Class" "link-to-edit" "Destination" $editURL "Title" (T "single.editThisPage") "Content" (T "single.editThisPage") -}}
{{- $options := dict "Class" "link-to-edit" "Destination" $editURL "Title" (T "single.editThisPage") "Content" (T "single.editThisPage") "externalIcon" false -}}
{{- $linkOptions = $linkOptions | append $options -}}
{{- end -}}
{{- if $params.LinkToReport | and $gitRepo -}}
{{- $link := replace $reportURL "{title}" ($.Title | urlquery) -}}
{{- $link = replace $link "{URL}" $.Permalink -}}
{{- $link = replace $link "{sourceURL}" $sourceURL -}}
{{- $options := dict "Class" "link-to-report" "Destination" $link "Title" (T "single.reportIssue") "Content" (T "single.reportIssue") -}}
{{- $linkOptions = $linkOptions | append $options -}}
{{- end -}}
{{- if $params.LinkToVscode | and hugo.IsServer | and (not $.File.IsContentAdapter) -}}
{{- $link := printf "vscode://file/%v" $.File.Filename -}}
{{- $options := dict "Class" "link-to-vscode" "Destination" $link "Title" (T "single.openInEditor") "Content" (T "single.openInEditor") -}}
{{- $options := dict "Class" "link-to-report" "Destination" $link "Title" (T "single.reportIssue") "Content" (T "single.reportIssue") "externalIcon" false -}}
{{- $linkOptions = $linkOptions | append $options -}}
{{- end -}}
{{- range $linkOptions -}}
+1 -6
View File
@@ -1,18 +1,13 @@
{{- $params := .Params | merge .Site.Params.page -}}
{{- $author := partial "function/get-author-map.html" .Params.author -}}
{{- .Store.Set "author" $author -}}
{{- $optim := slice
(dict "Process" "resize 16x16 Center webp q75" "descriptor" "16w")
(dict "Process" "resize 24x24 Center webp q75" "descriptor" "24w")
(dict "Process" "resize 32x32 Center webp q75" "descriptor" "32w")
-}}
<span class="post-author">
{{- $content := $author.name | default "Anonymous" -}}
{{- $icon := dict "Class" "fa-solid fa-user-circle" -}}
{{- /* Deprecate $params.authorAvatar in favor of $params.showAvatar and add front matter gravatar {bool} */ -}}
{{- if $author.avatar | and $params.authorAvatar -}}
{{- $content = printf "%v&nbsp;%v" (dict "Src" $author.avatar "Class" "avatar" "Alt" $content "Width" 16 "Height" 16 "OptimConfig" $optim | partial "plugin/image.html") $content -}}
{{- $content = printf "%v&nbsp;%v" (dict "Src" $author.avatar "Class" "avatar" "Alt" $content "Width" 20 "Height" 20 | partial "plugin/image.html") $content -}}
{{- $icon = "" -}}
{{- end -}}
{{- if $author.link -}}
@@ -1,42 +0,0 @@
{{- /* Related Content */ -}}
{{- /* https://gohugo.io/content-management/related/ */ -}}
{{- $params := partial "function/params.html" -}}
{{- if $params.related.enable | and ("aside" | in $params.related.position) | and (not $params.password) -}}
{{- $posts := .Scratch.Get "mainSectionPages" -}}
{{- if .Site.Params.page.hiddenFromRelated -}}
{{- $posts = where $posts "Params.hiddenfromrelated" false -}}
{{- else -}}
{{- $posts = where $posts "Params.hiddenfromrelated" "!=" true -}}
{{- end -}}
{{- $related := $posts.Related . | first ($params.related.count | default 5) -}}
{{- with $related -}}
<div class="details related-details open">
<div class="details-summary related-summary">
{{ dict "Class" "fa-solid fa-fire fa-fade text-danger fa-fw" | partial "plugin/icon.html" }}
<span class="related-title">{{ T "single.relatedContent" }}</span>
{{- dict "Class" "details-icon fa-solid fa-angle-right fa-fw" | partial "plugin/icon.html" -}}
</div>
<div class="details-content related-content">
<ul class="related-list">
{{- range $i, $p := . -}}
{{- $title := cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}}
<li class="related-item">
<a href="{{ .RelPermalink }}" title="{{ $title }}">{{ $title }}</a>
{{- with .HeadingsFiltered -}}
<ul>
{{- range . -}}
{{- $link := printf "%s#%s" $p.RelPermalink .ID | safeURL -}}
<li>
<a href="{{ $link }}" title="{{ .Title }}">{{ .Title }}</a>
</li>
{{- end -}}
</ul>
{{- end -}}
</li>
{{- end -}}
</ul>
</div>
</div>
{{- end -}}
{{- end -}}
+1 -1
View File
@@ -2,7 +2,7 @@
{{- /* https://gohugo.io/content-management/related/ */ -}}
{{- $params := partial "function/params.html" -}}
{{- if $params.related.enable | and ("footer" | in $params.related.position) | and (not $params.password) -}}
{{- if $params.related.enable | and (not $params.password) -}}
{{- $posts := .Scratch.Get "mainSectionPages" -}}
{{- if .Site.Params.page.hiddenFromRelated -}}
{{- $posts = where $posts "Params.hiddenfromrelated" false -}}
+8 -8
View File
@@ -36,20 +36,20 @@
{{- $readingProgress := .Site.Params.readingProgress -}}
{{- if $readingProgress.enable -}}
{{- with $readingProgress -}}
{{- $style := printf "%v: 0;%v: 0;" (.Start | default "left") (.Position | default "top") -}}
{{- $style := printf "--fi-progress-start: %v; %v: 0;" (.Start | default "left") (.Position | default "top") -}}
{{- if .Height | and (ne .Height "2px") -}}
{{- $style = printf "%v--progress-h: %v;" $style .Height -}}
{{- end -}}
{{- if .Reversed -}}
{{- $style = printf "%v%v" $style "width: calc(100% - var(--progress));" -}}
{{- $style = printf "%v --fi-progress-h: %v;" $style .Height -}}
{{- end -}}
{{- if .Light -}}
{{- $style = printf "%v--bg-progress: %v;" $style .Light -}}
{{- $style = printf "%v --fi-progress-bg: %v;" $style .Light -}}
{{- end -}}
{{- if .Dark -}}
{{- $style = printf "%v--bg-progress-dark: %v;" $style .Dark -}}
{{- $style = printf "%v --fi-progress-bg-dark: %v;" $style .Dark -}}
{{- end -}}
<div class="reading-progress-bar" {{ printf `style="%v"` $style | safeHTMLAttr }}></div>
<div class="reading-progress-bar"
{{- with .Reversed }} data-reversed="{{ . }}"{{ end }}
{{- printf ` style=%q` $style | safeHTMLAttr -}}
></div>
{{- end -}}
{{- end -}}
+3 -11
View File
@@ -14,8 +14,8 @@
{{- /* Collection List */ -}}
{{- partial "single/collection-list.html" . -}}
{{- /* Related Content */ -}}
{{- partial "single/related-aside.html" . -}}
{{- /* TODO Related Content */ -}}
{{/* {{- partial "single/related.html" . -}} */}}
{{- /* Custom Aside */ -}}
{{- block "custom-aside" . }}{{ end -}}
@@ -137,20 +137,12 @@
{{- /* Featured image */ -}}
{{- $image := $params.featuredimage -}}
{{- with dict "Path" $image "Resources" .Resources | partial "function/resource.html" }}
{{- $image = .RelPermalink }}
{{- end }}
{{- with .Resources.GetMatch "featured-image" -}}
{{- $image = .RelPermalink -}}
{{- end -}}
{{- with $image -}}
<div class="featured-image">
{{- $optim := slice
(dict "Process" "resize 800x webp q75" "descriptor" "800w")
(dict "Process" "resize 1200x webp q75" "descriptor" "1200w")
(dict "Process" "resize 1600x webp q75" "descriptor" "1600w")
-}}
{{- dict "Src" . "Title" $.Description "OptimConfig" $optim | partial "plugin/image.html" -}}
{{- dict "Src" . "Title" $.Description | partial "plugin/image.html" -}}
</div>
{{- end -}}
-7
View File
@@ -1,7 +0,0 @@
{{- $link := .Get "link" -}}
{{- $query := querify "url" $link -}}
{{- $request := printf "https://embed.bsky.app/oembed?%s" $query -}}
{{- $jsonOembed := resources.GetRemote $request -}}
{{- $jsonOembed = $jsonOembed | transform.Unmarshal -}}
{{- $jsonOHTML := $jsonOembed.html -}}
{{- $jsonOHTML | safeHTML -}}
+1 -11
View File
@@ -1,14 +1,4 @@
{{- $options := .Get "width" | default (.Get 0) | dict "width" -}}
{{- $options = .Get "height" | default (.Get 1) | dict "height" | merge $options -}}
{{- $options = .Get "js" | default false | dict "js" | merge $options -}}
{{- $options = .Get "async" | default false | dict "async" | merge $options -}}
{{- $options = .Get "data" | dict "data" | merge $options -}}
{{- $options = .Get "file" | dict "file" | merge $options -}}
{{- dict
"Options" $options
"Inner" .Inner
"Resources" .Page.Resources
"Position" .Position
| partial "plugin/echarts.html"
-}}
{{- dict "Options" $options "Inner" .Inner | partial "plugin/echarts.html" -}}
{{- .Page.Store.Set "hasEcharts" true -}}
-2
View File
@@ -1,2 +0,0 @@
<script src="https://gist.github.com/{{ index .Params 0 }}/{{ index .Params 1 }}.js{{if len .Params | eq 3 }}?file={{ index .Params 2 }}{{end}}"></script>
{{- /* EOF */ -}}
+3 -9
View File
@@ -3,22 +3,16 @@
{{- $caption := cond .IsNamedParams (.Get "caption") (.Get 2) | .Page.RenderString -}}
{{- $options = dict "Caption" $caption | merge $options -}}
{{- $options = dict "Resources" .Page.Resources | merge $options -}}
{{- $optim := slice
(dict "Process" "resize 800x webp q75" "descriptor" "800w")
(dict "Process" "resize 1200x webp q75" "descriptor" "1200w")
(dict "Process" "resize 1600x webp q75" "descriptor" "1600w")
-}}
{{- $options = dict "OptimConfig" $optim | merge $options -}}
{{- if .IsNamedParams -}}
{{- $options = dict "Title" (.Get "title") | merge $options -}}
{{- $options = dict "SrcSmall" (.Get "src_s") | merge $options -}}
{{- $options = dict "SrcLarge" (.Get "src_l") | merge $options -}}
{{- $options = dict "Height" (.Get "height") | merge $options -}}
{{- $options = dict "Width" (.Get "width") | merge $options -}}
{{- $options = .Get "linked" | ne false | dict "Linked" | merge $options -}}
{{- $options = dict "Rel" (.Get "rel") | merge $options -}}
{{- $options = dict "Loading" (.Get "loading" | default "lazy") | merge $options -}}
{{- with (.Get "optimise") -}}{{- $options = dict "Optimise" . | merge $options -}}{{- end -}}
{{- with (.Get "cacheRemote") -}}{{- $options = dict "CacheRemote" . | merge $options -}}{{- end -}}
{{- $options = dict "Loading" (.Get "loading") | merge $options -}}
{{- else -}}
{{- $options = cond $caption true false | dict "Linked" | merge $options -}}
{{- end -}}
+1 -9
View File
@@ -7,13 +7,5 @@
{{- $options = .Get "width" | dict "width" | merge $options -}}
{{- $options = .Get "height" | dict "height" | merge $options -}}
{{- $options = .Get "class" | dict "class" | merge $options -}}
{{- $options = .Get "data" | dict "data" | merge $options -}}
{{- $options = .Get "file" | dict "file" | merge $options -}}
{{- end -}}
{{- dict
"Options" $options
"Inner" .Inner
"Resources" .Page.Resources
"Position" .Position
| partial "plugin/timeline.html"
-}}
{{- dict "Options" $options "Inner" .Inner | partial "plugin/timeline.html" -}}
@@ -5,21 +5,24 @@
{{- define "content" -}}
{{- $taxonomies := .Data.Plural -}}
{{- $iconMap := dict
"categories" "fa-solid fa-folder-tree"
"collections" "fa-solid fa-layer-group"
"tags" "fa-solid fa-tags"
-}}
{{- $icon := index $iconMap $taxonomies | default $iconMap.categories -}}
<div class="page archive">
{{- $termsIcon := "" -}}
{{- if eq $taxonomies "categories" -}}
{{- $termsIcon = "fa-solid fa-folder-tree" -}}
{{- else if eq $taxonomies "tags" -}}
{{- $termsIcon = "fa-solid fa-tags" -}}
{{- else if eq $taxonomies "collections" -}}
{{- $termsIcon = "fa-solid fa-layer-group" -}}
{{- end -}}
{{- /* Title */ -}}
<h1 class="single-title animate__animated animate__pulse animate__faster">
{{- dict "Class" (add $icon " fa-fw me-1") | partial "plugin/icon.html" -}}
{{- with $termsIcon -}}
{{- dict "Class" (add . " fa-fw me-1") | partial "plugin/icon.html" -}}
{{- end -}}
{{- .Params.Title | default (T $taxonomies) | default $taxonomies | dict "Some" | T "allSome" }} <sup>{{ len .Data.Terms.ByCount }}</sup>
</h1>
{{- /* Render different taxonomies */ -}}
{{- $template := cond ( eq $taxonomies "tags") "tags" "taxonomies" -}}
{{- .Render $template -}}
{{- /* Render miscellaneous terms */ -}}
{{- .Render (add "terms/" $taxonomies) -}}
</div>
{{- end -}}
@@ -1,11 +1,6 @@
{{- /* Taxonomies Page */ -}}
{{- $iconMap := dict
"category" "fa-regular fa-folder"
"collection" "fa-solid fa-layer-group"
-}}
{{- $icon := index $iconMap .Data.Singular | default $iconMap.category -}}
{{- /* Categories Page */ -}}
<div class="taxonomy-cards {{ .Data.Plural }}">
<div class="categories-card">
{{- range .Data.Terms.ByCount -}}
{{- $term := .Term -}}
{{- $pages := .Pages -}}
@@ -14,7 +9,7 @@
<div class="card-item-wrapper">
<h2 class="card-item-title">
<a href='{{ partial "function/escapeurl.html" .RelPermalink }}'>
{{- dict "Class" (add $icon " fa-fw me-1") | partial "plugin/icon.html" -}}
{{- dict "Class" "fa-regular fa-folder fa-fw me-1" | partial "plugin/icon.html" -}}
{{- .Page.Title }} <sup>{{ len $pages }}</sup>
</a>
</h2>
@@ -39,4 +34,3 @@
{{- end -}}
{{- end -}}
</div>
{{- /* EOF */ -}}
+36
View File
@@ -0,0 +1,36 @@
{{- /* Collections Page */ -}}
<div class="collections-card">
{{- range .Data.Terms.ByCount -}}
{{- $term := .Term -}}
{{- $pages := .Pages -}}
{{- with $.Site.GetPage "taxonomy" (printf "%v/%v" $.Type $term) -}}
<div class="card-item">
<div class="card-item-wrapper">
<h2 class="card-item-title">
<a href='{{ partial "function/escapeurl.html" .RelPermalink }}'>
{{- dict "Class" "fa-solid fa-layer-group fa-fw me-1" | partial "plugin/icon.html" -}}
{{- .Page.Title }} <sup>{{ len $pages }}</sup>
</a>
</h2>
{{- range first 5 $pages -}}
<article class="archive-item">
<a href="{{ .RelPermalink }}" class="archive-item-link">
{{- $repost := .Params.repost | default dict -}}
{{- if eq $repost.enable true -}}
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}}
</a>
</article>
{{- end -}}
{{- if gt (len $pages) 5 -}}
<span class="more-post">
<a href='{{ partial "function/escapeurl.html" .RelPermalink }}' class="more-single-link">{{ T "pagination.more" }} >></a>
</span>
{{- end -}}
</div>
</div>
{{- end -}}
{{- end -}}
</div>
+261
View File
@@ -0,0 +1,261 @@
{
"name": "fixit-core",
"version": "0.3.16",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "fixit-core",
"version": "0.3.16",
"license": "MIT",
"devDependencies": {
"@hugo-fixit/fixit-releaser": "^1.1.4",
"husky": "^9.1.7"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@hugo-fixit/fixit-releaser": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/@hugo-fixit/fixit-releaser/-/fixit-releaser-1.1.4.tgz",
"integrity": "sha512-95LpqiKKAASrfbig49fH6wcit4VF9+e4LtjHHmiYNRFjuHAn25+6oau+PpgyoQO/46bvqYrOddZik3fxjVVY5w==",
"dev": true,
"license": "MIT",
"dependencies": {
"auto-changelog": "^2.5.0"
},
"bin": {
"fixit-releaser": "dist/bin/cli.js"
},
"engines": {
"node": ">=18"
}
},
"node_modules/auto-changelog": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/auto-changelog/-/auto-changelog-2.5.0.tgz",
"integrity": "sha512-UTnLjT7I9U2U/xkCUH5buDlp8C7g0SGChfib+iDrJkamcj5kaMqNKHNfbKJw1kthJUq8sUo3i3q2S6FzO/l/wA==",
"dev": true,
"license": "MIT",
"dependencies": {
"commander": "^7.2.0",
"handlebars": "^4.7.7",
"import-cwd": "^3.0.0",
"node-fetch": "^2.6.1",
"parse-github-url": "^1.0.3",
"semver": "^7.3.5"
},
"bin": {
"auto-changelog": "src/index.js"
},
"engines": {
"node": ">=8.3"
}
},
"node_modules/commander": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
"integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 10"
}
},
"node_modules/handlebars": {
"version": "4.7.8",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz",
"integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"minimist": "^1.2.5",
"neo-async": "^2.6.2",
"source-map": "^0.6.1",
"wordwrap": "^1.0.0"
},
"bin": {
"handlebars": "bin/handlebars"
},
"engines": {
"node": ">=0.4.7"
},
"optionalDependencies": {
"uglify-js": "^3.1.4"
}
},
"node_modules/husky": {
"version": "9.1.7",
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
"integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
"dev": true,
"license": "MIT",
"bin": {
"husky": "bin.js"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/import-cwd": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-3.0.0.tgz",
"integrity": "sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==",
"dev": true,
"license": "MIT",
"dependencies": {
"import-from": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/import-from": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz",
"integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"resolve-from": "^5.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"dev": true,
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/neo-async": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
"dev": true,
"license": "MIT"
},
"node_modules/node-fetch": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"dev": true,
"license": "MIT",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/parse-github-url": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.3.tgz",
"integrity": "sha512-tfalY5/4SqGaV/GIGzWyHnFjlpTPTNpENR9Ea2lLldSJ8EWXMsvacWucqY3m3I4YPtas15IxTLQVQ5NSYXPrww==",
"dev": true,
"license": "MIT",
"bin": {
"parse-github-url": "cli.js"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/resolve-from": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
"integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/semver": {
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"dev": true,
"license": "MIT"
},
"node_modules/uglify-js": {
"version": "3.19.3",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz",
"integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==",
"dev": true,
"license": "BSD-2-Clause",
"optional": true,
"bin": {
"uglifyjs": "bin/uglifyjs"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"dev": true,
"license": "BSD-2-Clause"
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dev": true,
"license": "MIT",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/wordwrap": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
"integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==",
"dev": true,
"license": "MIT"
}
}
}
+2 -3
View File
@@ -1,8 +1,7 @@
{
"name": "fixit-core",
"version": "0.3.20",
"version": "0.3.16",
"private": true,
"packageManager": "pnpm@10.5.2",
"description": "Hugo FixIt core theme component source files",
"keywords": [
"hugo",
@@ -31,7 +30,7 @@
"prepare": "husky"
},
"devDependencies": {
"@hugo-fixit/fixit-releaser": "^1.1.5",
"@hugo-fixit/fixit-releaser": "^1.1.4",
"husky": "^9.1.7"
},
"engines": {
-170
View File
@@ -1,170 +0,0 @@
lockfileVersion: '9.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
importers:
.:
devDependencies:
'@hugo-fixit/fixit-releaser':
specifier: ^1.1.5
version: 1.1.5
husky:
specifier: ^9.1.7
version: 9.1.7
packages:
'@hugo-fixit/fixit-releaser@1.1.5':
resolution: {integrity: sha512-QEVSLlgn1h6MZ+IuowmCYP9N5tJsinNyWsq2OJgr/iwNuaykMZ3N8z3BY99//uTJNzejfFy+o3MyFKuqPgWW/A==}
engines: {node: '>=18'}
hasBin: true
auto-changelog@2.5.0:
resolution: {integrity: sha512-UTnLjT7I9U2U/xkCUH5buDlp8C7g0SGChfib+iDrJkamcj5kaMqNKHNfbKJw1kthJUq8sUo3i3q2S6FzO/l/wA==}
engines: {node: '>=8.3'}
hasBin: true
commander@7.2.0:
resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
engines: {node: '>= 10'}
handlebars@4.7.8:
resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==}
engines: {node: '>=0.4.7'}
hasBin: true
husky@9.1.7:
resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==}
engines: {node: '>=18'}
hasBin: true
import-cwd@3.0.0:
resolution: {integrity: sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==}
engines: {node: '>=8'}
import-from@3.0.0:
resolution: {integrity: sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==}
engines: {node: '>=8'}
minimist@1.2.8:
resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==}
neo-async@2.6.2:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
node-fetch@2.7.0:
resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==}
engines: {node: 4.x || >=6.0.0}
peerDependencies:
encoding: ^0.1.0
peerDependenciesMeta:
encoding:
optional: true
parse-github-url@1.0.3:
resolution: {integrity: sha512-tfalY5/4SqGaV/GIGzWyHnFjlpTPTNpENR9Ea2lLldSJ8EWXMsvacWucqY3m3I4YPtas15IxTLQVQ5NSYXPrww==}
engines: {node: '>= 0.10'}
hasBin: true
resolve-from@5.0.0:
resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
engines: {node: '>=8'}
semver@7.7.1:
resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==}
engines: {node: '>=10'}
hasBin: true
source-map@0.6.1:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
tr46@0.0.3:
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
uglify-js@3.19.3:
resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==}
engines: {node: '>=0.8.0'}
hasBin: true
webidl-conversions@3.0.1:
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
whatwg-url@5.0.0:
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
wordwrap@1.0.0:
resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==}
snapshots:
'@hugo-fixit/fixit-releaser@1.1.5':
dependencies:
auto-changelog: 2.5.0
transitivePeerDependencies:
- encoding
auto-changelog@2.5.0:
dependencies:
commander: 7.2.0
handlebars: 4.7.8
import-cwd: 3.0.0
node-fetch: 2.7.0
parse-github-url: 1.0.3
semver: 7.7.1
transitivePeerDependencies:
- encoding
commander@7.2.0: {}
handlebars@4.7.8:
dependencies:
minimist: 1.2.8
neo-async: 2.6.2
source-map: 0.6.1
wordwrap: 1.0.0
optionalDependencies:
uglify-js: 3.19.3
husky@9.1.7: {}
import-cwd@3.0.0:
dependencies:
import-from: 3.0.0
import-from@3.0.0:
dependencies:
resolve-from: 5.0.0
minimist@1.2.8: {}
neo-async@2.6.2: {}
node-fetch@2.7.0:
dependencies:
whatwg-url: 5.0.0
parse-github-url@1.0.3: {}
resolve-from@5.0.0: {}
semver@7.7.1: {}
source-map@0.6.1: {}
tr46@0.0.3: {}
uglify-js@3.19.3:
optional: true
webidl-conversions@3.0.1: {}
whatwg-url@5.0.0:
dependencies:
tr46: 0.0.3
webidl-conversions: 3.0.1
wordwrap@1.0.0: {}
+1 -1
View File
@@ -7,7 +7,7 @@ licenselink = "https://github.com/hugo-fixit/FixIt/blob/main/LICENSE"
description = "A Clean, Elegant but Advanced Hugo Theme for Hugo."
homepage = "https://github.com/hugo-fixit/FixIt"
demosite = "https://fixit.lruihao.cn"
min_version = "0.146.0"
min_version = "0.141.0"
tags = [
"blog",