Compare commits

..

40 Commits

Author SHA1 Message Date
Cell efd7b86b67 🔖 Chore(release): 0.3.7 2024-05-21 22:31:10 +08:00
Cell d7c06360c2 🎉 Feat: add douyin shortcode support 2024-05-20 14:08:30 +08:00
Cell aa68514546 🔍 Feat: add default size for images 2024-05-17 17:37:59 +08:00
Cell 6b65ca8946 🌐 Docs: update I18n transitions 2024-05-17 14:07:03 +08:00
Cell 3e6dfc337b Merge pull request #442 from LoongmaSpirit/loongma-2024-5-13
 Feat: Add a custom domain setting option for Giscus, configured at `params.page.comment.giscus.origin`
2024-05-13 17:53:14 +08:00
loongma d82fefa7dd Feat: Add a custom domain setting option for Giscus, configured at params.page.comment.giscus.origin 2024-05-13 17:47:10 +08:00
Cell f13e95950a 📝 Docs(ignore): update README 2024-05-09 17:01:00 +08:00
Cell df7443951b 🔧 Chore(ignore): add ignoreCommitPattern config for auto changelog 2024-05-09 16:34:16 +08:00
Cell 71e855ab08 🚚 Feat: the parameter params.customFilePath and params.footer.custom is deprecated since v0.3.7, use layouts/partials/custom.html instead 2024-05-09 16:14:20 +08:00
Cell eb0acca980 Feat: add unified custom template entry file layouts/partials/custom.html 2024-05-09 15:44:57 +08:00
Cell f32402dcdf 🔖 Chore(release): 0.3.6 2024-05-07 17:17:26 +08:00
Cell 3e60685d5a ⬆️ Chore: update min hugo version to 0.123.0 2024-05-07 17:06:48 +08:00
Cell 3682a2a1d3 💄 Style: update card link image style 2024-05-07 17:06:01 +08:00
Cell 4d07d872d5 Revert " Perf: use zhihu API to get shortcut image from a link (#391)"
This reverts commit a1e123ac02.
2024-05-07 16:37:47 +08:00
Cell a1e123ac02 Perf: use zhihu API to get shortcut image from a link (#391) 2024-05-07 15:40:12 +08:00
Cell 6c3c3d7a9a 🐛 Fix: get remote image error in link shortcode (#391) 2024-05-07 12:38:52 +08:00
Cell a66bc4e0d1 📝 Docs: update hugo.toml config order 2024-05-07 10:31:24 +08:00
Cell b7e9c6166b Feat: add capitalize automatic headings config at params.page.heading.capitalize (#421) 2024-05-07 10:25:52 +08:00
Cell df47c49726 🔧 Chore: update auto changelog template 2024-05-06 16:44:03 +08:00
dependabot[bot] c881715c2a ⬆️ Chore(deps): bump peaceiris/actions-hugo from 2 to 3 (#441)
Bumps [peaceiris/actions-hugo](https://github.com/peaceiris/actions-hugo) from 2 to 3.
- [Release notes](https://github.com/peaceiris/actions-hugo/releases)
- [Changelog](https://github.com/peaceiris/actions-hugo/blob/main/CHANGELOG.md)
- [Commits](https://github.com/peaceiris/actions-hugo/compare/v2...v3)

---
updated-dependencies:
- dependency-name: peaceiris/actions-hugo
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 16:43:27 +08:00
Cell b32370803b 🔖 Chore(release): 0.3.5 2024-05-06 16:32:51 +08:00
Cell 020a8fdbcc Feat: add titleIcon font matter (#421) 2024-05-06 16:32:33 +08:00
Cell b06b89cc11 🔥 Feat: the type:friends in front matter is removed. use layout:friends instead. 2024-05-06 16:02:22 +08:00
Cell ba4b506b2f Feat: use strings.Title for post title and other titles (#421)
Closes #421
2024-05-06 16:00:29 +08:00
Cell 51bffc18b5 📝 Docs: fix typo 2024-05-06 11:06:29 +08:00
Cell 87f0fe68ae 🔥 Feat: remove params.dev.githubtoken adn replace with environment variable HUGO_PARAMS_GHTOKEN 2024-04-30 15:54:13 +08:00
Cell c2d168c6d1 Feat: add card-icon parameter for link shortcode (#391) 2024-04-30 13:01:00 +08:00
Cell c1b61c7997 📝 Docs: update Security Policy 2024-04-30 00:24:15 +08:00
Cell 5098685763 🔧 Chore: update Gravatar host list 2024-04-29 23:53:21 +08:00
Cell 3c886553db 💄 Style: add fontawesome icon for reward button 2024-04-29 22:53:11 +08:00
Cell 84bca1af4f 🔧 Chore: remove unnecessary parameters in package.json
replace with: `npm run server -- --bind 0.0.0.0`
2024-04-29 22:33:32 +08:00
Cell 851b8e48cb 💄 Style: refactor common text color classes 2024-04-29 22:28:43 +08:00
Cell 89beb8fe4f 💄 Style: refactor hr tag style and add awesome hr style 2024-04-29 22:19:45 +08:00
Cell 462506cb92 💄 Style: refactor heading style 2024-04-29 17:08:07 +08:00
Cell f6ed1ce8fe Revert: use .Title at summary to show post title 2024-04-29 15:14:42 +08:00
Cell b52b31a0cd 🚨 Chore: avoid code scanning alerts 2024-04-26 11:05:28 +08:00
William Wang 12ada20fb8 feat: support lang in giscus config
(cherry picked from commit 1c7a5b01b167d8bcbea422535dc1faf36a480cce)
2024-04-26 10:26:31 +08:00
Cell 39e6466d78 📝 Docs: update REAMDE 2024-04-26 10:06:40 +08:00
Cell fd0b171e5f 🔖 Chore(release): 0.3.4 2024-04-25 17:33:49 +08:00
Cell 7ceed732d2 🔧 Chore: update npm scripts 2024-04-25 17:33:25 +08:00
65 changed files with 562 additions and 423 deletions
+1
View File
@@ -4,6 +4,7 @@
"handlebarsSetup": ".auto-changelog/setup.js",
"sortCommits": "relevance",
"commitLimit": false,
"ignoreCommitPattern": "\\(ignore\\)",
"replaceText": {
"^(Feat|feat):": ":sparkles: Feat:",
"^(Fix|fix):": ":bug: Fix:",
+1 -1
View File
@@ -44,7 +44,7 @@ All notable changes to this project will be documented in this file.
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}
- **Full Changelog**: {{href}}
**Full Changelog**: {{href}}
---
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
uses: peaceiris/actions-hugo@v3
with:
hugo-version: latest
extended: true
+6 -1
View File
@@ -1,7 +1,7 @@
# FixIt Theme | Hugo
[![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.112.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.123.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
👉 English README | [简体中文说明](README.zh-cn.md)
@@ -99,8 +99,13 @@ To see this theme in action, here are some [live demo sites](https://fixit.lruih
- **Web Watermark** supported by [cell-watermark](https://github.com/Lruihao/watermark)
- **Chinese typesetting** supported by [pangu.js](https://github.com/vinta/pangu.js)
- Options to **cache remote image** locally
- High **extensibility**
- ...
### Theme Components
The FixIt theme balances **simplicity** and **extensibility** with extra [Hugo theme components](https://fixit.lruihao.cn/components/) for customization.
## Multilingual and i18n
FixIt supports the following languages:
+7 -2
View File
@@ -1,12 +1,12 @@
# FixIt 主题 | Hugo
[![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.112.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.123.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
👉 [English README](README.md) | 简体中文说明
[FixIt](https://github.com/hugo-fixit/FixIt) 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。[]
[FixIt](https://github.com/hugo-fixit/FixIt) 是一个**简洁**、**优雅**且**高效**的 [Hugo](https://gohugo.io/) 博客主题。
它的原型基于 [LoveIt 主题](https://github.com/dillonzq/LoveIt)[KeepIt 主题](https://github.com/Fastbyte01/KeepIt) 和 [LeaveIt 主题](https://github.com/liuzc/LeaveIt)。[^1]
@@ -99,8 +99,13 @@
- 支持基于 [cell-watermark](https://github.com/Lruihao/watermark) 的**网页水印**
- 支持基于 [pangu.js](https://github.com/vinta/pangu.js) 的**中文排版**
- 支持本地**缓存远程图床图片**
- 高**扩展性**
- ……
### 主题组件
FixIt 主题旨在在 **简洁性****可扩展性** 之间取得平衡。为此,我们开发了一系列额外的 [Hugo 主题组件](https://fixit.lruihao.cn/zh-cn/components/) 供用户选择。
## 多语言和国际化
FixIt 支持下列语言:
+7 -3
View File
@@ -2,12 +2,16 @@
## Supported Versions
| Version | Supported |
| :-----------: | :----------------: |
| 0.3.x | :white_check_mark: |
legacy and transitional versions:
| Version | Supported | LoveIt Compatibility |
| :-----------: | :----------------: | :------------------: |
| 0.1.x | :x: | :white_check_mark: |
| 0.2.x ~ 0.5.x | :x: | :white_check_mark: |
| 0.5.x ~ 1.0 | :white_check_mark: | :x: |
| > 1.0 | :white_check_mark: | :x: |
| 0.2.x | :x: | :white_check_mark: |
## Reporting a Vulnerability
+1 -1
View File
@@ -42,7 +42,7 @@
}
&.active {
@extend .text-secondary;
color: var(--#{$prefix}secondary);
}
}
}
+1 -5
View File
@@ -47,11 +47,7 @@
@each $color, $value in $theme-colors {
.text-#{$color} {
color: #{$value} !important;
[data-theme='dark'] & {
color: #{darken($value, 5%)} !important;
}
color: var(--#{$prefix}#{$color}) !important;
}
}
+14 -3
View File
@@ -5,13 +5,24 @@
@each $color, $value in $theme-colors {
--#{$prefix}#{$color}: #{$value};
}
@each $color, $value in $theme-colors {
--#{$prefix}#{$color}-dark: #{darken($value, 5%)};
}
// Scroll margin top and Stack sticky top related
--#{$prefix}scroll-mt: calc(#{$header-height} + #{$global-scroll-margin-top});
// Set breadcrumb height to 0px if breadcrumb is disabled
--#{$prefix}breadcrumb-height: 0px;
// hr style
--#{$prefix}hr-background-color: #{darken($global-border-color, 5%)};
--#{$prefix}hr-before-color: #{lighten($single-link-hover-color, 4%)};
}
// Dark theme
[data-theme=dark] {
@each $color, $value in $theme-colors {
--#{$prefix}#{$color}: #{darken($value, 5%)};
}
--#{$prefix}hr-background-color: #{lighten($global-border-color-dark, 5%)};
--#{$prefix}hr-before-color: #{darken($global-link-hover-color-dark, 4%)};
}
+79 -49
View File
@@ -15,14 +15,14 @@
width: max-content;
transform: rotate(30deg);
margin-right: 0.25em;
@extend .text-danger;
color: var(--#{$prefix}danger);
}
.icon-repost {
display: inline-block;
width: max-content;
margin-right: 0.25em;
@extend .text-success;
color: var(--#{$prefix}success);
}
}
@@ -94,71 +94,100 @@
padding: 5px;
}
hr {
position: relative;
height: 1em;
background: linear-gradient(to right, var(--#{$prefix}hr-background-color) 50%, transparent 50%);
background-size: 10px 2px;
background-position: center;
background-repeat: repeat-x;
border: none;
&.awesome-hr {
margin-block: 0.5em;
&::before {
display: inline-block;
font-weight: 600;
font-family: 'Font Awesome 6 Free';
text-rendering: auto;
-webkit-font-smoothing: antialiased;
position: absolute;
left: 5%;
top: 50%;
transform: translateY(-50%);
z-index: 1;
color: var(--#{$prefix}hr-before-color);
content: '\f0c4';
font-size: 20px;
line-height: 1;
transition: left 1s ease-in-out, color 0.3s ease, border-color 0.3s ease;
}
&:hover::before {
left: calc(95% - 20px);
}
}
}
.content {
> h1,
> h2 {
font-size: 1.5rem;
& code {
font-size: 1.25rem;
}
font-size: 1.5em;
padding-bottom: 0.3em;
border-bottom: 1px solid $global-border-color;
}
> h3 {
font-size: 1.375rem;
& code {
font-size: 1.125rem;
}
font-size: 1.25em;
}
> h4 {
font-size: 1.25rem;
& code {
font-size: 1rem;
}
font-size: 1em;
}
> h5 {
font-size: 1.125rem;
font-size: 0.875em;
}
> h6 {
font-size: 1rem;
font-size: 0.85em;
}
h2,
h3,
h4,
h5,
h6 {
> .heading-element {
display: flex;
font-weight: bold;
margin: 1.2rem 0;
line-height: 1.25;
margin-top: 1.5rem;
margin-bottom: 1rem;
[data-theme='dark'] & {
font-weight: bolder;
}
}
> h2,
> h3,
> h4,
> h5,
> h6 {
> .heading-mark::before {
content: '|';
margin-right: 0.3125rem;
color: $single-link-color;
code {
padding: 0 .2em;
font-size: inherit;
}
[data-theme='dark'] & {
color: $single-link-color-dark;
&:hover {
> .heading-mark {
opacity: 1;
}
}
}
> h2 > .heading-mark::before {
content: '#';
> .heading-mark {
display: inline-flex;
align-items: center;
opacity: 0;
padding-inline: 0.5rem;
transition: all 0.2s ease-in-out;
@include link(false, false);
svg {
fill: currentColor;
}
}
}
p {
@@ -411,17 +440,15 @@
}
}
@import '../_partials/_single/code';
@import '../_shortcodes';
hr {
margin-block: 1em;
position: relative;
border-top: 1px dashed darken($global-border-color, 5%);
border-bottom: none;
margin-block: 0;
}
[data-theme='dark'] & {
border-top: 1px dashed lighten($global-border-color-dark, 5%);
.footnotes {
hr {
background-color: var(--#{$prefix}hr-background-color);
height: 1px;
margin-block: 1em;
}
}
@@ -443,6 +470,9 @@
@include box-shadow(inset 0 -1px 0 $global-border-color-dark);
}
}
@import '../_partials/_single/code';
@import '../_shortcodes';
}
@import '../_partials/_single/reward';
@@ -135,7 +135,7 @@
.collection-count {
flex-shrink: 0;
@extend .text-secondary;
color: var(--#{$prefix}secondary);
}
.details-icon {
+17 -1
View File
@@ -76,11 +76,27 @@
white-space: nowrap;
}
&icon-globe {
&shortcut-icon {
width: 4rem;
height: 4rem;
flex-shrink: 0;
margin-left: 0.25rem;
&:is(i) {
text-align: center;
font-size: 3rem;
display: inline-flex;
align-items: center;
justify-content: center;
}
}
&shortcut-image {
width: 4rem;
height: 4rem !important;
flex-shrink: 0;
margin-left: 0.25rem;
object-fit: cover;
}
[data-theme='dark'] & {
+16
View File
@@ -0,0 +1,16 @@
.douyin {
position: relative;
width: 100%;
height: 0;
padding-bottom: 60.725%;
margin: 3% auto;
text-align: center;
iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
}
+1
View File
@@ -1,5 +1,6 @@
@import '_admonition';
@import '_bilibili';
@import '_douyin';
@import '_cardlink';
@import '_center-quote';
@import '_echarts';
+1 -1
View File
@@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" version="1.1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" version="1.1" width="16" height="16">
<defs>
<style>.fixit-ban{opacity:.9;}</style>
</defs>

Before

Width:  |  Height:  |  Size: 1004 B

After

Width:  |  Height:  |  Size: 1.0 KiB

+1 -2
View File
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 370 391" xml:space="preserve">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 370 391" xml:space="preserve" width="16" height="16">
<style type="text/css">
.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#FF4088;stroke:#C9177E;stroke-width:27;}
.st1{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}

Before

Width:  |  Height:  |  Size: 787 B

After

Width:  |  Height:  |  Size: 808 B

+3 -3
View File
@@ -89,13 +89,13 @@ FixItDecryptor = function (options = {}) {
const decryptorHandler = () => {
const $content = document.querySelector('#content');
_validatePassword(this.$el, $content, (password, salt) => {
_validatePassword(this.$el, $content, (passwordMD5, salt) => {
// cache decryption statistics
window.localStorage?.setItem(
`fixit-decryptor/#${location.pathname}`,
JSON.stringify({
expiration: Math.ceil(Date.now() / 1000) + this.options.duration,
password,
password: passwordMD5,
salt,
})
);
@@ -147,7 +147,7 @@ FixItDecryptor = function (options = {}) {
const decryptorHandler = () => {
const $decryptor = $shortcode.querySelector('.fixit-decryptor-container');
const $content = $shortcode.querySelector('[data-password][data-content]');
_validatePassword($decryptor, $content, (password, salt) => {
_validatePassword($decryptor, $content, (passwordMD5, salt) => {
_decryptContent($content, salt, false);
});
};
+1 -1
View File
@@ -854,7 +854,7 @@ class FixIt {
const giscusConfig = this.config.comment.giscus;
this._giscusOnSwitchTheme = this._giscusOnSwitchTheme || (() => {
const message = { setConfig: { theme: this.isDark ? giscusConfig.darkTheme : giscusConfig.lightTheme }};
document.querySelector('.giscus-frame')?.contentWindow.postMessage({ giscus: message }, 'https://giscus.app');
document.querySelector('.giscus-frame')?.contentWindow.postMessage({ giscus: message }, giscusConfig.origin);
});
this.switchThemeEventSet.add(this._giscusOnSwitchTheme);
this.giscus2parentMsg = window.addEventListener('message', (event) => {
+187 -173
View File
@@ -133,7 +133,7 @@ enableEmoji = true
[module]
[module.hugoVersion]
extended = true
min = "0.112.0"
min = "0.123.0"
# -------------------------------------------------------------------------------------
# Markup related configuration in Hugo
@@ -422,6 +422,7 @@ enableEmoji = true
# Footer config
[params.footer]
enable = true
# TODO remove in the future
# FixIt 0.2.17 | CHANGED Custom content (HTML format is supported)
# For advanced use, see parameter `params.customFilePath.footer`
custom = ""
@@ -615,6 +616,187 @@ enableEmoji = true
Phone = ""
Email = ""
RSS = true
# custom social links like the following
# [params.social.twitter]
# id = "lruihao"
# weight = 3
# prefix = "https://twitter.com/"
# Title = "Twitter"
# [social.twitter.icon]
# class = "fa-brands fa-x-twitter fa-fw"
# TypeIt config
[params.typeit]
# typing speed between each step (measured in milliseconds)
speed = 100
# blinking speed of the cursor (measured in milliseconds)
cursorSpeed = 1000
# character used for the cursor (HTML format is supported)
cursorChar = "|"
# cursor duration after typing finishing (measured in milliseconds, "-1" means unlimited)
duration = -1
# FixIt 0.2.18 | NEW whether your strings will continuously loop after completing
loop = false
# FixIt 0.2.15 | NEW Mermaid config
[params.mermaid]
# For values, see https://mermaid.js.org/config/theming.html#available-themes
themes = ["default", "dark"]
# FixIt 0.2.12 | NEW PanguJS config
[params.pangu]
# For Chinese writing
enable = false
selector = "article" # FixIt 0.2.17 | NEW
# FixIt 0.2.12 | NEW Watermark config
# Detail config see https://github.com/Lruihao/watermark#readme
[params.watermark]
enable = false
# watermark's text (HTML format is supported)
content = ""
# watermark's transparency
opacity = 0.1
# watermark's width. unit: px
width = 150
# watermark's height. unit: px
height = 20
# row spacing of watermarks. unit: px
rowSpacing = 60
# col spacing of watermarks. unit: px
colSpacing = 30
# watermark's tangent angle. unit: deg
rotate = 15
# watermark's fontSize. unit: rem
fontSize = 0.85
# FixIt 0.2.13 | NEW watermark's fontFamily
fontFamily = "inherit"
# FixIt 0.2.12 | NEW Busuanzi count
[params.ibruce]
enable = false
# Enable in post meta
enablePost = false
# Site verification code config for Google/Bing/Yandex/Pinterest/Baidu/360/Sogou
[params.verification]
google = ""
bing = ""
yandex = ""
pinterest = ""
baidu = ""
so = ""
sogou = ""
# Site SEO config
[params.seo]
# image URL
image = ""
# thumbnail URL
thumbnailUrl = ""
# Analytics config
[params.analytics]
enable = false
# Google Analytics
[params.analytics.google]
id = ""
# whether to anonymize IP
anonymizeIP = true
# Fathom Analytics
[params.analytics.fathom]
id = ""
# server url for your tracker if you're self hosting
server = ""
# Cookie consent config
[params.cookieconsent]
enable = true
# text strings used for Cookie consent banner
[params.cookieconsent.content]
message = ""
dismiss = ""
link = ""
# CDN config for third-party library files
[params.cdn]
# CDN data file name, disabled by default ["jsdelivr.yml", "unpkg.yml", ...]
# located in "themes/FixIt/assets/data/cdn/" directory
# you can store your own data files in the same path under your project: "assets/data/cdn/"
data = ""
# Compatibility config
[params.compatibility]
# whether to use Polyfill.io to be compatible with older browsers
polyfill = false
# whether to use object-fit-images to be compatible with older browsers
objectFit = false
# FixIt 0.2.14 | NEW GitHub banner in the top-right or top-left corner
[params.githubCorner]
enable = false
permalink = "https://github.com/hugo-fixit/FixIt"
title = "View source on GitHub"
position = "right" # ["left", "right"]
# FixIt 0.2.14 | NEW Gravatar config
[params.gravatar]
# FixIt 0.2.18 | NEW Depends on the author's email, if the author's email is not set, the local avatar will be used
enable = false
# Gravatar host, default: "www.gravatar.com"
host = "www.gravatar.com" # ["cravatar.cn", "gravatar.loli.net", ...]
style = "" # ["", "mp", "identicon", "monsterid", "wavatar", "retro", "blank", "robohash"]
# FixIt 0.2.16 | NEW Back to top
[params.backToTop]
enable = true
# Scroll percent label in b2t button
scrollpercent = false
# FixIt 0.2.16 | NEW Reading progress bar
[params.readingProgress]
enable = false
# Available values: ["left", "right"]
start = "left"
# Available values: ["top", "bottom"]
position = "top"
reversed = false
light = ""
dark = ""
height = "2px"
# FixIt 0.2.17 | NEW Progress bar in the top during page loading.
# For more information: https://github.com/CodeByZach/pace
[params.pace]
enable = false
# All available colors:
# ["black", "blue", "green", "orange", "pink", "purple", "red", "silver", "white", "yellow"]
color = "blue"
# All available themes:
# ["barber-shop", "big-counter", "bounce", "center-atom", "center-circle", "center-radar", "center-simple",
# "corner-indicator", "fill-left", "flash", "flat-top", "loading-bar", "mac-osx", "material", "minimal"]
theme = "minimal"
# TODO remove in the future
# FixIt 0.2.17 | NEW Define custom file paths
# Create your custom files in site directory `layouts/partials/custom` and uncomment needed files below
[params.customFilePath]
# aside = "custom/aside.html"
# profile = "custom/profile.html"
# footer = "custom/footer.html"
# FixIt 0.2.15 | NEW Developer options
# Select the scope named `public_repo` to generate personal access token,
# Configure with environment variable `HUGO_PARAMS_GHTOKEN=xxx`, see https://gohugo.io/functions/os/getenv/#examples
[params.dev]
enable = false
# Check for updates
c4u = false
# Mobile Devtools config
[params.dev.mDevtools]
enable = false
# "vConsole", "eruda" supported
type = "vConsole"
# Page config
[params.page]
@@ -694,6 +876,8 @@ enableEmoji = true
closeComment = false
# FixIt 0.3.0 | NEW page heading config
[params.page.heading]
# FixIt 0.3.3 | NEW whether to capitalize automatic text of headings
capitalize = false
# used with `markup.tableOfContents.ordered` parameter
[params.page.heading.number]
# whether to enable auto heading numbering
@@ -925,11 +1109,13 @@ enableEmoji = true
category = ""
categoryId = ""
mapping = ""
origin = "https://giscus.app" # Or set it to your self-hosted domain
strict = "0" # FixIt NEW | 0.2.18
term = ""
reactionsEnabled = "1"
emitMetadata = "0"
inputPosition = "bottom" # ["top", "bottom"]
lang = ""
lightTheme = "light"
darkTheme = "dark"
lazyLoad = true
@@ -953,175 +1139,3 @@ enableEmoji = true
[params.page.seo.publisher]
name = ""
logoUrl = ""
# TypeIt config
[params.typeit]
# typing speed between each step (measured in milliseconds)
speed = 100
# blinking speed of the cursor (measured in milliseconds)
cursorSpeed = 1000
# character used for the cursor (HTML format is supported)
cursorChar = "|"
# cursor duration after typing finishing (measured in milliseconds, "-1" means unlimited)
duration = -1
# FixIt 0.2.18 | NEW whether your strings will continuously loop after completing
loop = false
# FixIt 0.2.15 | NEW Mermaid config
[params.mermaid]
# For values, see https://mermaid.js.org/config/theming.html#available-themes
themes = ["default", "dark"]
# FixIt 0.2.12 | NEW PanguJS config
[params.pangu]
# For Chinese writing
enable = false
selector = "article" # FixIt 0.2.17 | NEW
# FixIt 0.2.12 | NEW Watermark config
# Detail config see https://github.com/Lruihao/watermark#readme
[params.watermark]
enable = false
# watermark's text (HTML format is supported)
content = ""
# watermark's transparency
opacity = 0.1
# watermark's width. unit: px
width = 150
# watermark's height. unit: px
height = 20
# row spacing of watermarks. unit: px
rowSpacing = 60
# col spacing of watermarks. unit: px
colSpacing = 30
# watermark's tangent angle. unit: deg
rotate = 15
# watermark's fontSize. unit: rem
fontSize = 0.85
# FixIt 0.2.13 | NEW watermark's fontFamily
fontFamily = "inherit"
# FixIt 0.2.12 | NEW Busuanzi count
[params.ibruce]
enable = false
# Enable in post meta
enablePost = false
# Site verification code config for Google/Bing/Yandex/Pinterest/Baidu/360/Sogou
[params.verification]
google = ""
bing = ""
yandex = ""
pinterest = ""
baidu = ""
so = ""
sogou = ""
# Site SEO config
[params.seo]
# image URL
image = ""
# thumbnail URL
thumbnailUrl = ""
# Analytics config
[params.analytics]
enable = false
# Google Analytics
[params.analytics.google]
id = ""
# whether to anonymize IP
anonymizeIP = true
# Fathom Analytics
[params.analytics.fathom]
id = ""
# server url for your tracker if you're self hosting
server = ""
# Cookie consent config
[params.cookieconsent]
enable = true
# text strings used for Cookie consent banner
[params.cookieconsent.content]
message = ""
dismiss = ""
link = ""
# CDN config for third-party library files
[params.cdn]
# CDN data file name, disabled by default ["jsdelivr.yml", "unpkg.yml", ...]
# located in "themes/FixIt/assets/data/cdn/" directory
# you can store your own data files in the same path under your project: "assets/data/cdn/"
data = ""
# Compatibility config
[params.compatibility]
# whether to use Polyfill.io to be compatible with older browsers
polyfill = false
# whether to use object-fit-images to be compatible with older browsers
objectFit = false
# FixIt 0.2.14 | NEW GitHub banner in the top-right or top-left corner
[params.githubCorner]
enable = false
permalink = "https://github.com/hugo-fixit/FixIt"
title = "View source on GitHub"
position = "right" # ["left", "right"]
# FixIt 0.2.14 | NEW Gravatar config
[params.gravatar]
# FixIt 0.2.18 | NEW Depends on the author's email, if the author's email is not set, the local avatar will be used
enable = false
# Gravatar host, default: "www.gravatar.com"
host = "www.gravatar.com" # ["cn.gravatar.com", "gravatar.loli.net", ...]
style = "" # ["", "mp", "identicon", "monsterid", "wavatar", "retro", "blank", "robohash"]
# FixIt 0.2.16 | NEW Back to top
[params.backToTop]
enable = true
# Scroll percent label in b2t button
scrollpercent = false
# FixIt 0.2.16 | NEW Reading progress bar
[params.readingProgress]
enable = false
# Available values: ["left", "right"]
start = "left"
# Available values: ["top", "bottom"]
position = "top"
reversed = false
light = ""
dark = ""
height = "2px"
# FixIt 0.2.17 | NEW Progress bar in the top during page loading.
# For more information: https://github.com/CodeByZach/pace
[params.pace]
enable = false
# All available colors:
# ["black", "blue", "green", "orange", "pink", "purple", "red", "silver", "white", "yellow"]
color = "blue"
# All available themes:
# ["barber-shop", "big-counter", "bounce", "center-atom", "center-circle", "center-radar", "center-simple",
# "corner-indicator", "fill-left", "flash", "flat-top", "loading-bar", "mac-osx", "material", "minimal"]
theme = "minimal"
# FixIt 0.2.17 | NEW Define custom file paths
# Create your custom files in site directory `layouts/partials/custom` and uncomment needed files below
[params.customFilePath]
# aside = "custom/aside.html"
# profile = "custom/profile.html"
# footer = "custom/footer.html"
# FixIt 0.2.15 | NEW Developer options
[params.dev]
enable = false
# Check for updates
c4u = false
# Please do not expose to public!
githubToken = ""
# Mobile Devtools config
[params.dev.mDevtools]
enable = false
# "vConsole", "eruda" supported
type = "vConsole"
+1 -1
View File
@@ -14,7 +14,7 @@ quicklyUpgrade = "Quickly upgrade use command: "
[baseof]
backToTop = "Back to Top"
viewComments = "View Comments"
noscript = "Theme FixIt works best with JavaScript enabled."
noscript = "यह वेबसाइट जावास्क्रिप्ट सक्षम होने पर सबसे अच्छा काम करती है।"
# === baseof ===
# === Taxonomy ===
+1 -1
View File
@@ -15,7 +15,7 @@ quicklyUpgrade = "La mise à jour rapide utilise la commande: "
[baseof]
backToTop = "Retour en Haut"
viewComments = "Afficher les Commentaires"
noscript = "Le thème FixIt fonctionne mieux quand JavaScript est activé."
noscript = "Ce site Web fonctionne mieux quand JavaScript est activé."
# === baseof ===
# === Taxonomy ===
+2 -1
View File
@@ -15,7 +15,8 @@ quicklyUpgrade = "शीघ्रता से अपग्रेड यह क
[baseof]
backToTop = "वापस शीर्ष पर"
viewComments = "टिप्पणियाँ देखें"
noscript = "फिक्सइट थीम जावास्क्रिप्ट सक्षम होने पर सबसे अच्छा काम करता है।"
# This website works best with JavaScript enabled.
noscript = "यह वेबसाइट जेएस को चालू करके बेहतर काम करती है।"
# === baseof ===
# === Taxonomy ===
+1 -1
View File
@@ -15,7 +15,7 @@ quicklyUpgrade = "使用命令快速升级:"
[baseof]
backToTop = "回到顶部"
viewComments = "查看评论"
noscript = "FixIt 主题在启用 JavaScript 的情况下效果最佳。"
noscript = "该网站在启用 JavaScript 的情况下效果最佳。"
# === baseof ===
# === Taxonomy ===
+1 -1
View File
@@ -15,7 +15,7 @@ quicklyUpgrade = "使用命令快速升級:"
[baseof]
backToTop = "回到頂部"
viewComments = "查看評論"
noscript = "FixIt 主題在啟用 JavaScript 的情況下效果最佳。"
noscript = "該網站在啟用 JavaScript 的情況下效果最佳。"
# === baseof ===
# === Taxonomy ===
+9 -8
View File
@@ -13,9 +13,7 @@
{{- end -}}
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading-element">
<a href="#{{ .Anchor | safeURL }}" class="heading-mark"></a>
{{- $title := .Text -}}
{{- /* Only enable in main section pages */ -}}
{{- $onlyMainSection := cond $params.heading.number.onlyMainSection (eq .Page.Type "posts") true -}}
{{- if $params.heading.number.enable | and $onlyMainSection -}}
@@ -33,7 +31,7 @@
{{- $h6 := "6" | index $headingMap | int | string -}}
{{- /* Apply the level based on the format */ -}}
{{- $title := "" -}}
{{- $title = "" -}}
{{- if .Level | eq 1 -}}
{{- $title = $h1Format -}}
{{- else if .Level | eq 2 -}}
@@ -55,10 +53,13 @@
{{- $title = replace $title "{h5}" $h5 -}}
{{- $title = replace $title "{h6}" $h6 -}}
{{- $title = replace $title "{title}" .Text -}}
{{- $title | safeHTML -}}
{{- else -}}
{{- .Text | safeHTML -}}
{{- end -}}
{{- if $params.heading.capitalize -}}
{{- $title = replace $title .PlainText (title .PlainText) -}}
{{- end -}}
<span>{{ $title | safeHTML }}</span>
<a href="#{{ .Anchor | safeURL }}" class="heading-mark">
<svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>
</a>
</h{{ .Level }}>
{{- /* EOF */ -}}
+3
View File
@@ -1,4 +1,5 @@
{{- partial "init/index.html" . -}}
{{- partial "custom.html" . -}}
<!DOCTYPE html>
<html itemscope itemtype="http://schema.org/WebPage" lang="{{ .Site.LanguageCode }}">
@@ -14,6 +15,8 @@
{{- partial "head/meta.html" . -}}
{{- partial "head/link.html" . -}}
{{- partial "head/seo.html" . -}}
{{- /* Custom head */ -}}
{{- block "custom-head" . }}{{ end -}}
</head>
<body data-header-desktop="{{ .Site.Params.header.desktopMode }}" data-header-mobile="{{ .Site.Params.header.mobileMode }}">
{{- /* Check theme isDark before body rendering */ -}}
+8 -4
View File
@@ -1,5 +1,5 @@
{{- define "title" -}}
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
{{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) -}}
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
{{- end -}}
@@ -8,8 +8,12 @@
<div class="header">
{{- /* Title */ -}}
<h1 class="single-title animate__animated animate__pulse animate__faster">
{{- dict "Class" "fa-solid fa-feather fa-fw me-1" | partial "plugin/icon.html" -}}
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} <sup>{{ .Pages.Len }}</sup>
{{- $titleIcon := "fa-solid fa-feather" -}}
{{- with .Params.titleIcon -}}
{{- $titleIcon = . -}}
{{- end -}}
{{- dict "Class" (add $titleIcon " fa-fw me-1") | partial "plugin/icon.html" -}}
{{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) }} <sup>{{ .Pages.Len }}</sup>
</h1>
{{- /* Total word count */ -}}
{{- /* See https://github.com/hugo-fixit/FixIt/issues/124 */ -}}
@@ -49,7 +53,7 @@
{{- if eq $repost.enable true -}}
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- .LinkTitle -}}
{{- title .LinkTitle -}}
</a>
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Date.Format }}'>
{{- .Date | dateFormat ($.Site.Params.section.dateFormat | default "01-02") -}}
+2 -2
View File
@@ -1,5 +1,5 @@
{{- define "title" -}}
{{- .Title -}}
{{- title .Title -}}
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
{{- end -}}
@@ -8,7 +8,7 @@
<article class="page single special">
<div class="header">
{{- /* Title */ -}}
<h1 class="single-title animate__animated animate__pulse animate__faster">{{- .Title -}}</h1>
<h1 class="single-title animate__animated animate__pulse animate__faster">{{- title .Title -}}</h1>
{{- /* Subtitle */ -}}
{{- with $params.subtitle -}}<p class="single-subtitle animate__animated animate__fadeIn">{{ . }}</p>{{- end -}}
+2 -2
View File
@@ -1,9 +1,9 @@
{{- $params := partial "function/params.html" -}}
{{- $author := .Store.Get "author" -}}
# {{ .Title }}
# {{ title .Title }}
{{ if $params.password -}}
***{{ T "single.encryptedAbstract" }}***
_**{{ T "single.encryptedAbstract" }}**_
{{- else -}}
{{ .RawContent | replaceRE "\n?{{% fixit-encryptor .+ %}}((\n|.)*){{% /fixit-encryptor %}}\n?" "" }}
{{- end }}
+2 -2
View File
@@ -12,7 +12,7 @@
{{- with $image -}}
<div class="featured-image-preview">
<a href="{{ $.RelPermalink }}" aria-label="{{ $.Title }}">
{{- dict "Src" . "Title" $.Description "Alt" $.Title "Resources" $.Resources | partial "plugin/image.html" -}}
{{- dict "Src" . "Title" $.Description "Alt" $.Title "Resources" $.Resources "Width" "50%" "Height" "50%" | partial "plugin/image.html" -}}
</a>
</div>
{{- end -}}
@@ -31,7 +31,7 @@
<span title="{{ $title }}" class="icon-repost">{{- $icon | partial "plugin/icon.html" -}}</span>
{{- end -}}
{{- end -}}
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
<a href="{{ .RelPermalink }}">{{ title .Title }}</a>
</h2>
{{- /* Meta */ -}}
-44
View File
@@ -1,44 +0,0 @@
{{- /* TODO remove this template */ -}}
{{- warnf "The `type:friends` in front matter is deprecated. Use `layout:friends` instead.\n" -}}
{{- warnf "Front matter 参数 `type:friends` 已弃用。请改用 `layout:friends`。" -}}
{{- define "title" -}}
{{- .Title -}}
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
{{ end -}}
{{- define "content" -}}
{{- $params := partial "function/params.html" -}}
<article class="page single special friends">
<div class="header">
{{- /* Title */ -}}
<h1 class="single-title animate__animated animate__pulse animate__faster">{{- .Title -}}</h1>
{{- /* Subtitle */ -}}
{{- with $params.subtitle -}}<p class="single-subtitle animate__animated animate__fadeIn">{{ . }}</p>{{- end -}}
</div>
{{- /* Friend links */ -}}
<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 }}" href="{{ $friend.url | safeURL }}" rel="external noopener noreferrer" target="_blank">
{{ if $friend.avatar }}
{{- dict "Src" $friend.avatar "Alt" $friend.nickname "Class" "friend-avatar" | partial "plugin/image.html" -}}
{{ else }}
<svg class="friend-avatar" aria-hidden="true">
<use xlink:href="#icon-{{ add 1 $index }}"></use>
</svg>
{{ end }}
<span class="friend-nickname" title="{{ $friend.nickname }}">@{{ $friend.nickname }}</span>
</a>
{{ end }}
</div>
{{- /* Content */ -}}
<div class="content" id="content">
{{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
</div>
{{- /* Comment */ -}}
{{- partial "single/comment.html" . -}}
</article>
{{- end -}}
+1 -1
View File
@@ -51,7 +51,7 @@
{{- if eq $repost.enable true -}}
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- .LinkTitle -}}
{{- title .LinkTitle -}}
</a>
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Date.Format }}'>
{{- .Date | dateFormat ($.Site.Params.archives.dateFormat | default "01-02") -}}
+2 -2
View File
@@ -1,5 +1,5 @@
{{- define "title" -}}
{{- .Title -}}
{{- title .Title -}}
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
{{- end -}}
@@ -8,7 +8,7 @@
<article class="page single special friends">
<div class="header">
{{- /* Title */ -}}
<h1 class="single-title animate__animated animate__pulse animate__faster">{{- .Title -}}</h1>
<h1 class="single-title animate__animated animate__pulse animate__faster">{{- title .Title -}}</h1>
{{- /* Subtitle */ -}}
{{- with $params.subtitle -}}<p class="single-subtitle animate__animated animate__fadeIn">{{ . }}</p>{{- end -}}
</div>
+3
View File
@@ -306,3 +306,6 @@
{{- end -}}
{{- partial "plugin/analytics.html" . -}}
{{- /* Custom Assets */ -}}
{{- block "custom-assets" . }}{{ end -}}
+2 -2
View File
@@ -3,10 +3,10 @@
<ol class="breadcrumb">
{{- range .Ancestors.Reverse -}}
{{- if or .Site.Params.breadcrumb.showHome (not .IsHome) -}}
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}" title="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage | and .Summary }}{{ .Summary }}{{ else }}{{ .LinkTitle }}{{ end }}{{ end }}">{{ cond (and .Site.Params.breadcrumb.showHome .IsHome) (T "single.home") ((lower .LinkTitle | T) | default .LinkTitle) }}</a></li>
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}" title="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage | and .Summary }}{{ .Summary }}{{ else }}{{ title .LinkTitle }}{{ end }}{{ end }}">{{ cond (and .Site.Params.breadcrumb.showHome .IsHome) (T "single.home") ((lower .LinkTitle | T) | default (title .LinkTitle)) }}</a></li>
{{- end -}}
{{- end -}}
<li class="breadcrumb-item active" aria-current="page">{{ .LinkTitle }}</li>
<li class="breadcrumb-item active" aria-current="page">{{ title .LinkTitle }}</li>
</ol>
</nav>
{{- end -}}
+22
View File
@@ -0,0 +1,22 @@
{{- /*
To avoid upgrade conflicts and facilitate the reference of theme components,
it's strongly recommended to copy this file from the theme to your project and override it.
*/ -}}
{{- define "custom-head" -}}
{{- end -}}
{{- define "custom-profile" -}}
{{- end -}}
{{- define "custom-aside" -}}
{{- end -}}
{{- define "custom-footer" -}}
{{- end -}}
{{- define "custom-widgets" -}}
{{- end -}}
{{- define "custom-assets" -}}
{{- end -}}
+4 -1
View File
@@ -3,9 +3,12 @@
{{- if ne $footerConfig.enable false -}}
<footer class="footer">
<div class="footer-container">
{{- /* Custom Content */ -}}
{{- /* TODO remove Custom Content */ -}}
{{- partial (.Scratch.Get "customFilePath").footer . -}}
{{- /* Custom Footer */ -}}
{{- block "custom-footer" . }}{{ end -}}
{{- /* Powered by Hugo and Theme - FixIt */ -}}
{{- if ne $footerConfig.powered.enable false -}}
<div class="footer-line powered{{ with $footerConfig.order.powered }} order-{{ . }}{{ end }}">
@@ -1,18 +1,22 @@
{{- /* cache remote image locally */ -}}
{{- $resource := 0 -}}
{{- $suffixList := slice ".jpeg" ".jpg" ".png" ".gif" ".bmp" ".tif" ".tiff" ".webp" ".avif" ".svg" -}}
{{- $suffixValid := (dict "Path" . "Suffixes" $suffixList | partial "function/suffix-validation.html") -}}
{{- $suffixValid := (dict "Path" .Path "Suffixes" $suffixList | partial "function/suffix-validation.html") -}}
{{- /* maybe could add domain validation */ -}}
{{- $pass := $suffixValid | or .Pass -}}
{{- if $suffixValid -}}
{{- with $remoteResource := resources.GetRemote . -}}
{{- if $pass -}}
{{- with $remoteResource := resources.GetRemote .Path -}}
{{- with .Err -}}
{{- warnf "%s" . -}}
{{ else }}
{{- erroridf "error-get-remote-image" "%s" . -}}
{{- else -}}
{{- if eq $remoteResource.ResourceType "image" -}}
{{- /* placed remote image in public/images/remote/ */ -}}
{{- $resource = $remoteResource | resources.Copy (add "/images/remote/" $remoteResource.Name) -}}
{{- end -}}
{{- end -}}
{{- else -}}
{{- erroridf "error-get-remote-image" "Unable to get remote image %q" .Path -}}
{{- end -}}
{{- end -}}
{{- return $resource -}}
+1 -1
View File
@@ -15,7 +15,7 @@
{{- else -}}
{{- $cacheRemoteImages := .CacheRemoteImages | default false -}}
{{- if $cacheRemoteImages -}}
{{- $resource = partial "function/get-remote-image.html" .Path -}}
{{- $resource = partial "function/get-remote-image.html" (dict "Path" .Path) -}}
{{- end -}}
{{- end -}}
+2 -2
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 | 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>
@@ -156,7 +156,7 @@
<a href="{{ $homeRelPermalink }}" title="{{ .Site.Title }}">
{{- with .Site.Params.header.title -}}
{{- with .logo -}}
{{- dict "Src" . "Class" "logo" | 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>
+6 -3
View File
@@ -28,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" $.Site.Params.author.name | 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" $.Site.Params.author.name | partial "plugin/image.html" -}}
{{- dict "Src" $avatar "Alt" $.Site.Params.author.name "Width" 96 "Height" 96 | partial "plugin/image.html" -}}
{{- end -}}
</div>
{{- end -}}
@@ -108,6 +108,9 @@
</h3>
{{- end -}}
{{- /* Custom Content */ -}}
{{- /* TODO remove Custom Content */ -}}
{{- partial (.Scratch.Get "customFilePath").profile . -}}
{{- /* Custom Profile */ -}}
{{- block "custom-profile" . }}{{ end -}}
</div>
@@ -2,24 +2,18 @@
{{- $warns := slice -}}
{{- $errors := slice -}}
{{- with .Site.Params.home.profile.gravatarSite -}}
{{- $warns = $warns | append "The parameter `home.profile.gravatarSite` is deprecated since v0.2.14, use `gravatar.host` instead." -}}
{{- end -}}
{{- with .Site.Params.ibruce.siteTime -}}
{{- $warns = $warns | append "The parameter `ibruce.siteTime` is deprecated since v0.2.14, use `footer.siteTime` instead." -}}
{{- end -}}
{{- with .Site.Params.autoBookmark -}}
{{- $warns = $warns | append "The parameter `autoBookmark` is deprecated since v0.2.17, use `page.autoBookmark` instead." -}}
{{- end -}}
{{- with .Site.Params.footer.siteTime -}}
{{- if not (reflect.IsMap .) -}}
{{- $warns = $warns | append "The parameter `footer.siteTime` has changed to a Map since v0.2.17. Please correct the format!" -}}
{{- end -}}
{{- end -}}
{{- with .Site.Params.gitRepo | or .Site.Params.page.edit -}}
{{- $warns = $warns | append "The parameter `params.gitRepo` and `params.page.edit` is deprecated since v0.3.0, use `params.gitInfo` instead." -}}
{{- end -}}
{{- with .Site.Params.customFilePath -}}
{{- $warns = $warns | append "The parameter `params.customFilePath` is deprecated since v0.3.7, use `layouts/partials/custom.html` instead." -}}
{{- end -}}
{{- with .Site.Params.footer.custom -}}
{{- $warns = $warns | append "The parameter `params.footer.custom` is deprecated since v0.3.7, use `layouts/partials/custom.html` instead." -}}
{{- end -}}
{{- if len $warns -}}
{{- warnf "Deprecated parameter detection until %v\n - %v\n\n" (.Scratch.Get "version") (delimit $warns "\n - ") -}}
{{- end -}}
+2 -2
View File
@@ -15,9 +15,9 @@
{{- $pages := where .Site.RegularPages "Type" "posts" -}}
{{- .Scratch.Set "mainSectionPages" $pages -}}
{{- /* Select the scope named "public_repo" to generate personal access token */ -}}
{{- /* Select the scope named `public_repo` to generate personal access token */ -}}
{{- $header := dict "Authorization" "" -}}
{{- with .Site.Params.dev.githubtoken -}}
{{- with (getenv "HUGO_PARAMS_GHTOKEN") -}}
{{- $header = dict "Authorization" (printf "token %v" .) -}}
{{- end -}}
{{- .Scratch.Set "githubTokenHeader" $header -}}
+1 -1
View File
@@ -1,4 +1,4 @@
{{- .Scratch.Set "version" "v0.3.3" -}}
{{- .Scratch.Set "version" "v0.3.7" -}}
{{- .Scratch.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}
+25 -4
View File
@@ -4,7 +4,8 @@
{{- if eq .Noreferrer false -}}
{{- $noreferrer = false -}}
{{- end -}}
{{- if (urls.Parse .Destination).Host | or .Newtab -}}
{{- $url := urls.Parse .Destination -}}
{{- if $url.IsAbs | or .Newtab -}}
{{- $rel = cond $noreferrer "external nofollow noopener noreferrer" "external nofollow" -}}
{{- $external = true -}}
{{- end -}}
@@ -40,7 +41,19 @@
{{- dict "Class" "fa-solid fa-download fa-fw ms-1 text-secondary" | partial "plugin/icon.html" -}}
{{- end -}}
{{- else -}}
<span class="cl-backdrop" {{ printf "style=\"--cl-bg-url: url(%v);\"" (resources.Get "images/fixit.svg" | minify).RelPermalink | safeHTMLAttr }}></span>
{{- $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 -}}
{{- $cardIcon = .RelPermalink -}}
{{- end -}}
{{- end -}}
{{- $attrs := `class="cl-backdrop"` -}}
{{- $attrs = printf ` style="--cl-bg-url: url(%v);"` (resources.Get "images/fixit.svg" | minify).RelPermalink | add $attrs -}}
<span {{ $attrs | safeHTMLAttr }}></span>
<span class="cl-content">
<span class="cl-text">
<span class="cl-title">
@@ -59,9 +72,17 @@
</span>
</span>
{{- if .Download -}}
<svg class="cl-icon-download" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="64" height="64"><path d="M824.32 473.6c-15.36-2.56-25.6-15.36-25.6-30.72 0-112.64-71.68-217.6-179.2-250.88-148.48-46.08-289.28 38.4-332.8 166.4-2.56 10.24-12.8 17.92-23.04 20.48C143.36 401.92 51.2 509.44 51.2 637.44v2.56c0 115.2 97.28 204.8 209.92 204.8h524.8c102.4-2.56 184.32-84.48 184.32-186.88 2.56-89.6-61.44-163.84-145.92-184.32z m-273.92 225.28c-12.8 12.8-30.72 15.36-46.08 10.24H501.76c-5.12-2.56-10.24-5.12-15.36-10.24L366.08 578.56c-15.36-15.36-15.36-43.52 0-58.88 15.36-15.36 43.52-15.36 58.88 0l51.2 51.2V352.4608c0-23.04 17.92-40.96 40.96-40.96 23.04 0 40.96 17.92 40.96 40.96v218.4192l51.2-51.2c17.92-17.92 43.52-17.92 61.44 0 17.92 15.36 17.92 40.96 0 58.88l-120.32 120.32z" fill="#4FC089"></path></svg>
<svg class="cl-shortcut-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="64" height="64"><path d="M824.32 473.6c-15.36-2.56-25.6-15.36-25.6-30.72 0-112.64-71.68-217.6-179.2-250.88-148.48-46.08-289.28 38.4-332.8 166.4-2.56 10.24-12.8 17.92-23.04 20.48C143.36 401.92 51.2 509.44 51.2 637.44v2.56c0 115.2 97.28 204.8 209.92 204.8h524.8c102.4-2.56 184.32-84.48 184.32-186.88 2.56-89.6-61.44-163.84-145.92-184.32z m-273.92 225.28c-12.8 12.8-30.72 15.36-46.08 10.24H501.76c-5.12-2.56-10.24-5.12-15.36-10.24L366.08 578.56c-15.36-15.36-15.36-43.52 0-58.88 15.36-15.36 43.52-15.36 58.88 0l51.2 51.2V352.4608c0-23.04 17.92-40.96 40.96-40.96 23.04 0 40.96 17.92 40.96 40.96v218.4192l51.2-51.2c17.92-17.92 43.52-17.92 61.44 0 17.92 15.36 17.92 40.96 0 58.88l-120.32 120.32z" fill="#4FC089"></path></svg>
{{- else -}}
<svg class="cl-icon-globe" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="64" height="64"><path d="M960 512c0 249.408-203.2 448-448 448-244.778667 0-448-198.592-448-448S262.592 64 512 64s448 198.592 448 448" fill="#2196F3"></path><path d="M507.52 718.08c0-8.96-4.48-13.44-13.44-17.92-26.88-8.96-53.76-8.96-76.16-31.381333-4.48-8.96-4.48-17.92-8.96-26.88-8.96-8.96-31.36-13.44-44.8-17.92h-89.6c-13.44-4.48-22.4-22.4-31.36-35.84 0-4.48 0-13.461333-8.96-13.461334-8.96-4.458667-17.92 4.501333-26.88 0-4.48-4.458667-4.48-8.96-4.48-13.418666 0-13.461333 8.96-26.901333 17.92-35.861334 13.44-8.96 26.88 4.48 40.32 4.48 4.48 0 4.48 0 8.96 4.48 13.44 4.48 17.92 22.4 17.92 35.861334v8.96c0 4.48 4.48 4.48 8.96 4.48 4.48-22.4 4.48-44.821333 8.96-67.2 0-26.88 26.88-53.781333 49.28-62.72 8.96-4.458667 13.44 4.501333 22.4 0 26.88-8.96 94.08-35.84 80.64-71.658667-8.96-31.381333-35.84-62.698667-71.68-58.24-8.96 4.501333-13.44 8.96-22.4 13.461333-13.44 8.96-40.32 35.84-53.76 35.84-22.4-4.48-22.4-35.84-17.92-49.301333 4.48-17.92 44.8-76.138667 71.68-67.178667l17.92 17.92c8.96 4.48 22.4 4.48 35.84 4.48 4.48 0 8.96 0 13.44-4.48 4.48-4.48 4.48-4.48 4.48-8.96 0-13.44-13.44-26.901333-22.4-35.861333s-22.4-17.92-35.84-22.378667c-44.8-13.461333-116.48 4.458667-152.32 35.84-35.84 31.36-62.72 85.12-80.64 129.92-8.96 26.88-17.92 62.698667-22.4 94.08-4.48 22.4-8.96 40.32 4.48 62.698667 13.44 26.88 40.32 53.781333 67.2 71.68 17.92 13.44 53.76 13.44 71.68 35.84 13.44 17.941333 8.96 40.32 8.96 62.72 0 26.88 17.92 49.28 26.88 71.658667 4.48 13.461333 8.96 31.381333 13.44 44.821333 0 4.48 4.48 31.36 4.48 35.84 26.88 13.44 49.28 26.901333 80.64 35.861333 4.48 0 22.4-26.901333 22.4-31.381333 13.44-13.44 22.4-31.36 35.84-40.32 8.96-4.48 17.92-8.96 26.88-17.941333 8.96-8.96 13.44-26.88 17.92-40.32 4.48-8.938667 8.96-26.858667 4.48-40.298667M516.48 305.92c4.48 0 8.96-4.48 17.92-8.96 13.44-8.96 26.901333-22.4 40.32-31.36 13.461333-8.96 26.901333-22.4 35.861333-31.36 13.44-8.96 22.4-26.88 26.88-40.341333 4.48-8.96 17.941333-26.88 13.44-40.32-4.48-8.96-26.88-13.44-35.84-17.92C579.2 126.698667 547.84 122.24 512 122.24c-13.44 0-31.36 4.458667-35.84 17.92-4.48 22.4 13.44 17.92 31.36 22.4 0 0 4.48 35.84 4.48 40.32 4.48 22.421333-8.96 35.84-8.96 58.24 0 13.44 0 35.84 8.96 44.8h4.48zM892.8 619.52c4.501333-8.96 4.501333-22.4 8.96-31.36 4.501333-22.421333 4.501333-44.8 4.501333-67.2 0-44.8-4.501333-89.578667-17.92-129.92-8.96-13.44-13.461333-26.88-17.941333-40.341333-8.96-22.378667-22.4-44.8-40.32-62.698667-17.92-22.4-40.341333-85.12-80.64-67.2-13.44 4.501333-22.4 22.421333-31.36 31.381333l-26.88 40.32c-4.501333 4.48-8.96 13.44-4.501333 17.92 0 4.48 4.501333 4.48 8.96 4.48 8.96 4.501333 13.461333 4.501333 22.421333 8.96 4.48 0 8.96 4.501333 4.48 8.96 0 0 0 4.501333-4.48 4.501334-22.421333 22.4-44.8 40.32-67.2 62.698666-4.48 4.48-8.96 13.44-8.96 17.92s4.48 4.48 4.48 8.96c0 4.501333-4.48 4.501333-8.96 8.96-8.96 4.501333-17.92 8.96-22.4 13.461334-4.48 8.96 0 22.4-4.48 31.36-4.48 22.4-17.941333 40.32-26.901333 62.72-8.96 13.418667-13.418667 26.88-22.378667 40.32 0 17.92-4.501333 31.36 4.458667 44.8 22.421333 31.36 62.72 13.44 94.08 26.901333 8.96 4.458667 17.92 4.458667 22.421333 13.418667 13.418667 13.461333 13.418667 35.861333 17.92 49.301333 4.458667 17.92 8.96 35.84 17.92 53.76 4.48 22.421333 13.44 44.821333 17.92 62.72 40.341333-31.36 76.16-67.178667 103.04-112 26.88-31.424 40.341333-67.242667 53.76-103.104" fill="#CDDC39"></path></svg>
{{- with $cardIcon -}}
{{- if (strings.HasPrefix . "fa") -}}
<i class="{{ . }} cl-shortcut-icon"></i>
{{- else -}}
<img src="{{ . }}" alt="card image" class="cl-shortcut-image">
{{- end -}}
{{- else -}}
<svg class="cl-shortcut-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="64" height="64"><path d="M960 512c0 249.408-203.2 448-448 448-244.778667 0-448-198.592-448-448S262.592 64 512 64s448 198.592 448 448" fill="#2196F3"></path><path d="M507.52 718.08c0-8.96-4.48-13.44-13.44-17.92-26.88-8.96-53.76-8.96-76.16-31.381333-4.48-8.96-4.48-17.92-8.96-26.88-8.96-8.96-31.36-13.44-44.8-17.92h-89.6c-13.44-4.48-22.4-22.4-31.36-35.84 0-4.48 0-13.461333-8.96-13.461334-8.96-4.458667-17.92 4.501333-26.88 0-4.48-4.458667-4.48-8.96-4.48-13.418666 0-13.461333 8.96-26.901333 17.92-35.861334 13.44-8.96 26.88 4.48 40.32 4.48 4.48 0 4.48 0 8.96 4.48 13.44 4.48 17.92 22.4 17.92 35.861334v8.96c0 4.48 4.48 4.48 8.96 4.48 4.48-22.4 4.48-44.821333 8.96-67.2 0-26.88 26.88-53.781333 49.28-62.72 8.96-4.458667 13.44 4.501333 22.4 0 26.88-8.96 94.08-35.84 80.64-71.658667-8.96-31.381333-35.84-62.698667-71.68-58.24-8.96 4.501333-13.44 8.96-22.4 13.461333-13.44 8.96-40.32 35.84-53.76 35.84-22.4-4.48-22.4-35.84-17.92-49.301333 4.48-17.92 44.8-76.138667 71.68-67.178667l17.92 17.92c8.96 4.48 22.4 4.48 35.84 4.48 4.48 0 8.96 0 13.44-4.48 4.48-4.48 4.48-4.48 4.48-8.96 0-13.44-13.44-26.901333-22.4-35.861333s-22.4-17.92-35.84-22.378667c-44.8-13.461333-116.48 4.458667-152.32 35.84-35.84 31.36-62.72 85.12-80.64 129.92-8.96 26.88-17.92 62.698667-22.4 94.08-4.48 22.4-8.96 40.32 4.48 62.698667 13.44 26.88 40.32 53.781333 67.2 71.68 17.92 13.44 53.76 13.44 71.68 35.84 13.44 17.941333 8.96 40.32 8.96 62.72 0 26.88 17.92 49.28 26.88 71.658667 4.48 13.461333 8.96 31.381333 13.44 44.821333 0 4.48 4.48 31.36 4.48 35.84 26.88 13.44 49.28 26.901333 80.64 35.861333 4.48 0 22.4-26.901333 22.4-31.381333 13.44-13.44 22.4-31.36 35.84-40.32 8.96-4.48 17.92-8.96 26.88-17.941333 8.96-8.96 13.44-26.88 17.92-40.32 4.48-8.938667 8.96-26.858667 4.48-40.298667M516.48 305.92c4.48 0 8.96-4.48 17.92-8.96 13.44-8.96 26.901333-22.4 40.32-31.36 13.461333-8.96 26.901333-22.4 35.861333-31.36 13.44-8.96 22.4-26.88 26.88-40.341333 4.48-8.96 17.941333-26.88 13.44-40.32-4.48-8.96-26.88-13.44-35.84-17.92C579.2 126.698667 547.84 122.24 512 122.24c-13.44 0-31.36 4.458667-35.84 17.92-4.48 22.4 13.44 17.92 31.36 22.4 0 0 4.48 35.84 4.48 40.32 4.48 22.421333-8.96 35.84-8.96 58.24 0 13.44 0 35.84 8.96 44.8h4.48zM892.8 619.52c4.501333-8.96 4.501333-22.4 8.96-31.36 4.501333-22.421333 4.501333-44.8 4.501333-67.2 0-44.8-4.501333-89.578667-17.92-129.92-8.96-13.44-13.461333-26.88-17.941333-40.341333-8.96-22.378667-22.4-44.8-40.32-62.698667-17.92-22.4-40.341333-85.12-80.64-67.2-13.44 4.501333-22.4 22.421333-31.36 31.381333l-26.88 40.32c-4.501333 4.48-8.96 13.44-4.501333 17.92 0 4.48 4.501333 4.48 8.96 4.48 8.96 4.501333 13.461333 4.501333 22.421333 8.96 4.48 0 8.96 4.501333 4.48 8.96 0 0 0 4.501333-4.48 4.501334-22.421333 22.4-44.8 40.32-67.2 62.698666-4.48 4.48-8.96 13.44-8.96 17.92s4.48 4.48 4.48 8.96c0 4.501333-4.48 4.501333-8.96 8.96-8.96 4.501333-17.92 8.96-22.4 13.461334-4.48 8.96 0 22.4-4.48 31.36-4.48 22.4-17.941333 40.32-26.901333 62.72-8.96 13.418667-13.418667 26.88-22.378667 40.32 0 17.92-4.501333 31.36 4.458667 44.8 22.421333 31.36 62.72 13.44 94.08 26.901333 8.96 4.458667 17.92 4.458667 22.421333 13.418667 13.418667 13.461333 13.418667 35.861333 17.92 49.301333 4.458667 17.92 8.96 35.84 17.92 53.76 4.48 22.421333 13.44 44.821333 17.92 62.72 40.341333-31.36 76.16-67.178667 103.04-112 26.88-31.424 40.341333-67.242667 53.76-103.104" fill="#CDDC39"></path></svg>
{{- end -}}
{{- end -}}
</span>
{{- end -}}
+4 -1
View File
@@ -6,7 +6,10 @@
<div class="post-reward">
<div class="comment">{{ $reward.comment }}</div>
<input type="checkbox" class="reward-input" name="reward" id="{{ $id }}" hidden />
<label class="reward-button" for="{{ $id }}">{{ T "single.reward.donate" }}</label>
<label class="reward-button" for="{{ $id }}">
{{- dict "Class" "fa-solid fa-qrcode fa-fw" | partial "plugin/icon.html" -}}
{{- T "single.reward.donate" -}}
</label>
<div class="reward-ways"{{ with $reward.mode }} data-mode="{{ . }}"{{ end }}>
{{- range $way, $image := $reward.ways -}}
{{- with T (printf "single.reward.%v" $way) -}}{{ $way = . }}{{- end -}}
+21 -20
View File
@@ -1,9 +1,10 @@
{{- $share := (partial "function/params.html").share | default dict -}}
{{- if $share.enable -}}
{{- $title := title .Title -}}
{{- /* 001: Twitter */ -}}
{{- if $share.Twitter -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Twitter" data-sharer="twitter" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.tags }} data-hashtags="{{ delimit . `,` }}"{{ end }}>
<a href="javascript:void(0);" title="{{ T `shareOn` }} Twitter" data-sharer="twitter" data-url="{{ .Permalink }}" data-title="{{ $title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.tags }} data-hashtags="{{ delimit . `,` }}"{{ end }}>
{{- dict "Class" "fa-brands fa-twitter fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
@@ -24,14 +25,14 @@
{{- /* 004: WhatsApp */ -}}
{{- if $share.Whatsapp -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} WhatsApp" data-sharer="whatsapp" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-web>
<a href="javascript:void(0);" title="{{ T `shareOn` }} WhatsApp" data-sharer="whatsapp" data-url="{{ .Permalink }}" data-title="{{ $title }}" data-web>
{{- dict "Class" "fa-brands fa-whatsapp fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 005: Viber */ -}}
{{- if $share.Viber -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Viber" data-sharer="viber" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Viber" data-sharer="viber" data-url="{{ .Permalink }}" data-title="{{ $title }}">
{{- dict "Class" "fa-brands fa-viber fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
@@ -45,14 +46,14 @@
{{- /* 007: Tumblr */ -}}
{{- if $share.Tumblr -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Tumblr" data-sharer="tumblr" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.tags }} data-tags="{{ delimit . `,` }}"{{ end }}>
<a href="javascript:void(0);" title="{{ T `shareOn` }} Tumblr" data-sharer="tumblr" data-url="{{ .Permalink }}" data-title="{{ $title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.tags }} data-tags="{{ delimit . `,` }}"{{ end }}>
{{- dict "Class" "fa-brands fa-tumblr fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 008: Hacker News */ -}}
{{- if $share.Hackernews -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Hacker News" data-sharer="hackernews" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Hacker News" data-sharer="hackernews" data-url="{{ .Permalink }}" data-title="{{ $title }}">
{{- dict "Class" "fa-brands fa-hacker-news fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
@@ -66,35 +67,35 @@
{{- /* 010: VK */ -}}
{{- if $share.VK -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} VK" data-sharer="vk" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}>
<a href="javascript:void(0);" title="{{ T `shareOn` }} VK" data-sharer="vk" data-url="{{ .Permalink }}" data-title="{{ $title }}"{{ with .Description }} data-caption="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}>
{{- dict "Class" "fa-brands fa-vk fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 011: Buffer */ -}}
{{- if $share.Buffer -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Buffer" data-sharer="buffer" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-picture="{{ . }}"{{ end }}>
<a href="javascript:void(0);" title="{{ T `shareOn` }} Buffer" data-sharer="buffer" data-url="{{ .Permalink }}" data-title="{{ $title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.featuredImage }} data-picture="{{ . }}"{{ end }}>
{{- dict "Class" "fa-brands fa-buffer fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 012: Xing */ -}}
{{- if $share.Xing -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Xing" data-sharer="xing" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Xing" data-sharer="xing" data-url="{{ .Permalink }}" data-title="{{ $title }}">
{{- dict "Class" "fa-brands fa-xing fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 013: Line */ -}}
{{- if $share.Line -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Line" data-sharer="line" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Line" data-sharer="line" data-url="{{ .Permalink }}" data-title="{{ $title }}">
{{- dict "Simpleicons" "line" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 014: Instapaper */ -}}
{{- if $share.Instapaper -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Instapaper" data-sharer="instapaper" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Instapaper" data-sharer="instapaper" data-url="{{ .Permalink }}" data-title="{{ $title }}" data-description="{{ .Description }}">
{{- dict "Simpleicons" "instapaper" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
</a>
{{ end -}}
@@ -114,14 +115,14 @@
{{- /* 018: Flipboard */ -}}
{{- if $share.Flipboard -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Flipboard" data-sharer="flipboard" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Flipboard" data-sharer="flipboard" data-url="{{ .Permalink }}" data-title="{{ $title }}">
{{- dict "Class" "fa-brands fa-flipboard fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 019: 微博 */ -}}
{{- if $share.Weibo -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} 微博" data-sharer="weibo" data-url="{{ .Permalink }}" data-title="{{ .Title }}"{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}{{ with .Site.Params.Social.Weibo }} data-ralateuid="{{ . }}"{{ end }}>
<a href="javascript:void(0);" title="{{ T `shareOn` }} 微博" data-sharer="weibo" data-url="{{ .Permalink }}" data-title="{{ $title }}"{{ with .Params.featuredImage }} data-image="{{ . }}"{{ end }}{{ with .Site.Params.Social.Weibo }} data-ralateuid="{{ . }}"{{ end }}>
{{- dict "Class" "fa-brands fa-weibo fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
@@ -131,56 +132,56 @@
{{- /* 021: Myspace */ -}}
{{- if $share.Myspace -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Myspace" data-sharer="myspace" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Myspace" data-sharer="myspace" data-url="{{ .Permalink }}" data-title="{{ $title }}" data-description="{{ .Description }}">
{{- dict "Simpleicons" "myspace" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 022: Blogger */ -}}
{{- if $share.Blogger -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Blogger" data-sharer="blogger" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Blogger" data-sharer="blogger" data-url="{{ .Permalink }}" data-title="{{ $title }}" data-description="{{ .Description }}">
{{- dict "Class" "fa-brands fa-blogger fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 023: 百度 */ -}}
{{- if $share.Baidu -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} 百度" data-sharer="baidu" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} 百度" data-sharer="baidu" data-url="{{ .Permalink }}" data-title="{{ $title }}">
{{- dict "Simpleicons" "baidu" "Prefix" (.Scratch.Get "cdn" | default dict).simpleIconsPrefix | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 024: OK.RU */ -}}
{{- if $share.Odnoklassniki -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} OK.RU" data-sharer="okru" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} OK.RU" data-sharer="okru" data-url="{{ .Permalink }}" data-title="{{ $title }}">
{{- dict "Class" "fa-brands fa-odnoklassniki fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 025: Evernote */ -}}
{{- if $share.Evernote -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Evernote" data-sharer="evernote" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Evernote" data-sharer="evernote" data-url="{{ .Permalink }}" data-title="{{ $title }}">
{{- dict "Class" "fa-brands fa-evernote fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 026: Skype */ -}}
{{- if $share.Skype -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Skype" data-sharer="skype" data-url="{{ .Permalink }}" data-title="{{ .Title }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Skype" data-sharer="skype" data-url="{{ .Permalink }}" data-title="{{ $title }}">
{{- dict "Class" "fa-brands fa-skype fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 027: Trello */ -}}
{{- if $share.Trello -}}
<a href="javascript:void(0);" title="{{ T `shareOn` }} Trello" data-sharer="trello" data-url="{{ .Permalink }}" data-title="{{ .Title }}" data-description="{{ .Description }}">
<a href="javascript:void(0);" title="{{ T `shareOn` }} Trello" data-sharer="trello" data-url="{{ .Permalink }}" data-title="{{ $title }}" data-description="{{ .Description }}">
{{- dict "Class" "fa-brands fa-trello fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
{{- /* 028: Mix */ -}}
{{- if $share.Mix -}}
<a href="//mix.com/add?url={{ .Permalink }}&amp;description={{ .Title }}" target="_blank" title="{{ T `shareOn` }} Mix">
<a href="//mix.com/add?url={{ .Permalink }}&amp;description={{ $title }}" target="_blank" title="{{ T `shareOn` }} Mix">
{{- dict "Class" "fa-brands fa-mix fa-fw" | partial "plugin/icon.html" -}}
</a>
{{ end -}}
+1 -1
View File
@@ -22,7 +22,7 @@
{{- if eq $repost.enable true -}}
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- .LinkTitle -}}
{{- title .LinkTitle -}}
</a>
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Lastmod.Format }}'>
{{- with .Lastmod | dateFormat (.Site.Params.section.dateformat | default "01-02") -}}
+5 -4
View File
@@ -19,17 +19,18 @@
<nav>
<ul class="collection-list">
{{- range $key, $value := $pages -}}
{{- $title := title $value.LinkTitle -}}
{{- if $value.LinkTitle | eq $.LinkTitle -}}
{{- $currentKey = $key -}}
<li class="collection-item"><span class="active" title="{{ $value.LinkTitle }}">{{ $value.LinkTitle }}</span></li>
<li class="collection-item"><span class="active" title="{{ $title }}">{{ $title }}</span></li>
{{- else }}
<li class="collection-item"><a href="{{ $value.RelPermalink }}" title="{{ $value.LinkTitle }}">{{ $value.LinkTitle }}</a></li>
<li class="collection-item"><a href="{{ $value.RelPermalink }}" title="{{ $title }}">{{ $title }}</a></li>
{{- end }}
{{- end -}}
</ul>
<div class="collection-nav-simple">
{{- with $pages.Next $ -}}
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="prev" title="{{ .LinkTitle }}">
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="prev" title="{{ title .LinkTitle }}">
{{- dict "Class" "fa-solid fa-angle-left fa-fw" | partial "plugin/icon.html" -}}
</a>
{{- else -}}
@@ -37,7 +38,7 @@
{{- end -}}
<span class="text-secondary">{{ add $currentKey 1 }}/{{ $pages.Len }}</span>
{{- with $pages.Prev $ -}}
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="next" title="{{ .LinkTitle }}">
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="next" title="{{ title .LinkTitle }}">
{{- dict "Class" "fa-solid fa-angle-right fa-fw" | partial "plugin/icon.html" -}}
</a>
{{- else -}}
+4 -4
View File
@@ -17,14 +17,14 @@
<div class="collection-nav">
{{- $pages := (where .Pages "Params.Weight" "!=" nil) | append (where .Pages "Params.Weight" "eq" nil).ByDate -}}
{{- with $pages.Next $ -}}
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="prev" title="{{ .LinkTitle }}">
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="prev" title="{{ title .LinkTitle }}">
{{- dict "Class" "fa-solid fa-angle-left fa-fw" | partial "plugin/icon.html" -}}
<span>{{- .LinkTitle -}}</span>
<span>{{- title .LinkTitle -}}</span>
</a>
{{- end -}}
{{- with $pages.Prev $ -}}
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="next" title="{{ .LinkTitle }}">
<span>{{- .LinkTitle -}}</span>
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="next" title="{{ title .LinkTitle }}">
<span>{{- title .LinkTitle -}}</span>
{{- dict "Class" "fa-solid fa-angle-right fa-fw" | partial "plugin/icon.html" -}}
</a>
{{- end -}}
+3 -2
View File
@@ -299,11 +299,12 @@
{{- $giscus := $comment.giscus | default dict -}}
{{- if $giscus.enable -}}
{{- with $giscus -}}
{{- $commentConfig = .origin | default "https://giscus.app" | dict "origin" | dict "giscus" | merge $commentConfig -}}
{{- $commentConfig = .lightTheme | default "light" | dict "lightTheme" | dict "giscus" | merge $commentConfig -}}
{{- $commentConfig = .darkTheme | default "dark" | dict "darkTheme" | dict "giscus" | merge $commentConfig -}}
<div id="giscus" class="comment">
<script
src="https://giscus.app/client.js"
src="{{ .Origin }}/client.js"
data-repo="{{ .Repo }}"
data-repo-id="{{ .RepoId }}"
data-category="{{ .Category }}"
@@ -315,7 +316,7 @@
data-reactions-enabled="{{ .ReactionsEnabled }}"
data-emit-metadata="{{ .EmitMetadata }}"
data-input-position="{{ .InputPosition }}"
data-lang="{{ $.Site.LanguageCode }}"
data-lang="{{ .lang | default $.Site.LanguageCode }}"
{{ if ne .LazyLoad false }}data-loading="lazy"{{ end }}
crossorigin="anonymous"
async
+4 -4
View File
@@ -106,14 +106,14 @@
{{- $next = $pages.Prev . -}}
{{- end -}}
{{- with $prev -}}
<a href="{{ .RelPermalink }}" class="post-nav-item" rel="prev" title="{{ .LinkTitle }}">
<a href="{{ .RelPermalink }}" class="post-nav-item" rel="prev" title="{{ title .LinkTitle }}">
{{- dict "Class" "fa-solid fa-angle-left fa-fw" | partial "plugin/icon.html" -}}
{{- .LinkTitle -}}
{{- title .LinkTitle -}}
</a>
{{- end -}}
{{ with $next }}
<a href="{{ .RelPermalink }}" class="post-nav-item" rel="next" title="{{ .LinkTitle }}">
{{- .LinkTitle -}}
<a href="{{ .RelPermalink }}" class="post-nav-item" rel="next" title="{{ title .LinkTitle }}">
{{- title .LinkTitle -}}
{{- dict "Class" "fa-solid fa-angle-right fa-fw" | partial "plugin/icon.html" -}}
</a>
{{- end -}}
+1 -1
View File
@@ -35,7 +35,7 @@
{{- $content := $author.name | default "Anonymous" -}}
{{- $icon := dict "Class" "fa-solid fa-user-circle" -}}
{{- if $author.avatar | and $params.authorAvatar -}}
{{- $content = printf "%v&nbsp;%v" (dict "Src" $author.avatar "Class" "avatar" "Alt" $content | 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 -}}
+3 -1
View File
@@ -11,11 +11,13 @@
{{- end -}}
{{- $related := $posts.Related . | first ($params.related.count | default 5) -}}
{{- with $related -}}
<hr class="awesome-hr" />
<h2 id="see-also">{{ T "single.relatedContent" }}</h2>
<ul>
{{- range $i, $p := . -}}
{{- $title := title .LinkTitle -}}
<li>
<a href="{{ .RelPermalink }}" title="{{ .LinkTitle }}">{{ .LinkTitle }}</a>
<a href="{{ .RelPermalink }}" title="{{ $title }}">{{ $title }}</a>
{{- with .HeadingsFiltered -}}
<ul>
{{- range . -}}
+7 -3
View File
@@ -23,7 +23,7 @@
{{- $githubCorner := .Site.Params.githubCorner -}}
{{- if $githubCorner.enable -}}
{{- with $githubCorner -}}
{{- $githubImage := `<svg viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg>` -}}
{{- $githubImage := `<svg viewBox="0 0 250 250" aria-hidden="true" width="56" height="56"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg>` -}}
{{- $options := dict "Destination" .Permalink "Title" .Title "Content" $githubImage "Class" (cond (eq .Position "left") "left" "right" | printf "github-corner %v d-none-mobile") "Noreferrer" false -}}
{{- partial "plugin/link.html" $options -}}
{{- end -}}
@@ -49,11 +49,15 @@
{{- if .Dark -}}
{{- $style = printf "%v--bg-progress-dark: %v;" $style .Dark -}}
{{- end -}}
<div class="reading-progress-bar" {{ printf "style=\"%v\"" $style | safeHTMLAttr }}></div>
<div class="reading-progress-bar" {{ printf `style="%v"` $style | safeHTMLAttr }}></div>
{{- end -}}
{{- end -}}
{{- /* Custom widgets */ -}}
{{- block "custom-widgets" . }}{{ end -}}
<noscript>
<div class="noscript-warning">{{ T "baseof.noscript" }}</div>
</noscript>
</div>
</div>
{{- /* EOF */ -}}
+2 -2
View File
@@ -1,14 +1,14 @@
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
{{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) -}}
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
</title>
<link>
{{- .Permalink -}}
</link>
<description>
{{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} | {{ .Site.Title -}}
{{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) }} | {{ .Site.Title -}}
</description>
<generator>Hugo -- gohugo.io</generator>
{{- with .Site.LanguageCode -}}
+21 -16
View File
@@ -1,9 +1,10 @@
{{- define "title" -}}
{{- .Title -}}
{{- title .Title -}}
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
{{- end -}}
{{- define "content" -}}
{{- $title := title .Title -}}
{{- $params := partial "function/params.html" -}}
{{- $toc := .Scratch.Get "toc" -}}
{{- $tocEmpty := eq .TableOfContents `<nav id="TableOfContents"></nav>` -}}
@@ -11,8 +12,12 @@
<aside class="aside-collection animate__animated animate__fadeIn animate__faster" aria-label="{{ T "collections" }}">
{{- /* Collection List */ -}}
{{- partial "single/collection-list.html" . -}}
{{- /* Custom part for aside */ -}}
{{- /* TODO remove Custom part for aside */ -}}
{{- partial (.Scratch.Get "customFilePath").aside . -}}
{{- /* Custom Aside */ -}}
{{- block "custom-aside" . }}{{ end -}}
</aside>
<article class="page single">
@@ -23,15 +28,15 @@
{{- with $repost -}}
{{- if eq .Enable true -}}
{{- $icon := dict "Class" "fa-solid fa-share fa-fw" -}}
{{- $title := cond (hasPrefix .Url "http") (printf "%v -> %v" (T "single.repost") .Url ) (T "single.repost") -}}
{{- $iconTitle := cond (hasPrefix .Url "http") (printf "%v -> %v" (T "single.repost") .Url ) (T "single.repost") -}}
{{- if hasPrefix .Url "http" -}}
{{ dict "Destination" .Url "Icon" $icon "Class" "icon-repost" "Title" $title | partial "plugin/link.html" -}}
{{ dict "Destination" .Url "Icon" $icon "Class" "icon-repost" "Title" $iconTitle | partial "plugin/link.html" -}}
{{- else -}}
<span title="{{ $title }}" class="icon-repost">{{- $icon | partial "plugin/icon.html" -}}</span>
<span title="{{ $iconTitle }}" class="icon-repost">{{- $icon | partial "plugin/icon.html" -}}</span>
{{- end -}}
{{- end -}}
{{- end -}}
<span>{{- .Title -}}</span>
<span>{{ $title }}</span>
</h1>
{{- /* Subtitle */ -}}
@@ -87,47 +92,47 @@
{{- /* Visitor Count */ -}}
{{- if $comment.enable -}}
{{- if $comment.artalk.enable -}}
<span class="comment-visitors" data-flag-title="{{ .Title }}">
<span class="comment-visitors" data-flag-title="{{ $title }}">
{{ $visitorIcon }}<span class="artalk-visitor-count" data-page-key="{{ .RelPermalink }}">-</span>&nbsp;{{ T "single.views" }}
</span>&nbsp;
{{- else if ($comment.valine.enable | and $comment.valine.visitor) -}}
<span id="{{ .RelPermalink }}" class="leancloud_visitors comment-visitors" data-flag-title="{{ .Title }}">
<span id="{{ .RelPermalink }}" class="leancloud_visitors comment-visitors" data-flag-title="{{ $title }}">
{{ $visitorIcon }}<span class="leancloud-visitors-count">-</span>&nbsp;{{ T "single.views" }}
</span>&nbsp;
{{- else if $comment.waline.enable | and $comment.waline.pageview -}}
<span class="comment-visitors" data-flag-title="{{ .Title }}">
<span class="comment-visitors" data-flag-title="{{ $title }}">
{{ $visitorIcon }}<span data-path="{{ .RelPermalink }}" class="waline-pageview-count">-</span>&nbsp;{{ T "single.views" }}
</span>&nbsp;
{{- else if $comment.twikoo.enable | and $comment.twikoo.visitor -}}
<span id="{{ .RelPermalink }}" class="comment-visitors" data-flag-title="{{ .Title }}">
<span id="{{ .RelPermalink }}" class="comment-visitors" data-flag-title="{{ $title }}">
{{ $visitorIcon }}<span id="twikoo_visitors">-</span>&nbsp;{{ T "single.views" }}
</span>&nbsp;
{{- else if .Site.Params.ibruce.enable | and .Site.Params.ibruce.enablePost -}}
<span id="busuanzi_container_page_pv" class="busuanzi_visitors comment-visitors" data-flag-title="{{ .Title }}">
<span id="busuanzi_container_page_pv" class="busuanzi_visitors comment-visitors" data-flag-title="{{ $title }}">
{{ $visitorIcon }}<span id="busuanzi_value_page_pv">-</span>&nbsp;{{ T "single.views" }}
</span>&nbsp;
{{- end -}}
{{- else if .Site.Params.ibruce.enable | and .Site.Params.ibruce.enablePost -}}
<span id="busuanzi_container_page_pv" class="busuanzi_visitors comment-visitors" data-flag-title="{{ .Title }}">
<span id="busuanzi_container_page_pv" class="busuanzi_visitors comment-visitors" data-flag-title="{{ $title }}">
{{ $visitorIcon }}<span id="busuanzi_value_page_pv">-</span>&nbsp;{{ T "single.views" }}
</span>&nbsp;
{{- end -}}
{{- /* Comment Count */ -}}
{{- if $comment.enable -}}
{{- if $comment.artalk.enable -}}
<span class="comment-count" data-flag-title="{{ .Title }}">
<span class="comment-count" data-flag-title="{{ $title }}">
{{ $commentIcon }}<span class="artalk-comment-count" data-page-key="{{ .RelPermalink }}">-</span>&nbsp;{{ T "single.comments" }}
</span>&nbsp;
{{- else if $comment.valine.enable | and $comment.valine.commentCount -}}
<span class="comment-count" data-flag-title="{{ .Title }}">
<span class="comment-count" data-flag-title="{{ $title }}">
{{ $commentIcon }}<span data-xid="{{ .RelPermalink }}" class="valine-comment-count">-</span>&nbsp;{{ T "single.comments" }}
</span>&nbsp;
{{- else if $comment.waline.enable | and $comment.waline.comment -}}
<span class="comment-count" data-flag-title="{{ .Title }}">
<span class="comment-count" data-flag-title="{{ $title }}">
{{ $commentIcon }}<span data-path="{{ .RelPermalink }}" class="waline-comment-count">-</span>&nbsp;{{ T "single.comments" }}
</span>&nbsp;
{{- else if $comment.twikoo.enable | and $comment.twikoo.commentCount -}}
<span id="{{ .RelPermalink }}" class="comment-count" data-flag-title="{{ .Title }}">
<span id="{{ .RelPermalink }}" class="comment-count" data-flag-title="{{ $title }}">
{{ $commentIcon }}<span id="twikoo-comment-count">-</span>&nbsp;{{ T "single.comments" }}
</span>&nbsp;
{{- end -}}
+7
View File
@@ -0,0 +1,7 @@
{{- /* reference https://developer.open-douyin.com/docs/resource/zh-CN/dop/develop/openapi/video-management/douyin/iframe-player/get-iframe-by-video */ -}}
{{- $id := cond .IsNamedParams (.Get "id") (.Get 0) -}}
<div class="douyin">
<iframe src="//open.douyin.com/player/video?vid={{ $id }}&autoplay=0" border="0" framespacing="0" allowfullscreen="true"></iframe>
</div>
{{- /* EOF */ -}}
+2
View File
@@ -10,11 +10,13 @@
{{- $options = dict "Rel" (.Get "rel") | merge $options -}}
{{- $options = dict "Download" (.Get "download") | merge $options -}}
{{- $options = dict "Card" (.Get "card") | merge $options -}}
{{- $options = dict "CardIcon" (.Get "card-icon") | merge $options -}}
{{- $options = dict "Noreferrer" (.Get "noreferrer") | merge $options -}}
{{- else -}}
{{- $options = dict "Content" (.Get 1 | default (.Get 0)) | merge $options -}}
{{- $options = dict "Title" (.Get 2) | merge $options -}}
{{- $options = dict "Card" (.Get 3) | merge $options -}}
{{- $options = dict "CardIcon" (.Get 4) | merge $options -}}
{{- end -}}
{{- $options = dict "ExternalIcon" (.Get "external-icon" | default .Site.Params.externalIcon) | merge $options -}}
{{- partial "plugin/link.html" $options -}}
+1 -1
View File
@@ -46,7 +46,7 @@
{{- if eq $repost.enable true -}}
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- .LinkTitle -}}
{{- title .LinkTitle -}}
</a>
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Date.Format }}'>
{{- .Date | dateFormat ($.Site.Params.list.dateFormat | default "01-02") -}}
+1 -1
View File
@@ -20,7 +20,7 @@
{{- if eq $repost.enable true -}}
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- .LinkTitle -}}
{{- title .LinkTitle -}}
</a>
</article>
{{- end -}}
+1 -1
View File
@@ -20,7 +20,7 @@
{{- if eq $repost.enable true -}}
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- .LinkTitle -}}
{{- title .LinkTitle -}}
</a>
</article>
{{- end -}}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "fixit-src",
"version": "0.3.3",
"version": "0.3.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "fixit-src",
"version": "0.3.3",
"version": "0.3.7",
"license": "MIT",
"devDependencies": {
"auto-changelog": "^2.4.0"
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "fixit-src",
"version": "0.3.3",
"version": "0.3.7",
"private": true,
"description": "FixIt theme source files",
"keywords": [
@@ -19,12 +19,12 @@
"license": "MIT",
"author": "Lruihao (https://lruihao.cn)",
"scripts": {
"build": "hugo --source=demo --themesDir ../.. --theme $PWD --gc --minify --logLevel info",
"server": "hugo server --source=demo --themesDir ../.. --theme $PWD -D --disableFastRender --navigateToChanged --ignoreCache --bind 0.0.0.0",
"build": "hugo --source=demo --themesDir ../.. --theme $PWD --gc --minify --logLevel info",
"server": "hugo server --source=demo --themesDir ../.. --theme $PWD -D --disableFastRender --navigateToChanged --ignoreCache",
"server:production": "npm run server -- -e production",
"server:docs": "hugo server --source=../fixit-docs -D --disableFastRender --navigateToChanged --ignoreCache --bind 0.0.0.0",
"server:docs": "hugo server --source=../fixit-docs -D --disableFastRender --navigateToChanged --ignoreCache",
"version": "sed -i '' \"s/v$npm_package_version-RC/v$npm_package_version/g\" layouts/partials/init/index.html && git add .",
"postversion": "git push && git push --tags",
"postversion": "git push && git push --tags && npm run release",
"release": "auto-changelog --config .auto-changelog/config.json"
},
"devDependencies": {
+1 -1
View File
@@ -7,7 +7,7 @@ licenselink = "https://github.com/hugo-fixit/FixIt/blob/master/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.112.0"
min_version = "0.123.0"
tags = [
"blog",