Skip to content

Commit

Permalink
Merge branch 'v0.2.18-lts' into 1.0.0
Browse files Browse the repository at this point in the history
* v0.2.18-lts: (22 commits)
  🔖 Chore(release): 0.2.18-lts.5
  📝 Docs: update chang log and docs
  🔧 Chore: change the theme minimum supported Hugo versions above **0.110.0**
  🔧 Chore: update default config in `hugo.toml`
  🐛 Fix: active index of toc may result in error
  ✨ Feat: add hiddenFromRss param and front matter
  ⚡ Perf: preload some stylesheet
  🔧 Chore: add Vercel config (#277)
  🐛 Fix: fix logic error of  lightgallery images rendering
  📝 Docs: update the outputs configuration to avoid the following warnings in versions above Hugo 0.112.0 (resolve #354)
  📝 Docs: update content license
  🐛 Style: fix the emoji style of valine comment (resolve #376)
  ⚡ Perf: optimize featured image rendering
  🔧 Chore: add decoding and referrerpolicy options for img plugin
  🚸 Feat: change bilibili shortcode `muted` default value
  🔖 Chore(release): 0.2.18-lts.4
  📝 Docs: update change log for v0
  ✨ Feat: add more options support for bilibili shortcode, e.g. `autoplay`, `muted` etc. (resolve #375)
  🐛 Fix: disable encrypted articles from rendering to rss (fixed #374)
  🐛 Fix: fix featured image path error in rss and show img tags in rss
  ...
  • Loading branch information
Lruihao committed Nov 29, 2023
2 parents eaa1fea + 8aa3cf9 commit 65875de
Show file tree
Hide file tree
Showing 23 changed files with 192 additions and 85 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,37 @@ All notable changes to this project will be documented in this file.
> Snapshot: <>
- :sparkles: Feat: add code block attributes support ([#330](https://github.com/hugo-fixit/FixIt/issues/330))
- :sparkles: Feat: add options to cache remote image locally ([#362](https://github.com/hugo-fixit/FixIt/pull/362) Fixes [#348](https://github.com/hugo-fixit/FixIt/issues/348))
- :sparkles: Feat: change post nav rule at post footer
- :sparkles: Feat: add hiddenFromRss param and front matter
- :zap: Perf: optimize lightgallery images rendering
- :zap: Perf: preload some stylesheet
- :bug: Fix: use dateFormat function to render localized dates (@stefanoginobili [#355](https://github.com/hugo-fixit/FixIt/pull/355))
- :bug: Fix: total word count error in section
- :bug: Fix: fix path errors in image src and 1.5x srcset ([#346](https://github.com/hugo-fixit/FixIt/issues/346))
- :bug: Fix: fix toc active error when breadcrumb is enabled and set `sticky` to `true` ([#368](https://github.com/hugo-fixit/FixIt/issues/368))
- :bug: Fix: add a option "Responsive" for plugin image fixed [#369](https://github.com/hugo-fixit/FixIt/issues/369)
- :bug: Fix: fix featured image path error and show img tags in rss ([#373](https://github.com/hugo-fixit/FixIt/issues/373))
- :bug: Fix: disable encrypted articles from rendering to rss ([#374](https://github.com/hugo-fixit/FixIt/issues/374))
- :sparkles: Feat: add more options support for bilibili shortcode, e.g. `autoplay`, `muted` etc. ([#375](https://github.com/hugo-fixit/FixIt/issues/375))
- :bug: Style: fix the emoji style of valine comment ([#376](https://github.com/hugo-fixit/FixIt/issues/376))
- :bug: Fix: active index of toc may result in error ([#305](https://github.com/hugo-fixit/FixIt/issues/305))
- :lipstick: Style: update define list style
- :lipstick: Style: update footnote and footnote-ref style
- :memo: Docs: update the outputs configuration to avoid the "taxonomyterm" warning in versions above Hugo 0.112.0 (resolve [#354](https://github.com/hugo-fixit/FixIt/issues/354))
- :wrench: Chore: update default config in `hugo.toml`
- :wrench: Chore: change the theme minimum supported Hugo versions above **0.110.0**
- :arrow_up: Chore(libs):
- Update algoliasearch from 4.14.2 to 4.20.0
- Update Artalk from 2.5.2 to 2.6.4
- Update fontawesome-free from 6.2.0 to 6.4.2
- Update instant.page from 5.1.1 to 5.2.0
- Update katex from 0.16.2 to 0.16.9
- Update lightgallery from 2.6.1 to 2.7.2
- Removed Renren, Digg and StumbleUpon in sharer.js 0.5.0
- Update Twikoo from 1.6.8 to 1.6.22
- Update vConsole from 3.14.6 to 3.15.1
- Update eruda from 2.5.0 to 3.0.1
- Update Waline from 2.14.7 to 2.15.8
- Update simple-icons from 7.12.0 to 9.19.0
- **Full Changelog:** @Lruihao [`v0.2.18...v1.0.0`](https://github.com/hugo-fixit/FixIt/compare/v0.2.18...v1.0.0)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.109.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.110.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)
Expand Down Expand Up @@ -45,7 +45,7 @@ And later you can update the submodule in your site directory to the latest comm
git submodule update --remote --merge
```

Next, go to the `config.toml` and change the default theme to `FixIt`.
Next, go to the `hugo.toml` and change the default theme to `FixIt`.

```diff
- theme = "LoveIt"
Expand Down
4 changes: 2 additions & 2 deletions README.zh-cn.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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.109.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.110.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) | 简体中文说明
Expand Down Expand Up @@ -45,7 +45,7 @@ git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt
git submodule update --remote --merge
```

接着,前往 `config.toml` 并将默认主题更改为 `FixIt`
接着,前往 `hugo.toml` 并将默认主题更改为 `FixIt`

```diff
- theme = "LoveIt"
Expand Down
1 change: 1 addition & 0 deletions archetypes/post-bundle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ categories:
- draft
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRss: false
summary:
resources:
- name: featured-image
Expand Down
1 change: 1 addition & 0 deletions archetypes/posts.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ categories:
- draft
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRss: false
summary:
resources:
- name: featured-image
Expand Down
6 changes: 1 addition & 5 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
height: auto;
}

&:is([loading='lazy']):not([data-lazyloaded]) {
&[loading='lazy'][srcset]:not([data-lazyloaded]) {
&:not(.suffix-invalid__small) {
width: var(--width-small, var(--width));
aspect-ratio: var(--aspect-ratio-small, var(--aspect-ratio));
Expand Down Expand Up @@ -338,10 +338,6 @@
display: block;
margin: 0 auto;
overflow: hidden;

&:not([width]) {
width: 100%;
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion assets/js/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ class FixIt {
break;
}
}
if (activeTocIndex !== -1) {
if (activeTocIndex !== -1 && $tocLinkElements[activeTocIndex]) {
$tocLinkElements[activeTocIndex].classList.add('active');
let $parent = $tocLinkElements[activeTocIndex].parentElement;
while ($parent !== $tocCore) {
Expand Down
5 changes: 0 additions & 5 deletions assets/lib/valine/valine.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,4 @@ $code-background-color-dark: #272C34 !default;
background: $code-background-color-dark;
}
}

.emoji, .vemoji {
max-width: 1.5em;
vertical-align: text-bottom;
}
}
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 30 files
+1 −1 README.en.md
+1 −1 README.md
+1 −4 config/_default/hugo.toml
+1 −1 config/_default/languages.en.toml
+1 −1 config/_default/languages.zh-cn.toml
+2 −2 config/_default/outputs.toml
+5 −2 config/_default/params.toml
+8 −0 config/development/server.toml
+1 −1 content/about/index.en.md
+1 −1 content/about/index.zh-cn.md
+13 −11 content/documentation/basics/index.en.md
+13 −11 content/documentation/basics/index.zh-cn.md
+1 −1 content/documentation/content-management/diagrams/index.en.md
+1 −1 content/documentation/content-management/diagrams/index.zh-cn.md
+59 −58 content/documentation/content-management/introduction/index.en.md
+60 −58 content/documentation/content-management/introduction/index.zh-cn.md
+34 −2 content/documentation/content-management/shortcodes/extended/bilibili/index.en.md
+34 −2 content/documentation/content-management/shortcodes/extended/bilibili/index.zh-cn.md
+1 −1 content/documentation/content-management/shortcodes/extended/mermaid/index.en.md
+1 −1 content/documentation/content-management/shortcodes/extended/mermaid/index.zh-cn.md
+2 −2 content/documentation/getting-started/index.en.md
+8 −7 content/documentation/getting-started/index.zh-cn.md
+0 −4 content/faq/index.en.md
+0 −4 content/faq/index.zh-cn.md
+1 −1 content/guides/pwa-support/index.en.md
+1 −1 content/guides/pwa-support/index.zh-cn.md
+1 −1 content/tests/markdown/index.zh-cn.md
+9 −4 data/friends.yml
+6 −1 data/sponsor_log.yml
+0 −1 static/_redirects
37 changes: 35 additions & 2 deletions config.toml → hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@
# Modifying this file may result in merge conflict
# =====================================================================================

# -------------------------------------------------------------------------------------
# Hugo Configuration
# See: https://gohugo.io/getting-started/configuration/
# -------------------------------------------------------------------------------------

# website title
title = "FixIt"
# Hostname (and path) to the root
baseURL = "http://localhost:1313"
# theme list
theme = ["FixIt"]
# determines default content language ["en", "zh-cn", "fr", "pl", ...]
defaultContentLanguage = "en"
# language code ["en", "zh-CN", "fr", "pl", ...]
languageCode = "en"
# language name ["English", "简体中文", "Français", "Polski", ...]
languageName = "English"
# whether to include Chinese/Japanese/Korean
hasCJKLanguage = false
# default amount of posts in each pages
paginate = 12
# copyright description used only for seo schema
copyright = ""
# whether to use robots.txt
enableRobotsTXT = true
# whether to use git commit log
enableGitInfo = true
# whether to use emoji code
enableEmoji = true

# -------------------------------------------------------------------------------------
# Menu Configuration
# See: https://fixit.lruihao.cn/documentation/basics/#menu-configuration
Expand Down Expand Up @@ -359,6 +389,8 @@
hiddenFromHomePage = false
# FixIt 0.2.0 | NEW whether to hide a page from search results
hiddenFromSearch = false
# FixIt 0.2.18-lts.5 | NEW whether to hide a page from RSS feed
hiddenFromRss = false
# FixIt 0.2.0 | NEW whether to enable twemoji
twemoji = false
# whether to enable lightgallery
Expand All @@ -371,7 +403,7 @@
# FixIt 0.2.0 | NEW whether to enable the fontawesome extended syntax
fontawesome = true
# license info (HTML format is supported)
license = '<a rel="license external nofollow noopener noreferrer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
license = '<a rel="license external nofollow noopener noreferrer" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a>'
# whether to show link to Raw Markdown content of the content
linkToMarkdown = true
# FixIt 0.2.4 | NEW whether to show the full text content in RSS
Expand Down Expand Up @@ -840,7 +872,8 @@
# Modules Configuration
# See: https://gohugo.io/hugo-modules/configuration/#module-config-imports
# -------------------------------------------------------------------------------------

[module]
[module.hugoVersion]
extended = true
min = "0.109.0"
min = "0.110.0"
8 changes: 4 additions & 4 deletions layouts/_default/_markup/render-image.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{{- if .Title -}}
{{- if .Title | and .Text -}}
<figure>
{{- dict "Src" .Destination "Alt" .Text "Caption" .Text "Title" .Title "Linked" true "Resources" .Page.Resources "Params" .Page.Params | partial "plugin/image.html" -}}
{{- dict "Src" .Destination "Alt" .Text "Caption" .Text "Title" .Title "Linked" true "Resources" .Page.Resources "Params" .Page.Params "Responsive" true | partial "plugin/image.html" -}}
<figcaption class="image-caption">
{{- .Text | safeHTML -}}
</figcaption>
</figure>
{{- else -}}
{{- $linked := (eq .Page.Site.Params.page.lightgallery "force") | or (eq .Page.Params.lightgallery "force") -}}
{{- dict "Src" .Destination "Alt" .Text "Linked" $linked "Resources" .Page.Resources "Params" .Page.Params | partial "plugin/image.html" -}}
{{- $linked := (eq (.Page.Scratch.Get "params").lightgallery "force") | or (ne .Title "") -}}
{{- dict "Src" .Destination "Alt" .Text "Title" .Title "Linked" $linked "Resources" .Page.Resources "Params" .Page.Params "Responsive" true | partial "plugin/image.html" -}}
{{- end -}}
2 changes: 1 addition & 1 deletion layouts/_default/summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{{- with $image -}}
<div class="featured-image-preview">
<a href="{{ $.RelPermalink }}" aria-label="{{ $.Title }}">
{{- dict "Src" . "Title" $.Description "Resources" $.Resources | partial "plugin/image.html" -}}
{{- dict "Src" . "Title" $.Description "Alt" $.Title "Resources" $.Resources | partial "plugin/image.html" -}}
</a>
</div>
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion layouts/friends/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1 class="single-title animate__animated animate__pulse animate__faster">{{- .T
{{ 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" "Resources" $.Resources | partial "plugin/image.html" -}}
{{- dict "Src" $friend.avatar "Alt" $friend.nickname "Class" "friend-avatar" "Resources" $.Resources "Params" $.Params | partial "plugin/image.html" -}}
{{ else }}
<svg class="friend-avatar" aria-hidden="true">
<use xlink:href="#icon-{{ add 1 $index }}"></use>
Expand Down
2 changes: 2 additions & 0 deletions layouts/index.rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{ end }}
{{- range where .Site.RegularPages "Type" "posts" | first (.Site.Params.home.rss | default 10) -}}
{{- $params := .Scratch.Get "params" -}}
{{- if $params.password | or $params.hiddenFromRss }}{{ continue }}{{ end -}}
{{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
{{- end -}}
</channel>
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
{{- $math := .Scratch.Get "math" -}}
{{- if $math.enable -}}
{{- $source := $cdn.katexCSS | default "lib/katex/katex.min.css" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint "Preload" true | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.katexJS | default "lib/katex/katex.min.js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- $source := $cdn.katexAutoRenderJS | default "lib/katex/auto-render.min.js" -}}
Expand Down Expand Up @@ -133,7 +133,7 @@
{{- /* Mapbox GL */ -}}
{{- if (.Scratch.Get "this").mapbox -}}
{{- $source := $cdn.mapboxGLCSS | default "lib/mapbox-gl/mapbox-gl.css" -}}
{{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- dict "Source" $source "Minify" true "Fingerprint" $fingerprint "Preload" true | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source = $cdn.mapboxGLJS | default "lib/mapbox-gl/mapbox-gl.js" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
{{- dict "Source" "lib/mapbox-gl/mapbox-gl-language.js" "Minify" true "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
Expand All @@ -144,7 +144,7 @@
{{- if (.Scratch.Get "this").music -}}
{{- /* APlayer */ -}}
{{- $source := $cdn.aplayerCSS | default "lib/aplayer/APlayer.min.css" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- dict "Source" $source "Fingerprint" $fingerprint "Preload" true | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $options := dict "targetPath" "lib/aplayer/dark.min.css" "enableSourceMap" true -}}
{{- dict "Source" "lib/aplayer/dark.scss" "ToCSS" $options "Fingerprint" $fingerprint | dict "Scratch" .Scratch "Data" | partial "scratch/style.html" -}}
{{- $source := $cdn.aplayerJS | default "lib/aplayer/APlayer.min.js" -}}
Expand Down
16 changes: 8 additions & 8 deletions layouts/partials/head/link.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@
{{- end -}}

{{- /* style.min.css */ -}}
{{- $style := dict "Source" "css/style.scss" "Fingerprint" $fingerprint -}}
{{- $options := dict "targetPath" "css/style.min.css" "enableSourceMap" true -}}
{{- $style = dict "Context" . "ToCSS" $options | merge $style -}}
{{- partial "plugin/style.html" $style -}}
{{- $options := dict "Source" "css/style.scss" "Fingerprint" $fingerprint -}}
{{- $toCSS := dict "targetPath" "css/style.min.css" "enableSourceMap" true -}}
{{- $options = dict "Context" . "ToCSS" $toCSS | merge $options -}}
{{- partial "plugin/style.html" $options -}}

{{- /* Font Awesome */ -}}
{{- $source := $cdn.fontawesomeFreeCSS | default "lib/fontawesome-free/all.min.css" -}}
{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}}
{{- partial "plugin/style.html" $style -}}
{{- $options := dict "Source" $source "Fingerprint" $fingerprint "Preload" true -}}
{{- partial "plugin/style.html" $options -}}

{{- /* Animate.css */ -}}
{{- $source := $cdn.animateCSS | default "lib/animate/animate.min.css" -}}
{{- $style := dict "Source" $source "Fingerprint" $fingerprint -}}
{{- partial "plugin/style.html" $style -}}
{{- $options := dict "Source" $source "Fingerprint" $fingerprint "Preload" true -}}
{{- partial "plugin/style.html" $options -}}
Loading

0 comments on commit 65875de

Please sign in to comment.