mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-26 00:08:55 +00:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de72a8c802 | |||
| f5b867d717 | |||
| 5ba4a8145b | |||
| 80e4d07294 | |||
| c2dc17e9e0 | |||
| b7edbf3e49 | |||
| adeecfb69d | |||
| 64378cb9c0 | |||
| 12c64431cb | |||
| 142e933fa2 | |||
| 1a43881170 | |||
| b0170f55f0 | |||
| 40c5dcb8c2 | |||
| ed14126001 | |||
| 22c3353dde | |||
| 2b936cb6ad | |||
| e2afa113be | |||
| 6c7145c311 | |||
| 8212d6fd02 |
+3
-1
@@ -10,7 +10,9 @@ jsconfig.json
|
||||
node_modules/
|
||||
|
||||
# VSCode
|
||||
.vscode
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
!.vscode/settings.json
|
||||
|
||||
# OS Files
|
||||
## Windows
|
||||
|
||||
Vendored
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"budparr.language-hugo-vscode",
|
||||
"kaellarkin.hugo-shortcode-syntax",
|
||||
"eliostruyf.vscode-hugo-themer"
|
||||
]
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"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
@@ -15,7 +15,7 @@ git clone https://github.com/hugo-fixit/FixIt.git && cd FixIt
|
||||
Then, install the dev dependencies.
|
||||
|
||||
```bash
|
||||
npm install
|
||||
pnpm 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
|
||||
npm run server
|
||||
pnpm server
|
||||
# run a local debugging server with watch in production environment
|
||||
npm run server:production
|
||||
pnpm 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
|
||||
npm run server:docs
|
||||
pnpm server:docs
|
||||
```
|
||||
|
||||
Finally, create a new pull request at <https://github.com/hugo-fixit/FixIt/pulls> to submit your contribution 🎉
|
||||
|
||||
@@ -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.
|
||||
|
||||
[](https://github.com/hugo-fixit/FixIt/releases)
|
||||
[](https://gohugo.io/)
|
||||
[](https://gohugo.io/)
|
||||
[](/LICENSE)
|
||||
[](https://github.com/hugo-fixit/FixIt)
|
||||
|
||||
@@ -217,6 +217,8 @@ 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 -->
|
||||
|
||||
+3
-1
@@ -25,7 +25,7 @@
|
||||
> 它的原型基于 [LoveIt](https://github.com/dillonzq/LoveIt) 主题,[KeepIt](https://github.com/Fastbyte01/KeepIt) 主题和 [LeaveIt](https://github.com/liuzc/LeaveIt) 主题。
|
||||
|
||||
[](https://github.com/hugo-fixit/FixIt/releases)
|
||||
[](https://gohugo.io/)
|
||||
[](https://gohugo.io/)
|
||||
[](/LICENSE)
|
||||
[](https://github.com/hugo-fixit/FixIt)
|
||||
|
||||
@@ -221,6 +221,8 @@ 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 -->
|
||||
|
||||
@@ -54,6 +54,15 @@ 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';
|
||||
|
||||
@@ -368,31 +368,6 @@
|
||||
max-width: 100%;
|
||||
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 {
|
||||
height: 1.25em;
|
||||
vertical-align: text-bottom;
|
||||
@@ -419,6 +394,7 @@
|
||||
img {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-3
@@ -686,7 +686,12 @@ class FixIt {
|
||||
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());
|
||||
// support both JSON and JS object literal
|
||||
if ($echarts.nextElementSibling.dataset.fmt === 'js') {
|
||||
eval(`chart.setOption(${stagingDOM.contentAsText()})`);
|
||||
} else {
|
||||
chart.setOption(stagingDOM.contentAsJson());
|
||||
}
|
||||
this._echartsArr.push(chart);
|
||||
}
|
||||
});
|
||||
@@ -1071,10 +1076,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');
|
||||
});
|
||||
@@ -1310,9 +1315,9 @@ class FixIt {
|
||||
window.setTimeout(() => {
|
||||
this.initComment();
|
||||
if (!this.config.encryption?.all) {
|
||||
this.fixTocScroll();
|
||||
this.initToc();
|
||||
this.initTocListener();
|
||||
this.fixTocScroll();
|
||||
}
|
||||
this.onScroll();
|
||||
this.onResize();
|
||||
|
||||
@@ -135,7 +135,7 @@ enableEmoji = true
|
||||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = true
|
||||
min = "0.141.0"
|
||||
min = "0.146.0"
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
# Markup related configuration in Hugo
|
||||
@@ -943,6 +943,13 @@ enableEmoji = true
|
||||
[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.
|
||||
@@ -1107,11 +1114,6 @@ enableEmoji = true
|
||||
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
|
||||
|
||||
@@ -1,14 +1,27 @@
|
||||
{{- /* TODO refactor */ -}}
|
||||
{{- /*
|
||||
A Markdown image has three components: the image description, the image destination, and optionally the image title.
|
||||
|
||||

|
||||
------------ ------------------ ---------
|
||||
description destination title
|
||||
------------ ------------------ ---------
|
||||
.Text .Destination .Title
|
||||
*/ -}}
|
||||
{{- $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" .Text "Caption" .Text "Title" .Title "Linked" $linked "Responsive" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" .Destination "Alt" .PlainText "Title" .Title "Caption" .Text "Linked" $linked "Loading" "lazy" "Resources" .Page.Resources "OptimConfig" $optim | partial "plugin/image.html" -}}
|
||||
<figcaption class="image-caption">
|
||||
{{- .Text | safeHTML -}}
|
||||
{{- .Title | safeHTML -}}
|
||||
</figcaption>
|
||||
</figure>
|
||||
{{- else -}}
|
||||
{{- $linked := (eq $params.lightgallery "force") | or ($params.lightgallery | and (ne .Title "")) -}}
|
||||
{{- dict "Src" .Destination "Alt" .Text "Title" .Title "Linked" $linked "Responsive" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" .Destination "Alt" .PlainText "Title" .Title "Linked" $linked "Loading" "lazy" "Resources" .Page.Resources "OptimConfig" $optim | partial "plugin/image.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
<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 -}}
|
||||
@@ -12,7 +15,12 @@
|
||||
{{- with $image -}}
|
||||
<div class="featured-image-preview">
|
||||
<a href="{{ $.RelPermalink }}" aria-label="{{ $.Title }}">
|
||||
{{- dict "Src" . "Title" $.Description "Alt" $.Title "Resources" $.Resources "Width" "50%" "Height" "50%" | partial "plugin/image.html" -}}
|
||||
{{- $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" -}}
|
||||
</a>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -32,13 +32,9 @@
|
||||
{{- $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 "CacheRemoteImages" $cacheRemoteImages.enable | partial "function/resource.html" }}
|
||||
{{- $url := urls.Parse $image }}
|
||||
{{- if not $url.Host | or $cacheRemoteImages.replace }}
|
||||
{{- $image = .Permalink }}
|
||||
{{- end }}
|
||||
{{- with dict "Path" $image "Resources" .Resources | partial "function/resource.html" }}
|
||||
{{- $image = .Permalink }}
|
||||
{{- end }}
|
||||
{{- with .Resources.GetMatch "featured-image" }}
|
||||
{{- $image = .Permalink }}
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
{{- /* cache remote image locally */ -}}
|
||||
{{- $resource := 0 -}}
|
||||
{{- $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 -}}
|
||||
{{- $isRemote := urls.Parse .Src | partial "function/is-url-remote.html" -}}
|
||||
|
||||
{{- if $pass -}}
|
||||
{{- with try ($remoteResource := resources.GetRemote .Path) -}}
|
||||
{{- if $isRemote -}}
|
||||
{{- with try (resources.GetRemote .Src) -}}
|
||||
{{- with .Err -}}
|
||||
{{- erroridf "error-get-remote-image" "%s" . -}}
|
||||
{{- warnf "%s" . -}}
|
||||
{{- else with .Value -}}
|
||||
{{- if eq $remoteResource.ResourceType "image" -}}
|
||||
{{- if .ResourceType | eq "image" -}}
|
||||
{{- /* placed remote image in public/images/remote/ */ -}}
|
||||
{{- $resource = $remoteResource | resources.Copy (add "/images/remote/" $remoteResource.Name) -}}
|
||||
{{- $resource = . | resources.Copy (add "/images/remote/" .Name) -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- erroridf "error-get-remote-image" "Unable to get remote image %q" $.Path -}}
|
||||
{{- warnf "Unable to get remote image %q" $.Src -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{{- return and (not (eq .Scheme "")) .Host -}}
|
||||
@@ -1,22 +1,18 @@
|
||||
{{- $Resources := .Resources | default page.Resources -}}
|
||||
{{- $resource := 0 -}}
|
||||
{{- $url := urls.Parse .Path -}}
|
||||
{{- if not $url.Host | and $url.Path | and (strings.HasSuffix $url.Path "/" | not) -}}
|
||||
{{- if not (partial "function/is-url-remote.html" $url) -}}
|
||||
{{- $dest := strings.TrimPrefix "./" $url.Path -}}
|
||||
{{- if $Resources -}}
|
||||
{{- with $Resources.GetMatch $url.Path -}}
|
||||
{{- with $Resources.GetMatch $dest -}}
|
||||
{{- $resource = . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if not $resource -}}
|
||||
{{- with resources.Get $url.Path -}}
|
||||
{{- with resources.Get $dest -}}
|
||||
{{- $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,3 +1,8 @@
|
||||
{{- /*
|
||||
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 -}}
|
||||
|
||||
@@ -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" 26 "Height" 26 | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" . "Class" "logo" "Alt" $.Site.Title "Width" 32 "Height" 32 | partial "plugin/image.html" -}}
|
||||
{{- end -}}
|
||||
{{- with .pre -}}
|
||||
<span class="header-title-pre">{{ . | safeHTML }}</span>
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
{{- 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 -}}
|
||||
@@ -28,10 +33,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" $.Site.Params.author.name "Width" 96 "Height" 96 | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" $avatar "Alt" "Home avatar" "Width" 96 "Height" 96 "OptimConfig" $optim | partial "plugin/image.html" -}}
|
||||
</a>
|
||||
{{- else -}}
|
||||
{{- dict "Src" $avatar "Alt" $.Site.Params.author.name "Width" 96 "Height" 96 | partial "plugin/image.html" -}}
|
||||
{{- dict "Src" $avatar "Alt" "Home avatar" "Width" 96 "Height" 96 "OptimConfig" $optim | partial "plugin/image.html" -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- .Scratch.Set "version" "v0.3.17-8b402129" -}}
|
||||
{{- .Scratch.Set "version" "v0.3.19" -}}
|
||||
{{- .Scratch.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
{{- /* Echarts support for code fences extended and shortcodes. */ -}}
|
||||
{{- $width := .Options.width | default "100%" -}}
|
||||
{{- $height := .Options.height | default "30rem" -}}
|
||||
{{- $js := .Options.js | default false -}}
|
||||
{{- $attrs := printf `style="width: %v; height: %v;"` $width $height -}}
|
||||
<div class="echarts" {{ $attrs | safeHTMLAttr }}></div>
|
||||
<template>{{ .Inner | transform.Unmarshal | jsonify }}</template>
|
||||
{{- /* EOF */ -}}
|
||||
{{- if $js -}}
|
||||
{{- $content := strings.TrimSpace .Inner -}}
|
||||
{{- if hugo.IsProduction -}}
|
||||
{{- $content = replaceRE `[\s]+` " " $content -}}
|
||||
{{- end -}}
|
||||
{{- if not ((hasPrefix $content "{") | and (hasSuffix $content "}")) -}}
|
||||
{{- errorf "ECharts format error\nPlease use JS object literal for Echarts, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#object_literals" -}}
|
||||
{{- end -}}
|
||||
<template data-fmt="js">{{ $content | safeJS }}</template>
|
||||
{{- else -}}
|
||||
<template>{{ .Inner | transform.Unmarshal | jsonify }}</template>
|
||||
{{- end -}}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
{{- 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 -}}
|
||||
@@ -1,111 +1,81 @@
|
||||
{{- /* 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 -}}
|
||||
{{- /*
|
||||
The image plugin is a partial that handles image resources.
|
||||
|
||||
{{- if hasPrefix .Src "data:image" -}}
|
||||
{{- $responsive = false -}}
|
||||
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) -}}
|
||||
{{- 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 -}}
|
||||
{{- $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 = . -}}
|
||||
{{- 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 -}}
|
||||
{{- $isSvg := false -}}
|
||||
{{- if $resource -}}
|
||||
{{- $isSvg = (eq $resource.MediaType.SubType "svg") -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* set image alt and caption */ -}}
|
||||
{{- $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) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $srcset = delimit $srcsetSlice ", " -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $src := $resource.RelPermalink | default .Src -}}
|
||||
{{- $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 -}}
|
||||
{{- $height := .Height -}}
|
||||
{{- $width := .Width -}}
|
||||
{{- if not $isSvg -}}
|
||||
{{- $height = $height | default $resource.Height | default "" -}}
|
||||
{{- $width = $width | default $resource.Width | default "" -}}
|
||||
{{- 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 }}>
|
||||
<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 }}>
|
||||
{{- 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 -}}
|
||||
/>
|
||||
<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 }}>
|
||||
{{- if .Linked -}}
|
||||
</a>
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
@@ -42,11 +42,10 @@
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- $cardIcon := .CardIcon -}}
|
||||
{{- 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 -}}
|
||||
{{- 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)) -}}
|
||||
{{- $cardIcon = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -18,7 +18,10 @@
|
||||
{{- $scopePages = .Scratch.Get "mainSectionPages" -}}
|
||||
{{- end -}}
|
||||
{{- $scopePages = where $scopePages.ByLastmod.Reverse "Section" "!=" "" -}}
|
||||
{{- /* {{- $scopePages = where $scopePages "File.IsContentAdapter" "ne" true -}} */ -}}
|
||||
{{- $hiddenAdapters := .Param "hiddenAdapters" | default false -}}
|
||||
{{- if $hiddenAdapters -}}
|
||||
{{- $scopePages = where $scopePages "File.IsContentAdapter" "ne" true -}}
|
||||
{{- end -}}
|
||||
{{- range first $maxPostCount $scopePages -}}
|
||||
{{- if gt (add .Lastmod.Unix (mul 86900 $days)) now.Unix -}}
|
||||
{{- if ne .Lastmod.Unix .Date.Unix }}
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
{{- $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 %v" (dict "Src" $author.avatar "Class" "avatar" "Alt" $content "Width" 20 "Height" 20 | partial "plugin/image.html") $content -}}
|
||||
{{- $content = printf "%v %v" (dict "Src" $author.avatar "Class" "avatar" "Alt" $content "Width" 16 "Height" 16 "OptimConfig" $optim | partial "plugin/image.html") $content -}}
|
||||
{{- $icon = "" -}}
|
||||
{{- end -}}
|
||||
{{- if $author.link -}}
|
||||
|
||||
@@ -137,12 +137,20 @@
|
||||
|
||||
{{- /* 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">
|
||||
{{- dict "Src" . "Title" $.Description | partial "plugin/image.html" -}}
|
||||
{{- $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" -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{{- $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,4 +1,5 @@
|
||||
{{- $options := .Get "width" | default (.Get 0) | dict "width" -}}
|
||||
{{- $options = .Get "height" | default (.Get 1) | dict "height" | merge $options -}}
|
||||
{{- $options = .Get "js" | default (.Get 2) | dict "js" | merge $options -}}
|
||||
{{- dict "Options" $options "Inner" .Inner | partial "plugin/echarts.html" -}}
|
||||
{{- .Page.Store.Set "hasEcharts" true -}}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<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,16 +3,22 @@
|
||||
{{- $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") | 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 -}}
|
||||
{{- else -}}
|
||||
{{- $options = cond $caption true false | dict "Linked" | merge $options -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -23,6 +23,6 @@
|
||||
{{- .Params.Title | default (T $taxonomies) | default $taxonomies | dict "Some" | T "allSome" }} <sup>{{ len .Data.Terms.ByCount }}</sup>
|
||||
</h1>
|
||||
{{- /* Render miscellaneous terms */ -}}
|
||||
{{- .Render (add "terms/" $taxonomies) -}}
|
||||
{{- .Render $taxonomies -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
Generated
-261
@@ -1,261 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "fixit-core",
|
||||
"version": "0.3.16",
|
||||
"version": "0.3.19",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.5.2",
|
||||
"description": "Hugo FixIt core theme component source files",
|
||||
"keywords": [
|
||||
"hugo",
|
||||
@@ -30,7 +31,7 @@
|
||||
"prepare": "husky"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hugo-fixit/fixit-releaser": "^1.1.4",
|
||||
"@hugo-fixit/fixit-releaser": "^1.1.5",
|
||||
"husky": "^9.1.7"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
Generated
+170
@@ -0,0 +1,170 @@
|
||||
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
@@ -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.141.0"
|
||||
min_version = "0.146.0"
|
||||
|
||||
tags = [
|
||||
"blog",
|
||||
|
||||
Reference in New Issue
Block a user