Compare commits

...

15 Commits

Author SHA1 Message Date
Cell 12b7c65f80 chore(release): 0.4.1 2026-01-06 16:27:34 +08:00
Cell 4514affb78 fix(image): support avif format in image processing logic (#682) 2026-01-06 16:21:37 +08:00
Cell 6986044dbc chore: update release workflow to install fixit-cli and handle config files separately 2026-01-06 15:35:32 +08:00
Cell fb300f2b16 fix(code): code highlighting not styled for typeit shortcode (#681) 2026-01-05 14:58:52 +08:00
Cell 43ecb1bdd0 chore(dev): update recommended VSCode extensions for Hugo development 2026-01-05 14:18:26 +08:00
Cell dda0d1e3f5 docs(security): simplify supported versions section for clarity 2026-01-04 16:03:23 +08:00
Cell 4a3df3cbdb chore(release): 0.4.0 2026-01-04 15:30:37 +08:00
Cell 31e5b99f1f chore: update version and changelog scripts in package.json 2026-01-04 15:30:12 +08:00
Cell 296e86ad56 style(i): markdown lint 2026-01-04 15:19:09 +08:00
Cell 572382b5ad fix(i): remove debug 2026-01-04 14:27:12 +08:00
Cell 84c1358ecb fix(code): adjust max-width of code block titles for better layout 2026-01-04 14:22:31 +08:00
Cell a79213969f feat: add option to show last modified time in post layout (#678) 2026-01-04 12:45:49 +08:00
Cell 2c2b25d8fc refactor: move the expiration reminder outside the content (#677) 2026-01-04 11:38:36 +08:00
Cell 5b8ea64d77 docs(archetypes): update markdown syntax and remove uncommon front matter in templates (#676) 2026-01-04 11:22:38 +08:00
Cell d637c8b22f fix(img): remove lazy loading background style from img
Transparent images cannot cover loading images
2026-01-03 20:56:37 +08:00
21 changed files with 93 additions and 81 deletions
+10 -4
View File
@@ -22,11 +22,16 @@ jobs:
node-version-file: .nvmrc
cache: pnpm
- name: Install fixit-cli
run: pnpm install -g fixit-cli
- name: Split theme configuration
run: |
pnpx fixit-cli split hugo.toml
tar -zcvf config.tar.gz config
tree config
fixit split
tar -zcvf config_toml.tar.gz config
rm -rf config
fixit split -y
tar -zcvf config_yaml.tar.gz config
rm -rf config
- name: Generate release notes
run: |
@@ -40,4 +45,5 @@ jobs:
draft: true
body_path: CHANGELOG.md
files: |
config.tar.gz
config_toml.tar.gz
config_yaml.tar.gz
+2 -1
View File
@@ -2,6 +2,7 @@
"recommendations": [
"budparr.language-hugo-vscode",
"kaellarkin.hugo-shortcode-syntax",
"eliostruyf.vscode-hugo-themer"
"lruihao.hugo-partials-refs",
"tamasfe.even-better-toml"
]
}
+10 -10
View File
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
+7 -14
View File
@@ -2,21 +2,14 @@
## Supported Versions
We actively maintain and provide security updates for the following versions:
Only the latest version receives active maintenance and security updates:
### Current Versions
| Version | Hugo Version | Supported | Status |
| :-----: | :---------------: | :----------------: | :------------: |
| 0.4.x | >= 0.147.7 | :white_check_mark: | Latest (Alpha) |
| 0.3.x | 0.112.0 ~ 0.146.0 | :white_check_mark: | Stable |
### Legacy and Transitional Versions
| Version | Hugo Version | LoveIt Compatibility | Supported |
| :-----: | :--------------: | :------------------: | :-------: |
| 0.1.x | Unknown | :white_check_mark: | :x: |
| 0.2.x | 0.62.0 ~ 0.110.0 | :white_check_mark: | :x: |
| Version | Hugo Version | LoveIt Compat | Supported |
| :-----: | :---------------: | :----------------: | :----------------: |
| 0.4.x | >= 0.147.7 | N/A | :white_check_mark: |
| 0.3.x | 0.112.0 ~ 0.146.0 | N/A | :x: |
| 0.2.x | 0.62.0 ~ 0.110.0 | :white_check_mark: | :x: |
| 0.1.x | Unknown | :white_check_mark: | :x: |
## Security Considerations
+9 -1
View File
@@ -150,7 +150,7 @@ function add(a, b) {
## Code block inside other blocks
> [!NOTE]-
> [!NOTE]+
>
> ```js {mode="classic"}
> function add(a, b) {
@@ -158,6 +158,14 @@ function add(a, b) {
> }
> ```
{{< typeit code=java >}}
public class HelloWorld {
public static void main(String []args) {
System.out.println("Hello World");
}
}
{{< /typeit >}}
{{< details "Code Block inside Details" >}}
```js {mode="classic"}
+1 -1
View File
@@ -1,6 +1,6 @@
# -------------------------------------------------------------------------------------
# Hugo Configuration
# See: https://gohugo.io/getting-started/configuration/
# See: https://gohugo.io/configuration/all/
# -------------------------------------------------------------------------------------
title = "Hugo FixIt TEST"
+6 -8
View File
@@ -28,7 +28,7 @@ comment: false
Comment like this:
````markdown
````markdown {mode=mac}
```yaml
- nickname: <your nickname>
avatar: <your avatar>
@@ -37,10 +37,8 @@ Comment like this:
```
````
{{< admonition info "Notice" true >}}
1. If you want to exchange link, please leave a comment as the above format. (personal non-commercial blogs / websites only)
2. :(fa-solid fa-exclamation-triangle): Website failure, stop maintenance and improper content may be unlinked!
3. Those websites that do not respect other people's labor achievements, reprint without source, or malicious acts, please do not come to exchange.
{{< /admonition >}}
> [!NOTE]
>
> 1. If you want to exchange link, please leave a comment as the above format. (personal non-commercial blogs / websites only)
> 2. :(fa-solid fa-exclamation-triangle): Website failure, stop maintenance and improper content may be unlinked!
> 3. Those websites that do not respect other people's labor achievements, reprint without source, or malicious acts, please do not come to exchange.
+1 -5
View File
@@ -11,7 +11,6 @@ author:
avatar:
description:
keywords:
license:
comment: false
weight: 0
tags:
@@ -28,13 +27,10 @@ resources:
src: featured-image.jpg
- name: featured-image-preview
src: featured-image-preview.jpg
toc: true
math: false
lightgallery: false
password:
message:
repost:
enable: true
enable: false
url:
# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter
+3 -10
View File
@@ -11,7 +11,6 @@ author:
avatar:
description:
keywords:
license:
comment: false
weight: 0
tags:
@@ -23,18 +22,12 @@ hiddenFromSearch: false
hiddenFromRelated: false
hiddenFromFeed: false
summary:
resources:
- name: featured-image
src: featured-image.jpg
- name: featured-image-preview
src: featured-image-preview.jpg
toc: true
math: false
lightgallery: false
featuredImagePreview:
featuredImage:
password:
message:
repost:
enable: true
enable: false
url:
# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter
+2
View File
@@ -2,4 +2,6 @@
title: {{ T "assets.search" }}
layout: search
date: {{ .Date }}
description:
keywords:
---
+5 -6
View File
@@ -509,13 +509,12 @@
json-viewer[boxed] + json-viewer[boxed] {
margin-top: 0.5rem;
}
@import '../_partials/_single/alert';
@import '../_partials/_single/code';
@import '../_partials/_single/diagram-copy-btn';
@import '../_shortcodes';
}
@import '../_shortcodes';
@import '../_partials/_single/alert';
@import '../_partials/_single/code';
@import '../_partials/_single/diagram-copy-btn';
@import '../_partials/_single/reward';
@import '../_partials/_single/footer';
@import '../_partials/_single/comment';
-4
View File
@@ -1,7 +1,3 @@
img {
@include border-radius($global-border-radius/2);
&[loading='lazy'] {
background: var(#{$rootPrefix}loading-img) no-repeat center;
}
}
+2 -2
View File
@@ -69,7 +69,7 @@ pre {
@include border-radius($global-border-radius);
// lineNumbersInTable=true
> .chroma {
> div.chroma {
position: relative;
background-color: var(#{$rootPrefix}code-block-background-color);
@include border-radius($global-border-radius);
@@ -211,7 +211,7 @@ pre {
transform: translateX(-50%);
background-color: var(#{$rootPrefix}code-header-background-color);
padding-inline: 1em;
max-width: 80%;
max-width: calc(100% - 200px);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
+17 -1
View File
@@ -37,6 +37,20 @@ enableEmoji = true
# otherwise it returns the section with the most pages.
# mainSections = ["posts"]
# -------------------------------------------------------------------------------------
# Front Matter Configuration
# See: https://gohugo.io/configuration/front-matter/
# -------------------------------------------------------------------------------------
[frontmatter]
_merge = "shallow"
lastmod = [
"lastmod",
":git",
":fileModTime",
":default",
]
# -------------------------------------------------------------------------------------
# Imaging Configuration
# See: https://gohugo.io/configuration/imaging/
@@ -1070,7 +1084,7 @@ hotWords = true
# FixIt 0.3.17 | NEW Summary AI config
# See https://ai.zhheo.com/docs/summary.html
[params.postSummary]
enable = true
enable = false
# If you set `params.postChat.key`, you don't need to set `params.postSummary.key`
key = ""
title = ""
@@ -1217,6 +1231,8 @@ pageStyle = "normal"
# FixIt 0.2.17 | CHANGED Auto Bookmark Support
# If true, save the reading progress when closing the page.
autoBookmark = false
# FixIt 0.4.0 | NEW whether to show the last modified time
showLastmod = true
# FixIt 0.2.17 | NEW whether to enable wordCount
wordCount = true
# FixIt 0.2.17 | NEW whether to enable readingTime
+1 -1
View File
@@ -1,4 +1,4 @@
{{- hugo.Store.Set "version" "v0.4.0-rc" -}}
{{- hugo.Store.Set "version" "v0.4.1" -}}
{{- .Store.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}}
+6 -4
View File
@@ -59,12 +59,14 @@ https://github.com/HEIGE-PCloud/DoIt/blob/main/layouts/_partials/plugin/image.ht
{{- $blackList := .BlackList | default $config.blackList | default slice -}}
{{- $isBlocked := false -}}
{{- $regex := "" -}}
{{- $disableImageTypes := slice "svg" "gif" -}}
{{- $isSvg := false -}}
{{- $disableImageTypes := slice "svg" "gif" "avif" -}}
{{- with $blackList -}}
{{- $regex = replace (delimit . "|") "." "\\." -}}
{{- $regex = replace $regex "*" ".*" -}}
{{- end -}}
{{- /* raster graphics */ -}}
{{- $rasterTypes := slice "svg" "avif" -}}
{{- $isRaster := false -}}
{{- if $resource -}}
{{- if $regex -}}
{{- $isBlocked = gt (findRE $regex $resource.Name | len) 0 -}}
@@ -72,7 +74,7 @@ https://github.com/HEIGE-PCloud/DoIt/blob/main/layouts/_partials/plugin/image.ht
{{- if not $isBlocked -}}
{{- $isBlocked = in $disableImageTypes $resource.MediaType.SubType -}}
{{- end -}}
{{- $isSvg = eq $resource.MediaType.SubType "svg" -}}
{{- $isRaster = in $rasterTypes $resource.MediaType.SubType -}}
{{- end -}}
{{- /* Optimise image and generate srcset processing */ -}}
@@ -95,7 +97,7 @@ https://github.com/HEIGE-PCloud/DoIt/blob/main/layouts/_partials/plugin/image.ht
{{- $caption := .Caption | default $alt -}}
{{- $height := .Height -}}
{{- $width := .Width -}}
{{- if not $isSvg -}}
{{- if not $isRaster -}}
{{- $height = $height | default $resource.Height | default "" -}}
{{- $width = $width | default $resource.Width | default "" -}}
{{- end -}}
+1 -1
View File
@@ -73,9 +73,9 @@
{{- if $chatConfig.enable -}}
{{- $sourceOpts = dict "Attr" (printf "data-postChat_key=%q" $key) | merge $sourceOpts -}}
{{- $blackDom := slice
".expiration-reminder"
"meting-js"
".lnt"
".ln"
-}}
{{- with $chatConfig.blackDom -}}
{{- $blackDom = $blackDom | append . -}}
@@ -1,7 +1,8 @@
{{- $params := partial "function/params.html" -}}
{{- $expirationReminder := $params.expirationReminder | default dict -}}
{{- $isEnabled := $expirationReminder.enable | and (not $params.password) -}}
{{- if $expirationReminder.enable -}}
{{- if $isEnabled -}}
{{- $daysAgo := div (sub now.Unix .Lastmod.Unix) 86400 }}
{{- $reminderThreshold := $expirationReminder.reminder | default 90 }}
{{- $warningThreshold := $expirationReminder.warning | default 180 }}
+1 -1
View File
@@ -11,7 +11,7 @@
{{- /* highlight code content without line number */ -}}
{{- $content = highlight $content (.Get "code") "lineNos=false, noClasses=false" -}}
{{- /* delete outer label */ -}}
{{- $content = replaceRE `.*<code[^<>]*>(?s)(.*)</code>.*` "$1" $content -}}
{{- $content = replaceRE `.*<code[^<>]*>(?s)(.*)</code>.*` "<span class=\"chroma\">$1</span>" $content -}}
{{- if .Get "code-link" -}}
{{- /* parsing code links */ -}}
{{- $content = replaceRE `(<span[^<>]*>)([^<>]*)\[([^<>]+)\]\(([^<>]+)\)([^<>]*)(</span>)` "$1$2$6<a href=\"$4\">$3</a>$1$5$6" $content -}}
+4 -3
View File
@@ -60,7 +60,7 @@
{{- printf `<time datetime="%v">%v</time>` . . | safeHTML -}}
</span>&nbsp;
{{- end -}}
{{- if ne .Lastmod.Unix .PublishDate.Unix }}
{{- if (ne .Lastmod.Unix .PublishDate.Unix) | and $params.showLastmod -}}
{{- with .Lastmod | dateFormat (.Site.Params.dateformat | default "2006-01-02") -}}
<span title="{{ dict "Date" ("2006-01-02 15:04:05" | $.Lastmod.Format) | T "single.updatedOnDate" }}">
{{- dict "Class" "fa-regular fa-calendar-check fa-fw me-1" | partial "plugin/icon.html" -}}
@@ -176,12 +176,13 @@
{{- /* Custom block before post content */ -}}
{{- block "custom-post__content:before" . }}{{ end -}}
{{- /* Expiration Reminder */ -}}
{{- partial "single/expiration-reminder.html" . -}}
{{- /* Content */ -}}
{{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
<div class="content" id="content"{{ with $params.endFlag }} data-end-flag="{{ . }}"{{ end }}>
{{- if not $params.password -}}
{{- /* Expiration Reminder */ -}}
{{- partial "single/expiration-reminder.html" . -}}
{{- $content -}}
{{- end -}}
</div>
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@hugo-fixit/core",
"type": "module",
"version": "0.4.0-rc",
"version": "0.4.1",
"private": true,
"packageManager": "pnpm@10.22.0",
"description": "Hugo FixIt core theme component source files",
@@ -36,9 +36,9 @@
"build": "pnpm build:demo && pnpm build:test && pnpm -F integration start",
"preview": "serve public",
"lint": "eslint --cache .",
"version": "pnpm -F versioning start prod && pnpm changelog -p",
"version": "pnpm -F versioning start prod",
"postversion": "git push && git push --tags",
"changelog": "auto-changelog-plus",
"changelog": "auto-changelog-plus --starting-date 2021-12-18",
"prepare": "simple-git-hooks"
},
"devDependencies": {