Compare commits

...

114 Commits

Author SHA1 Message Date
Cell 4203b573cb 🔖 Chore(release): 0.3.11 2024-08-30 12:57:57 +08:00
Cell 5991958bca 🐛 Fix: FixIt theme internal version number error 2024-08-30 12:57:09 +08:00
Cell afc504e33a 🔖 Chore(release): 0.3.10 2024-08-30 11:19:23 +08:00
Cell c8081affa6 ⬆️ Chore(libs): update Valine from 1.5.1 to 1.5.2 2024-08-30 10:53:19 +08:00
Cell 1f22b538b5 Chore: simplified code 2024-08-30 10:42:51 +08:00
Cell 442ec84049 ⬆️ Chore: update min hugo version to 0.132.0 2024-08-29 22:45:00 +08:00
Cell 52184d96d4 💄 Style: update center-quote shortcode style 2024-08-29 22:37:31 +08:00
Cell 5dac03a90d 🌐 Feat: add translations for alerts 2024-08-29 22:30:06 +08:00
Cell e2cf5fe31d 💄 Style: add alert stylesheet 2024-08-29 22:30:06 +08:00
Cell 8798f5b51f 🎉 Feat: add blockquote render hook to support GitHub alerts markdown syntax
simpler callouts or admonitions sytax
2024-08-29 22:30:06 +08:00
Cell 3b99838980 ♻️ Refactor: icon plugin 2024-08-29 17:52:56 +08:00
Cell 5aaacec004 🐛 Fix: resources get match error for page images 2024-08-29 14:47:02 +08:00
Cell 349de54009 🐛 Fix: featuredimagepreview error in summary and RSS 2024-08-29 14:05:40 +08:00
Cell 312b6363dc Merge pull request #494 from hugo-fixit/content-encryption
🔒 Perf: enhance content encryption security
2024-08-29 11:20:34 +08:00
Cell a67efe41be 🔧 Chore: update version automatic update script 2024-08-29 11:17:38 +08:00
Cell 64529c99c8 📝 Docs(ignore): update memo 2024-08-29 10:54:50 +08:00
Cell ede47a2bae ♻️ Refactor: convert FixItDecryptor to ES6 Class 2024-08-29 10:49:51 +08:00
Cell b7ed9cac69 ♻️ Refactor: refactor content encryption 2024-08-29 10:24:16 +08:00
Cell ccce5b52fd 📈 Feat: remove noreferrer from friend links and version shortcode 2024-08-26 14:49:43 +08:00
Cell e7dd4c838c Chore: unified content encryption function 2024-08-26 11:22:45 +08:00
Cell 18643271f8 📝 Docs: update default outputs config 2024-08-26 11:03:28 +08:00
Cell 91f3c7c3cf 🐛 Fix: fix fixit-encryptor shortcode duplicate binding events 2024-08-26 10:58:34 +08:00
Cell 466bb7b7e9 🔒 Perf: use xxHash instead of md5 to calculate the hash value of a password
Update min hugo version to 0.129.0 for using xxHash function
2024-08-25 13:48:28 +08:00
Cell 3ffef8acb0 ♻️ Refactor: refactor the feed and search features (#490)
* 🔍 Refactor: add JSON feed support and refactor output formats build in FixIt

Close #475

* 🚚 Feat: migrate index templates to layouts/_default folder and home.[name].html

* 📝 Style(ignore): fix typo

* 🚚 Chore: migrate index templates to default home templates

* 🚚 Chore: migrate section templates to layouts/section folder

*  Feat: add JSON feed support for section pages (#475)

* 🚧 Feat: add common template for JSON feed (#475)

* 🚧 Feat: add JSON feed support for section and term list pages

* 🚀 Chore: fix git stage error in update-version script

*  Perf: add front matter hiddenFromFeed for JSON feed (#475)

* 🔍 Feat: add tags attribute for JSON feed (#475)

* ♻️ Refactor: refactor RSS feed templates

Close #488

* 🚧 WIP: rename json-feed.html to json.html

* 🚧 Feat: revert single.md

*  Perf: enhance JSON feed 1.1 compatibility

* ♻️ Refactor: refactor post author map getting

*  WIP: add featured image support in feed

* 📝 Docs: update README and screenshot

* 🔧 Chore: update changelog template

* 🚧 WIP: add feed scoped config for section and list

* 🔥 Feat: migrate JSON feed to hugo-fixit/hugo-json-feed

Close hugo-fixit/hugo-json-feed#1

* 🚚 Feat: remove front matter hiddenFromRss and rssFullText,  add  front matter hiddenFromFeed
2024-08-24 17:30:31 +08:00
Cell 6a83650506 Feat: add post navigation config and remove params.Site.Params.navigationReverse
Closes #480
2024-08-11 16:30:01 +08:00
Cell 1c84791db9 🔥 Feat: migrate mobile devtools to a single compenent (#474) 2024-08-10 11:49:36 +08:00
Cell 24873c5e99 🚸 Chore: update FixIt theme version detection in dev mode 2024-08-09 10:40:09 +08:00
Cell 51d64cb152 📝 Docs(ignore): update README 2024-08-08 10:17:11 +08:00
Cell 94553e9b8e 📝 Docs: update CONTRIBUTING.md 2024-08-06 17:30:47 +08:00
Cell 656f00b6a4 🚀 Chore: optimize development process: automatically update FixIt version 2024-08-06 17:30:32 +08:00
Cell 9a1b4570a7 💄 Style: update common style 2024-08-05 15:48:47 +08:00
Cell 976db36bc8 Feat: add more params for typeit shortcodes
resolves #483
2024-08-04 12:30:06 +08:00
Cell c0942a92b9 Feat: open more custom blocks (#479)
- custom-comment
- custom-post__footer:before
- custom-post__footer:after
2024-08-03 12:20:29 +08:00
Cell 0a5007921a 🍱 Chore: update screenshot and thumbnail 2024-08-01 15:12:54 +08:00
Cell a482e14bd5 🐛 Fix(ignore): fix bug in dev ed2f5f6d 2024-08-01 10:05:18 +08:00
Cell 9109ef22e2 Perf(ignore): remove busuanzi.core and add busuanzi.source (#472) 2024-07-30 16:40:41 +08:00
Cell ed2f5f6d10 ♻️ Refactor: refactor page style with CSS round function
Resolved #482
2024-07-29 20:10:40 +08:00
Cell 4065ce606a Perf: disable PWA in the built-in development server 2024-07-28 23:12:48 +08:00
Cell 72a77c2fc5 Perf(ignore): disable busuanzi in dev environment 2024-07-28 23:09:16 +08:00
Navjot Singh 291364255c Block AI Bots and crawlers 2024-07-28 17:24:16 +08:00
Cell 66b86d97cf 💄 Style: change font size of the Collection List and TOC 2024-07-28 17:11:45 +08:00
Cell 16c903fac9 🐛 Fix: fix rendering errors caused by decimal points in page width styles
Closes giscus/giscus#1426
2024-07-28 16:18:23 +08:00
Cell 7c85205519 :bug :Fix: heading front matter is not effective 2024-07-28 14:25:45 +08:00
Cell 7c67b90acf ♻️ Refactor: deprecate params.ibruce in favor of params.busuanzi powered by Vercount
Resolve #472
Close EvanNotFound/vercount#10
2024-07-28 13:34:53 +08:00
Cell 6c752c1bbd 📝 Docs(ignore): update zsxq link 2024-07-26 16:25:19 +08:00
Cell b8ecfc1127 💄 Style: revert timeline animation to fade style 2024-07-25 11:33:23 +08:00
Tim a0b4b81fd6 style: 💄 change the icon of edit button in code block header to fa-pen-to-square 2024-07-25 09:34:56 +08:00
Cell 25e358d920 🔖 Chore(release): 0.3.9 2024-07-24 16:31:13 +08:00
Cell 6cbb89875a 🐛 Fix: fix cookieconsent init error
Resolved #314
2024-07-24 16:11:14 +08:00
Cell bcd6987910 🐛 Fix(ignore): TypeError: Cannot read properties of null (reading 'cloneNode') 2024-07-24 15:39:57 +08:00
Cell dd33cabe16 🐛 Fix: take a dirty hack to fix the bug of APlayer and smoothScroll
Fixed #292
2024-07-24 15:31:06 +08:00
Cell 99dc099939 📝 Docs(ignore): rename function initHighlight to initCodeWrapper 2024-07-24 14:05:13 +08:00
Cell de18e91146 Feat: add param to hide single code block header (#462) 2024-07-24 12:28:39 +08:00
Cell 537ad1df3f Feat: add config whether to enable the code wrapper
Resolved #462
2024-07-24 10:59:24 +08:00
Cell 7c836776c0 ✏️ Docs: fix typo 2024-07-23 11:36:15 +08:00
Cell 9894d9900c 💄 Style: update timeline animation 2024-07-23 11:31:43 +08:00
Cell 9d32ba9d9e 📝 Docs: update hugo.toml 2024-07-23 09:59:13 +08:00
Cell affaea7ecb 🐛 Fix: password runecount calc error 2024-07-22 15:40:29 +08:00
Cell 03e9b119cc Feat(igonre): Timeline feature enhancement 2024-07-22 15:12:55 +08:00
Cell 3e2484e69b 🔧 Chore(ignore): change giscus default comment order 2024-07-22 10:52:20 +08:00
Cell 44b63ca817 💄 Style: add title for friends avatar 2024-07-22 00:56:33 +08:00
Cell f44d89a52a ♻️ Refactor: mermaid shortcode and codeblock render 2024-07-21 20:20:39 +08:00
Cell 2a53dbac37 Feat: add echarts support for code blocks 2024-07-21 19:02:11 +08:00
Cell 9925af0808 Chore(ignore): remove FUNDING.yml 2024-07-21 13:28:04 +08:00
Cell 07c40dbc3e 📝 Docs(ignore): update README 2024-07-21 13:08:31 +08:00
Cell ec1debab38 🐛 Fix: the content of the code block in the details shortcode cannot be copied 2024-07-21 12:42:34 +08:00
Cell ee4441c3ea 🎉 Feat: add extended shortcode - Timeline support 2024-07-21 11:31:13 +08:00
Cell 42f811de22 🐛 Fix(ignore): timeline background color invaild in dark mod 2024-07-21 03:27:25 +08:00
Cell f6911c4fd2 Feat: add open and center params for details shortcode 2024-07-21 00:59:05 +08:00
Cell 9bacfa92f4 🎉 Feat: add timeline support for code blocks 2024-07-21 00:58:01 +08:00
Cell b3b0e6a4e0 ✏️ Feat: update Markdown code block type 2024-07-18 15:45:51 +08:00
Cell df7c7b9e18 Chore(ignore): update ISSUE_TEMPLATE and README 2024-07-16 17:50:23 +08:00
Cell 419ade9c73 Feat: add data-open attribute for code block
See http://fixit.lruihao.cn/documentation/content-management/markdown-syntax/extended/#custom-attribute
2024-07-16 15:15:53 +08:00
Cell 632243e60c 🐛 Style: fix Gist code highlight error in dark mod 2024-07-14 21:10:31 +08:00
Cell dc279b4346 🐛 Fix: fix code block scrollbar color error 2024-07-12 14:59:27 +08:00
Cell 26051115cd 💬 Docs: update Hugo Fixit demo site 2024-07-12 10:13:11 +08:00
Cell f9a09e4610 Feat: add submenu param divided and change submenu border color 2024-07-11 22:06:45 +08:00
Cell 2b2bde7ba8 🐛 Fix: collection nav and list can not show in posts that have password 2024-07-11 09:45:32 +08:00
Cell 6d9c6f5b93 💡 Feat: use the original title after archiving the articles 2024-07-10 17:59:09 +08:00
Cell 45c71ef58e 🐛 Fix: .hiddenFormRss not taking effect 2024-07-10 12:40:15 +08:00
Cell e39d78965f ♻️ Refactor: refactor breadcrumb translations with .TranslationKey 2024-07-09 16:10:19 +08:00
Cell 3dcb3b1a98 📝 Docs: update hugo.toml 2024-07-09 16:08:52 +08:00
Cell 906f3463ba 📝 Docs: fix typo in translations 2024-07-09 16:08:17 +08:00
Cell adf2acd22c 💄 Style: update bilibili and douyin shortcode style 2024-07-07 18:27:06 +08:00
Cell c021a53d15 📝 Docs: update embed archetypes 2024-07-07 12:20:08 +08:00
Cell b067289648 🐛 Fix: fix footnote style error 2024-07-05 00:39:08 +08:00
Cell c18aac486b 🐛 Fix: fix admontion overflow error 2024-07-05 00:37:24 +08:00
Cell 4f56a40653 🐛 Fix: fix code block scrollbar color error 2024-07-05 00:36:45 +08:00
Cell 061a3e3e2b ♻️ Refactor: deprecate .Site.IsMultiLingual in favor of hugo.IsMultilingual
.Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in a future release. Use hugo.IsMultilingual
2024-07-04 23:40:08 +08:00
Cell 44d0c7611d ♻️ Refactor: deprecate .Sites.First in favor of .Sites.Default
.Sites.First was deprecated in Hugo v0.127.0 and will be removed in a future release. Use .Sites.Default instead.
2024-07-04 23:37:29 +08:00
Cell cf91f230e8 📝 Docs: update default hugo.toml 2024-07-04 23:07:31 +08:00
Cell 052d128922 🐛 Fix: fix code title overflow in code header 2024-06-30 13:33:21 +08:00
Cell 91b583817a 🐛 Fix: fix custom-assets block postion 2024-06-29 18:44:25 +08:00
Cell 9d1ab1a578 🔖 Chore(release): 0.3.8 2024-06-25 12:23:54 +08:00
Cell ca73ca2066 💄 Style: scrollbar styles compatible with modern and legacy browsers 2024-06-25 12:23:21 +08:00
Cell 678e2c0053 Feat: add spotify shortcode support (resolve #450) 2024-06-08 12:27:04 +08:00
Cell 7e2e1006f1 💄 Style: show link icon when target heading element 2024-06-06 23:12:26 +08:00
Cell 256f491244 📝 Docs: update README 2024-06-06 20:50:38 +08:00
Cell 6eaae74708 🔒 Chore: upgrade katex to fix 3 Dependabot alert in katex.min.js 2024-06-06 11:06:04 +08:00
Cell 5c4de3ae21 🔒 Chore: upgrade crypto-js to fix 1 Dependabot alert in crypto-js 2024-06-06 11:00:21 +08:00
Cell 8db70c5829 📝 Docs: update hugo.toml 2024-06-06 10:11:06 +08:00
Cell b4940f46ea Feat: avoid using :has to be compatible with older browsers 2024-06-06 10:03:18 +08:00
Cell cbde3f0898 🚸 Feat: replace localStorage with sessionStorage for FixIt auto bookmark 2024-06-04 15:23:29 +08:00
Cell 4c9e20b377 💄 Style: add border radius for icon of card link 2024-06-04 11:15:26 +08:00
Cell 1a454de9d2 💄 Style: use default style for typeit 2024-06-04 11:13:23 +08:00
Abdul Halim Daud b998371564 Feat: add turnstileKey to waline 2024-05-27 17:56:13 +08:00
Abdul Halim Daud 9679c3442a 🐛 Fix: waline source map error 2024-05-27 17:56:13 +08:00
Cell d908af0a27 📝 Docs: update README 2024-05-23 12:40:20 +08:00
Cell b1f5515beb 📝 Docs(ignore): update README 2024-05-23 12:23:35 +08:00
Cell 069355cc70 📝 Docs: repalce of contributos workflow with GitHub contributors link 2024-05-23 12:18:48 +08:00
Tim Yang 6cc4d44ef4 💄 Style: upgrade the name and icon of "twitter" to "X" in share and social part (#443) 2024-05-23 11:43:09 +08:00
Cell 3c4284eb21 💄 Style: update douyin shortcode style in mobile 2024-05-22 12:20:34 +08:00
Cell a985b0e789 🔥 Feat: remove params.customFilePath 2024-05-22 11:45:14 +08:00
Cell 70afe3e883 💄 Style: update douyin shortcode style in mobile 2024-05-22 11:42:34 +08:00
158 changed files with 1924 additions and 1809 deletions
-3
View File
@@ -1,3 +0,0 @@
custom: [
"https://paypal.me/Lruihao"
]
+2 -6
View File
@@ -1,13 +1,9 @@
blank_issues_enabled: false
blank_issues_enabled: true
contact_links:
- name: Questions 问题讨论
url: https://github.com/hugo-fixit/FixIt/discussions/new
about: Please ask questions in Discussion. 请在讨论中提问。
- name: 官方 QQ 群
url: https://qm.qq.com/cgi-bin/qm/qr?k=awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM&jump_from=webapi
about: '加入 FixIt 主题交流群: 814031017'
- name: Theme Documentation 主题文档
url: https://fixit.lruihao.cn/categories/documentation/
url: https://fixit.lruihao.cn/documentation/
about: Please read the documentation carefully. 请先仔细阅读主题文档。
-27
View File
@@ -1,27 +0,0 @@
name: Generate Contribute List
on:
push:
branches:
- master
workflow_dispatch:
jobs:
contrib-readme-job:
runs-on: ubuntu-latest
name: A job to automate contribute list in contributors.md file
steps:
- name: First Contribution Check
id: first-check
uses: sukki37/first-contribution-check-action@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.CONTRIBUTORS_TOKEN }}
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@master
if: ${{ steps.first-check.outputs.isNewContributor == 'true' }}
with:
readme_path: "contributors.md"
image_size: 100
commit_message: ":busts_in_silhouette: Chore(contributor): contrib-readme-action has updated contributors.md"
committer_username: "github-actions[bot]"
committer_email: "github-actions[bot]@users.noreply.github.com"
env:
GITHUB_TOKEN: ${{ secrets.CONTRIBUTORS_TOKEN }}
+1
View File
@@ -0,0 +1 @@
node build/update-version.js --stage commit
+20 -15
View File
@@ -1,5 +1,7 @@
# CONTRIBUTING
Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contributing and engaging in the discussions.
## How to contribute to this project
First, fork this repository by clicking the fork button.
@@ -43,22 +45,21 @@ Finally, create a new pull request at <https://github.com/hugo-fixit/FixIt/pulls
| :-- | :-- |
| master | _The branch open to the public and release versions_ |
| dev | _The development branch of the next version_ |
| RC branch | _The release candidate branch of the next version, e.g. v0.2.12-RC_ |
| single feature | _The branch to enhancements or fixes_ |
### Merge events
| event | merge |
| :-- | :-- |
| release | **RC branch => master:** `--rebase` |
| release | **dev => master:** `--rebase` |
| PR | **others:master => master:** `--rebase` |
| single feature| **feature branch => RC branch:** `--merge` |
| single feature| **feature branch => dev/master:** `--merge` |
### Commit message
#### Format
`[{emoji} ]{type}[({module})]: {subject within 50 words}[ (#{issue/pull request})]`
`[{emoji} ]{type}[({scope})]: {subject within 50 words}[ (#{issue/pull request})]`
example:
@@ -73,15 +74,19 @@ example:
#### Message
| Emoji | Type | Example | Description (No Ambiguous) |
| :-------------------------------------------- | :------- | :----------------------------------------------------------- | :----------------------------------------------------------- |
| :tada: <br>:sparkles: | Feat | Feat: add {feature} | new feature |
| :truck: | | Feat: adjust/migrate {feature name}, {change details} | For the adjustment feature, it is necessary to describe the current situation (before) and after adjustment (after) |
| :fire: | | Feat: delete {feature name}, {deletion reason} | If the feature is deleted, the reason for deletion must be explained |
| :bug: <br>:construction: <br>:rotating_light: | Fix | Fix: fix {bug description} | Fix known bugs |
| :art: <br>:lipstick: <br>:pencil2: | Style | Style: Typesetting/CSS style {optimizing content} | Changes that do not affect code operation, such as code layout and style change |
| Emoji | Type | Example | Description (No Ambiguous) |
| :-------------------------------------------- | :------- | :----------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------- |
| :tada:<br>:sparkles: | Feat | Feat: add {feature} | new feature |
| :truck: | | Feat: adjust/migrate {feature name}, {change details} | For the adjustment feature, it is necessary to describe the current situation (before) and after adjustment (after) |
| :fire: | | Feat: delete {feature name}, {deletion reason} | If the feature is deleted, the reason for deletion must be explained |
| :bug: <br>:construction: <br>:rotating_light: | Fix | Fix: fix {bug description} | Fix known bugs |
| :art: <br>:lipstick: <br>:pencil2: | Style | Style: Typesetting/CSS style {optimizing content} | Changes that do not affect code operation, such as code layout and style change |
| :recycle: | Refactor | Refactor: override {feature name} | It is neither a new function nor a code change to fix a bug. Simply rewriting the code of a function does not affect the function result |
| :zap: | Perf | Perf: improve performance {function name}, {improve content} | Optimize code performance |
| :rewind: | Revert | Revert: restore version {commit message of restore version} | Restore the version of one commit |
| :pencil: <br>:pencil2: | Docs | Docs: revise comments/update documents | Adjustment of documents and notes |
| :wrench: | Chore | Chore: update plugin version | Changes in the construction process or auxiliary tools |
| :zap: | Perf | Perf: improve performance {function name}, {improve content} | Optimize code performance |
| :rewind: | Revert | Revert: restore version {commit message of restore version} | Restore the version of one commit |
| :pencil:<br>:pencil2: | Docs | Docs: revise comments/update documents | Adjustment of documents and notes |
| :wrench: | Chore | Chore: update plugin version | Changes in the construction process or auxiliary tools |
> [!note]
> The change log is automatically generated based on the commit message.\
> Use `Chore` type or add `(ignore)` scope to ignore including in.
+73 -43
View File
@@ -1,36 +1,57 @@
# FixIt Theme | Hugo
<!-- markdownlint-disable-file MD033 MD041 -->
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.png)
<div align="center">English | <a href="README.zh-cn.md">简体中文</a></div>
<a title="FixIt website" href="https://fixit.lruihao.cn"><img align="right" alt="FixIt logo" width="70" height="70" src="https://avatars.githubusercontent.com/u/110414864?s=200&v=4"></a>
# FixIt
[![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.123.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.132.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)
👉 English README | [简体中文说明](README.zh-cn.md)
> «FixIt» is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
[FixIt](https://github.com/hugo-fixit/FixIt) is a **clean**, **elegant** but **advanced** blog theme for [Hugo](https://gohugo.io/).
It is based on the original [LoveIt](https://github.com/dillonzq/LoveIt) Theme, [KeepIt](https://github.com/Fastbyte01/KeepIt) Theme and [LeaveIt](https://github.com/liuzc/LeaveIt) Theme.
It is based on the original [LoveIt Theme](https://github.com/dillonzq/LoveIt), [KeepIt Theme](https://github.com/Fastbyte01/KeepIt) and [LeaveIt Theme](https://github.com/liuzc/LeaveIt).[^1]
## Live Preview
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.webp)
<p align="center">
💟 <a href="https://fixit.lruihao.cn">Production</a> | ❇️ <a href="https://pre.fixit.lruihao.cn">Preview</a> | 🚼 <a href="https://demo.fixit.lruihao.cn">Demo</a> | 🆕 <a href="https://hugo-fixit.github.io/hugo-fixit-starter/">Starter</a>
<br>
<br>
More «FixIt» examples <a href="https://fixit.lruihao.cn/showcase/">here</a>.
</p>
## Getting started
## Documentation
- [Installation](https://fixit.lruihao.cn/documentation/installation/)
- [Getting Started](https://fixit.lruihao.cn/documentation/getting-started/)
- [Content Management](https://fixit.lruihao.cn/documentation/content-management/)
- [Advanced Usage](https://fixit.lruihao.cn/documentation/advanced/)
Head to the [Quick Start](https://fixit.lruihao.cn/documentation/getting-started/quick-start/) page for a step-by-step guide on how to create a new website with FixIt.
Alternatively, you can run the [documentation site](https://fixit.lruihao.cn/) locally. For more details, see [hugo-fixit/docs](https://github.com/hugo-fixit/docs).
Outline: [Installation](https://fixit.lruihao.cn/documentation/installation/) ➜ [Getting Started](https://fixit.lruihao.cn/documentation/getting-started/) ➜ [Content Management](https://fixit.lruihao.cn/documentation/content-management/) ➜ [Advanced Usage](https://fixit.lruihao.cn/documentation/advanced/)
## Template repository
- [hugo-fixit/hugo-fixit-start](https://github.com/hugo-fixit/hugo-fixit-start)
- [hugo-fixit/hugo-fixit-start1](https://github.com/hugo-fixit/hugo-fixit-start1)
- [hugo-fixit/docs](https://github.com/hugo-fixit/docs)
- [Lruihao/hugo-blog](https://github.com/Lruihao/hugo-blog)
Click the following links to generate a new repository with template:
## Who used FixIt
| Template repository | Generate link |
| :----------------------------------------- | :----------------------------: |
| [hugo-fixit/hugo-fixit-starter][starter] | [Click][starter:generate] |
| [hugo-fixit/hugo-fixit-starter1][starter1] | [Click][starter1:generate] |
| [hugo-fixit/docs][docs] | [Click][docs:generate] |
| [Lruihao/hugo-blog][lruihao-blog] | [Click][lruihao-blog:generate] |
To see this theme in action, here are some [live demo sites](https://fixit.lruihao.cn/friends/) which are rendered with **FixIt** theme.
[starter]: https://github.com/hugo-fixit/hugo-fixit-starter
[starter:generate]: https://github.com/hugo-fixit/hugo-fixit-starter/generate
[starter1]: https://github.com/hugo-fixit/hugo-fixit-starter1
[starter1:generate]: https://github.com/hugo-fixit/hugo-fixit-starter1/generate
[docs]: https://github.com/hugo-fixit/docs
[docs:generate]: https://github.com/hugo-fixit/docs/generate
[lruihao-blog]: https://github.com/Lruihao/hugo-blog
[lruihao-blog:generate]: https://github.com/Lruihao/hugo-blog/generate
<!-- ## Why choose FixIt -->
## Features
@@ -86,20 +107,21 @@ To see this theme in action, here are some [live demo sites](https://fixit.lruih
- Extended Markdown syntax for **ruby annotation**
- Extended Markdown syntax for **fraction**
- **Mathematical formula** supported by [KaTeX](https://katex.org/)
- **Diagrams** shortcode supported by [mermaid](https://github.com/knsv/mermaid)
- **Interactive data visualization** shortcode supported by [ECharts](https://echarts.apache.org/)
- **Diagrams** code fences extended and shortcode supported by [mermaid](https://github.com/knsv/mermaid)
- **Interactive data visualization** shortcode and code fences extended supported by [ECharts](https://echarts.apache.org/)
- **Timeline** code fences extended and shortcode supported
- **Mapbox** shortcode supported by [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js)
- **Music player** shortcode supported by [APlayer](https://github.com/MoePlayer/APlayer) and [MetingJS](https://github.com/metowolf/MetingJS)
- **Bilibili player** shortcode
- **Bilibili player** and **Douyin player** shortcode
- Kinds of **admonitions** shortcode
- **Custom style** shortcode
- **Custom script** shortcode
- Open more **custom blocks**
- **Animated typing** supported by [TypeIt](https://typeitjs.com/)
- **Cookie consent banner** supported by [cookieconsent](https://github.com/osano/cookieconsent)
- **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
@@ -123,30 +145,44 @@ FixIt supports the following languages:
- Russian
- Romanian
- Vietnamese
- Hindi
- [Contribute with a new language](https://github.com/hugo-fixit/FixIt/pulls)
[Languages Compatibility](https://fixit.lruihao.cn/documentation/basics/#language-compatibility)
## [Roadmap](https://github.com/hugo-fixit/FixIt/projects/1)
## Community
## [Changelog](/CHANGELOG.md)
All feedback is welcome! Head over to the [discussions][discussions], [Pull requests][pulls] and [issues][issues] tracker.
## Questions, ideas, bugs, pull requests
| Official Community | Description |
| :-------------------------- | :------------------------------ |
| [Discussions][discussions] | GitHub discussion forum |
| [FixIt WeChat group][wx-mp] | Follow and reply "FixIt" to get |
| [FixIt QQ group][qq-group] | QQ group: `814031017` |
| [Hugo FixIt Planet][zsxq] | Paid knowledge Planet |
All feedback is welcome! Head over to the [issues](https://github.com/hugo-fixit/FixIt/issues) or [discussions](https://github.com/hugo-fixit/FixIt/discussions) tracker.
Don't forget to leave a ⭐️ if you like this theme, thanks!
[discussions]: https://github.com/hugo-fixit/FixIt/discussions
[pulls]: https://github.com/hugo-fixit/FixIt/pulls
[issues]: https://github.com/hugo-fixit/FixIt/issues
[qq-group]: https://qm.qq.com/cgi-bin/qm/qr?k=awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM&jump_from=webapi
[zsxq]: https://t.zsxq.com/GgKEW
[wx-mp]: https://lruihao.cn/images/qr-wx-mp.webp
## Contributing
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for getting started with the contribution.
We welcome you to join the development of FixIt. Please see [contributing document](CONTRIBUTING.md). 🤗
Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contributing and engaging in the discussions.
Also, we welcome Issue or PR to our [official-components](https://github.com/hugo-fixit).
**When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change**.
## [Contributors](contributors.md)
> [!note]
> When contributing, please first discuss the change you wish to make via a discussion on this repository before making the actual change.
## Acknowledgements
Thanks to all the [contributors](https://github.com/hugo-fixit/FixIt/graphs/contributors) for their support!
<details>
<summary>Thanks to the authors of following resources included in the theme:</summary>
@@ -174,6 +210,7 @@ Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contrib
- [cookieconsent](https://github.com/osano/cookieconsent)
- [cell-watermark](https://github.com/Lruihao/watermark)
- [不蒜子](http://busuanzi.ibruce.info/)
- [Vercount](https://github.com/EvanNotFound/vercount)
- [pangu.js](https://github.com/vinta/pangu.js)
- [Artalk](https://artalk.js.org/)
- [Waline](https://waline.js.org/)
@@ -181,9 +218,8 @@ Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contrib
- [github-corners](https://github.com/tholman/github-corners)
- [giscus](https://giscus.app/)
- [crypto-js](https://github.com/brix/crypto-js)
- [vConsole](https://github.com/Tencent/vConsole)
- [eruda](https://github.com/liriliri/eruda)
- [pace](https://github.com/CodeByZach/pace)
- [xxhash-wasm](https://github.com/jungomi/xxhash-wasm)
</details>
@@ -199,20 +235,14 @@ Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contrib
FixIt is licensed under the **MIT** license. Check the [LICENSE file](LICENSE) for details.
## Author
Follow [Lruihao](https://github.com/Lruihao "Follow me on GitHub")
## Sponsor
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)
If you enjoy the theme, please consider buying me a coffee ☕️. Thanks!
- [PayPal](https://paypal.me/Lruihao)
- [Alipay](images/alipay.jpg)
- [Wechat](images/wechatpay.jpg)
- [Alipay](images/alipay.jpg)
- [PayPal](https://paypal.me/Lruihao)
Don't forget to leave a ⭐️ if you like this theme, thanks!
## Author
[^1]: The theme name is interesting: "leave it, keep it, love it, fix it". Appears and leaves, loves but cannot keep. Doesn't it look like that damn love and BUG? 🤣
[Lruihao](https://github.com/Lruihao "Follow me on GitHub")
+77 -47
View File
@@ -1,36 +1,57 @@
# FixIt 主题 | Hugo
<!-- markdownlint-disable-file MD033 MD041 -->
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.png)
<div align="center"><a href="README.md">English</a> | 简体中文</div>
<a title="FixIt 官网" href="https://fixit.lruihao.cn/zh-cn/"><img align="right" alt="FixIt logo" width="70" height="70" src="https://avatars.githubusercontent.com/u/110414864?s=200&v=4"></a>
# FixIt
[![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.123.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-%5E0.132.0-ff4088?style=flat&logo=hugo)](https://gohugo.io/)
[![License](https://img.shields.io/github/license/hugo-fixit/FixIt?style=flat)](/LICENSE)
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)
👉 [English README](README.md) | 简体中文说明
> «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) 主题。
它的原型基于 [LoveIt 主题](https://github.com/dillonzq/LoveIt)[KeepIt 主题](https://github.com/Fastbyte01/KeepIt) 和 [LeaveIt 主题](https://github.com/liuzc/LeaveIt)。[^1]
## 即时预览
![Hugo Theme FixIt](https://fixit.lruihao.cn/images/apple-devices-preview.webp)
<p align="center">
💟 <a href="https://fixit.lruihao.cn/zh-cn/">Production</a> | ❇️ <a href="https://pre.fixit.lruihao.cn/zh-cn/">Preview</a> | 🚼 <a href="https://demo.fixit.lruihao.cn">Demo</a> | 🆕 <a href="https://hugo-fixit.github.io/hugo-fixit-starter/">Starter</a>
<br>
<br>
更多 «FixIt» 的例子参见 <a href="https://fixit.lruihao.cn/zh-cn/showcase/">这里</a>。
</p>
## 主题文档
- [安装篇](https://fixit.lruihao.cn/zh-cn/documentation/installation/)
- [入门篇](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/)
- [内容管理](https://fixit.lruihao.cn/zh-cn/documentation/content-management/)
- [进阶篇](https://fixit.lruihao.cn/zh-cn/documentation/advanced/)
前往 [快速上手](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/quick-start/) 页面,了解如何使用 FixIt 主题创建一个新网站的详细步骤。
或者在本地运行 [文档站点](https://fixit.lruihao.cn/zh-cn/),更多细节详见 [hugo-fixit/docs](https://github.com/hugo-fixit/docs)
大纲:[安装篇](https://fixit.lruihao.cn/zh-cn/documentation/installation/) ➜ [入门篇](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/) ➜ [内容管理](https://fixit.lruihao.cn/zh-cn/documentation/content-management/) ➜ [进阶篇](https://fixit.lruihao.cn/zh-cn/documentation/advanced/)
## 模板仓库
- [hugo-fixit/hugo-fixit-start](https://github.com/hugo-fixit/hugo-fixit-start)
- [hugo-fixit/hugo-fixit-start1](https://github.com/hugo-fixit/hugo-fixit-start1)
- [hugo-fixit/docs](https://github.com/hugo-fixit/docs)
- [Lruihao/hugo-blog](https://github.com/Lruihao/hugo-blog)
点击以下链接使用模板生成一个新的仓库:
## 谁在用 FixIt
| 模板仓库 | 生成链接 |
| :----------------------------------------- | :-------------------------------: |
| [hugo-fixit/hugo-fixit-starter][starter] | [点击生成][starter:generate] |
| [hugo-fixit/hugo-fixit-starter1][starter1] | [点击生成][starter1:generate] |
| [hugo-fixit/docs][docs] | [点击生成][docs:generate] |
| [Lruihao/hugo-blog][lruihao-blog] | [点击生成][lruihao-blog:generate] |
为了直观地浏览主题特性,这里有一些基于 **FixIt** 主题渲染的 [预览网站](https://fixit.lruihao.cn/zh-cn/friends/)。
[starter]: https://github.com/hugo-fixit/hugo-fixit-starter
[starter:generate]: https://github.com/hugo-fixit/hugo-fixit-starter/generate
[starter1]: https://github.com/hugo-fixit/hugo-fixit-starter1
[starter1:generate]: https://github.com/hugo-fixit/hugo-fixit-starter1/generate
[docs]: https://github.com/hugo-fixit/docs
[docs:generate]: https://github.com/hugo-fixit/docs/generate
[lruihao-blog]: https://github.com/Lruihao/hugo-blog
[lruihao-blog:generate]: https://github.com/Lruihao/hugo-blog/generate
<!-- ## 为什么选择 FixIt -->
## 特性
@@ -86,25 +107,26 @@
- 支持**上标注释**的扩展 Markdown 语法
- 支持**分数**的扩展 Markdown 语法
- 支持基于 [KaTeX](https://katex.org/) 的**数学公式**
- 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** shortcode
- 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** shortcode
- 支持基于 [mermaid](https://github.com/knsv/mermaid) 的**图表** 代码块扩展语法和 shortcode
- 支持基于 [ECharts](https://echarts.apache.org/) 的**交互式数据可视化** 代码块扩展语法和 shortcode
- 支持 **Timeline** 的代码块扩展语法和 shortcode
- 支持基于 [Mapbox GL JS](https://docs.mapbox.com/mapbox-gl-js) 的 **Mapbox** shortcode
- 支持基于 [APlayer](https://github.com/MoePlayer/APlayer) 和 [MetingJS](https://github.com/metowolf/MetingJS) 的**音乐播放器** shortcode
- 支持 **Bilibili 视频** shortcode
- 支持 **Bilibili 视频****抖音视频** shortcode
- 支持多种**注释**的 shortcode
- 支持**自定义样式**的 shortcode
- 支持**自定义脚本**的 shortcode
- 支持**自定义模板块**
- 支持基于 [TypeIt](https://typeitjs.com/) 的**打字动画** shortcode
- 支持基于 [cookieconsent](https://github.com/osano/cookieconsent) 的 **Cookie 许可横幅**
- 支持基于 [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 主题旨在在**简洁性**和**可扩展性**之间取得平衡。为此,我们开发了一系列额外的 [Hugo 主题组件](https://fixit.lruihao.cn/zh-cn/components/) 供用户选择。
## 多语言和国际化
@@ -123,34 +145,48 @@ FixIt 支持下列语言:
- 俄语
- 罗马尼亚语
- 越南语
- 印地语
- [贡献一种新的语言](https://github.com/hugo-fixit/FixIt/pulls)
[语言兼容性](https://fixit.lruihao.cn/zh-cn/theme-documentation-basics/#language-compatibility)
## [路线图](https://github.com/hugo-fixit/FixIt/projects/1)
## 镜像
## [更新日志](/CHANGELOG.md)
Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
## 问题、想法、bugs 和 PRs
## 社区支持
所有的反馈都是欢迎的!详见 [议题](https://github.com/hugo-fixit/FixIt/issues) 或者 [讨论](https://github.com/hugo-fixit/FixIt/discussions) 或者加入 QQ 群:`814031017`
所有的反馈都是欢迎的!详见 [Discussions][discussions]、[Pull requests][pulls] 和 [Issues][issues]
| 官方社区 | 说明 |
| :--------------------------------- | :------------------------------ |
| [Discussions][discussions] | GitHub 讨论区 |
| [FixIt 主题交流群(微信)][wx-mp] | 关注「菠菜眾長」回复“FixIt”获取 |
| [FixIt 主题交流群(QQ][qq-group] | QQ 群:`814031017` |
| [Hugo FixIt 星球][zsxq] | 付费知识星球 |
如果你喜欢这个主题,别忘了留下一颗 ⭐️ 哦,谢谢!
[discussions]: https://github.com/hugo-fixit/FixIt/discussions
[pulls]: https://github.com/hugo-fixit/FixIt/pulls
[issues]: https://github.com/hugo-fixit/FixIt/issues
[qq-group]: https://qm.qq.com/cgi-bin/qm/qr?k=awbwdTtSQ_-H5QGzeJxdWgv6JMbNehNM&jump_from=webapi
[zsxq]: https://t.zsxq.com/GgKEW
[wx-mp]: https://lruihao.cn/images/qr-wx-mp.webp
## 参与贡献
请参阅 [CONTRIBUTING.md](CONTRIBUTING.md) 以了解贡献该项目的基本信息。
我们欢迎你加入 FixIt 的开发,贡献出你的一份力量。请看开源 [贡献指南](CONTRIBUTING.md)。 🤗
确保在贡献和参与讨论时遵守 [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
你也可以随时向我们的 [官方插件](https://github.com/hugo-fixit) 提交 Issue 或 Pull Request
**贡献时,请先通过此存储库上的问题讨论你希望进行的更改,然后再进行实际更改**
## [所有贡献者](contributors.md)
## 镜像
- Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
> [!note]
> 在贡献时,请先通过此存储库上的讨论来讨论你希望进行的更改,然后再进行实际更改。
## 致谢
感谢 [所有贡献者](https://github.com/hugo-fixit/FixIt/graphs/contributors) 的支持!
<details>
<summary>FixIt 主题中用到了以下项目,感谢它们的作者:</summary>
@@ -178,6 +214,7 @@ FixIt 支持下列语言:
- [cookieconsent](https://github.com/osano/cookieconsent)
- [cell-watermark](https://github.com/Lruihao/watermark)
- [不蒜子](http://busuanzi.ibruce.info/)
- [Vercount](https://github.com/EvanNotFound/vercount)
- [pangu.js](https://github.com/vinta/pangu.js)
- [Artalk](https://artalk.js.org/)
- [Waline](https://waline.js.org/)
@@ -185,9 +222,8 @@ FixIt 支持下列语言:
- [github-corners](https://github.com/tholman/github-corners)
- [giscus](https://giscus.app/zh-CN)
- [crypto-js](https://github.com/brix/crypto-js)
- [vConsole](https://github.com/Tencent/vConsole)
- [eruda](https://github.com/liriliri/eruda)
- [pace](https://github.com/CodeByZach/pace)
- [xxhash-wasm](https://github.com/jungomi/xxhash-wasm)
</details>
@@ -203,20 +239,14 @@ FixIt 支持下列语言:
FixIt 根据 **MIT** 许可协议授权。更多信息请查看 [LICENSE 文件](LICENSE)。
## 作者
Follow [Lruihao](https://github.com/Lruihao "在 GitHub 上关注我")
## 赞助支持
[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/hugo-fixit/FixIt)
如果你喜爱这个主题,请考虑给我买杯咖啡 ☕️,谢谢!
- [PayPal](https://paypal.me/Lruihao)
- [支付宝](images/alipay.jpg)
- [微信支付](images/wechatpay.jpg)
- [支付宝](images/alipay.jpg)
- [PayPal](https://paypal.me/Lruihao)
如果你喜欢这个主题,别忘了留下一颗 ⭐️ 哦,谢谢!
## 作者
[^1]: 主题名称趣谈:“leave it, keep itlove itfix it”。出现又离开,爱而不得。这像不像那该死的爱情和 BUG 呢?🤣
[Lruihao](https://github.com/Lruihao "在 GitHub 上关注我")
+16 -7
View File
@@ -11,7 +11,7 @@ keywords:
comment: false
---
<!-- When you set data `friends.yml` in `yourProject/data/` directory, it will be automatically loaded here. -->
<!-- The `friends.yml` file placed in the `yourProject/data/` directory will be loaded automatically here. -->
---
@@ -19,18 +19,27 @@ comment: false
## Base info
```yaml
- nickname: Lruihao
avatar: https://lruihao.cn/images/avatar.jpg
url: https://lruihao.cn
description: Lruihao's Note
```
- avatar: https://lruihao.cn/images/avatar.jpg
- url: https://lruihao.cn
- description: Lruihao's Note
## Friendly Reminder
Comment like this:
````markdown
```yaml
- nickname: <your nickname>
avatar: <your avatar>
url: <your site link>
description: <description of your site>
```
````
{{< admonition info "Notice" true >}}
1. If you want to exchange link, please leave a comment in the above format. (personal non-commercial blogs / websites only)
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.
+4 -2
View File
@@ -20,8 +20,8 @@ categories:
- draft
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRss: false
hiddenFromRelated: false
hiddenFromFeed: false
summary:
resources:
- name: featured-image
@@ -40,4 +40,6 @@ repost:
# See details front matter: https://fixit.lruihao.cn/documentation/content-management/introduction/#front-matter
---
<!--more-->
<!--more-->
<!-- Place resource files in the current article directory and reference them using relative paths, like this: `![alt](images/screenshot.jpg)`. -->
+1 -1
View File
@@ -20,8 +20,8 @@ categories:
- draft
hiddenFromHomePage: false
hiddenFromSearch: false
hiddenFromRss: false
hiddenFromRelated: false
hiddenFromFeed: false
summary:
resources:
- name: featured-image
+1 -33
View File
@@ -17,21 +17,6 @@ html {
}
}
/* scrollbar, only support webkit */
::-webkit-scrollbar {
width: 0.5rem;
height: 0.5rem;
}
::-webkit-scrollbar-thumb {
background-color: $scrollbar-color;
@include border-radius($global-border-radius);
&:hover {
background-color: $scrollbar-hover-color;
}
}
::selection {
background-color: $selection-color;
@@ -43,26 +28,8 @@ html {
body {
background-color: $global-background-color;
color: $global-font-color;
scrollbar-color: auto;
@include overflow-wrap(break-word);
&::-webkit-scrollbar {
width: 0.75rem;
height: 0.75rem;
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: transparent;
background-clip: content-box;
border: 2px solid transparent;
@include border-radius(0.5rem);
}
&[data-scroll]::-webkit-scrollbar-thumb {
background-color: $scrollbar-color;
}
&[data-theme='dark'] {
color: $global-font-color-dark;
background-color: $global-background-color-dark;
@@ -89,6 +56,7 @@ abbr[title] {
@include link(true, true);
@import '../_partials/scrollbar';
@import '../_partials/mask';
@import '../_partials/img';
@import '../_partials/icon';
-6
View File
@@ -21,12 +21,6 @@
.d-none {
display: none !important;
}
.d-none-desktop {
display: none;
}
.d-none-mobile {
display: block;
}
.ms-1,
.mx-1 {
+16 -8
View File
@@ -58,6 +58,17 @@ header {
margin: 0;
padding: 0;
.menu-item-divider {
list-style: none;
margin: 0.25rem 0.5rem;
height: 1px;
background-color: $menu-border-color;
[data-theme='dark'] & {
background-color: $menu-border-color-dark;
}
}
.menu-item {
list-style: none;
@@ -262,20 +273,20 @@ header {
display: none;
top: calc(#{$header-height} - 0.75rem);
border-radius: $global-border-radius;
border: 1px solid $global-border-color;
border: 1px solid $menu-border-color;
background-color: $header-background-color;
@include transition(box-shadow 0.3s ease);
@include box-shadow(0 0 1.5rem 0 rgba(0, 0, 0, 0.1));
[data-theme='dark'] & {
background-color: $header-background-color-dark;
border-color: $global-border-color-dark;
border-color: $menu-border-color-dark;
@include box-shadow(0 0 1.5rem 0 rgba(255, 255, 255, 0.1));
}
.menu-item {
height: $header-height*0.5;
line-height: $header-height*0.5;
height: $submenu-height;
line-height: $submenu-height;
max-width: 15rem;
white-space: nowrap;
text-overflow: ellipsis;
@@ -366,14 +377,11 @@ header {
overflow-y: overlay;
max-height: 70vh;
@include box-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.1));
@include scrollbar-width(none, 0);
[data-theme='dark'] & {
@include box-shadow(0 0.125rem 0.25rem rgba(255, 255, 255, 0.1));
}
&::-webkit-scrollbar {
width: 0;
}
.search-wrapper {
display: flex;
+11 -10
View File
@@ -1,9 +1,9 @@
@media only screen and (min-width: 1441px) {
%page-style {
width: 60%;
width: ROUND(60%, 2px);
[data-page-style='wide'] & {
width: 64%;
width: ROUND(64%, 2px);
}
[data-page-style='narrow'] & {
@@ -14,20 +14,20 @@
@media only screen and (max-width: 1440px) {
%page-style {
width: 56%;
width: ROUND(56%, 2px);
[data-page-style='wide'] & {
width: 60%;
width: ROUND(60%, 2px);
}
}
}
@media only screen and (max-width: 1200px) {
%page-style {
width: 52%;
width: ROUND(52%, 2px);
[data-page-style='wide'] & {
width: 56%;
width: ROUND(56%, 2px);
}
}
@@ -42,7 +42,7 @@
@media only screen and (max-width: 960px) {
%page-style {
width: 80% !important;
width: ROUND(80%, 2px) !important;
}
aside {
@@ -58,8 +58,10 @@
}
}
@media only screen and (min-width: 681px) {
.d-none-desktop {
display: none;
}
.breadcrumb-container.sticky {
body:not([data-header-desktop='sticky']) & {
top: 0;
@@ -80,8 +82,7 @@
display: none;
}
#header-mobile,
.d-none-desktop {
#header-mobile {
display: block;
}
+48
View File
@@ -18,3 +18,51 @@
-webkit-animation-name: #{$prefix}pulse !important;
animation-name: #{$prefix}pulse !important;
}
/**
* After the CSS round() function exceeds 90% browser support in the future, this code can be removed
* See https://caniuse.com/mdn-css_types_round
*/
@supports not (width: ROUND(60%, 2px)) {
@media only screen and (min-width: 1441px) {
%page-style {
width: 60%;
[data-page-style='wide'] & {
width: 64%;
}
[data-page-style='narrow'] & {
max-width: 800px;
}
}
}
@media only screen and (max-width: 1440px) {
%page-style {
width: 56%;
[data-page-style='wide'] & {
width: 60%;
}
}
}
@media only screen and (max-width: 1200px) {
%page-style {
width: 52%;
[data-page-style='wide'] & {
width: 56%;
}
}
}
@media only screen and (max-width: 960px) {
%page-style {
width: 80% !important;
}
}
@media only screen and (max-width: 680px) {
%page-style {
width: 100% !important;
}
}
}
+7
View File
@@ -15,6 +15,13 @@
// hr style
--#{$prefix}hr-background-color: #{darken($global-border-color, 5%)};
--#{$prefix}hr-before-color: #{lighten($single-link-hover-color, 4%)};
// Scrollbar related variables
--#{$prefix}scrollbar-thumb-color: #{$scrollbar-color};
--#{$prefix}scrollbar-thumb-hover-color: #{$scrollbar-hover-color};
--#{$prefix}scrollbar-track-color: transparent;
--#{$prefix}scrollbar-width: thin;
--#{$prefix}scrollbar-width-legacy: 12px;
}
// Dark theme
+1
View File
@@ -2,4 +2,5 @@
@import '_link';
@import '_blur';
@import '_details';
@import '_scrollbar-width';
@import '_z-index';
+4
View File
@@ -0,0 +1,4 @@
@mixin scrollbar-width($width: thin, $widthLegacy: 12px) {
--#{$prefix}scrollbar-width: #{$width};
--#{$prefix}scrollbar-width-legacy: #{$widthLegacy};
}
+9 -9
View File
@@ -73,7 +73,7 @@
}
.featured-image {
margin: 0.5rem 0 1rem 0;
margin: 1rem 0;
img {
display: block;
@@ -131,6 +131,7 @@
}
.content {
margin-block: 1rem;
> h1,
> h2 {
font-size: 1.5em;
@@ -170,7 +171,8 @@
font-size: inherit;
}
&:hover {
&:hover,
&:target {
> .heading-mark {
opacity: 1;
}
@@ -257,13 +259,10 @@
.table-wrapper {
overflow-x: auto;
--#{$prefix}scrollbar-thumb-color: #{$table-background-color};
&::-webkit-scrollbar {
background-color: $table-background-color;
[data-theme='dark'] & {
background-color: $table-background-color-dark;
}
[data-theme='dark'] & {
--#{$prefix}scrollbar-thumb-color: #{$table-background-color-dark};
}
> table {
@@ -399,7 +398,7 @@
@include link(false, true);
}
sup[id^='fnref:']:has(.footnote-ref) {
sup[id^='fnref']:has(.footnote-ref) {
padding: 2px 4px;
background-color: rgba(238, 238, 238, 0.7);
color: #555555;
@@ -471,6 +470,7 @@
}
}
@import '../_partials/_single/alert';
@import '../_partials/_single/code';
@import '../_shortcodes';
}
+16
View File
@@ -0,0 +1,16 @@
// Color map of alert [$type $border-color $color, ... ]
$alert-color-map:
'note' #0969da #0969da,
'tip' #1a7f37 #1a7f37,
'important' #8250df #8250df,
'warning' #bf8700 #9a6700,
'caution' #cf222e #d1242f,
!default;
$alert-color-map-dark:
'note' #316dca #478be6,
'tip' #347d39 #57ab5a,
'important' #8256d0 #986ee2,
'warning' #966600 #c69026,
'caution' #c93c37 #e5534b,
!default;
+3 -3
View File
@@ -180,8 +180,8 @@ $code-type-map: (
"llvm": "LLVM",
"lua": "Lua",
"mako": "Mako",
"md": "markdown",
"mkd": "markdown",
"md": "Markdown",
"mkd": "Markdown",
"mason": "Mason",
"mathematica": "Mathematica",
"mma": "Mathematica",
@@ -368,6 +368,6 @@ $code-type-map: (
"zed": "Zed",
"zig": "Zig",
// Custom code type
"markdown": "markdown",
"markdown": "Markdown",
"yml": "YAML"
) !default;
+36
View File
@@ -0,0 +1,36 @@
/* Modern browsers with `scrollbar-*` support (high priority) */
@supports (scrollbar-width: auto) {
* {
scrollbar-color: var(--#{$prefix}scrollbar-thumb-color) var(--#{$prefix}scrollbar-track-color);;
scrollbar-width: var(--#{$prefix}scrollbar-width);
}
}
/* Legacy browsers with `::-webkit-scrollbar-*` support */
::-webkit-scrollbar {
height: var(--#{$prefix}scrollbar-width-legacy);
width: var(--#{$prefix}scrollbar-width-legacy);
overflow: visible;
}
::-webkit-scrollbar-button {
height: 0;
width: 0;
}
::-webkit-scrollbar-corner {
background-color: var(--#{$prefix}scrollbar-track-color);
}
::-webkit-scrollbar-thumb {
background-color: var(--#{$prefix}scrollbar-thumb-color);
&:hover {
background-color: var(--#{$prefix}scrollbar-thumb-hover-color);
}
}
::-webkit-scrollbar-track {
background-color: var(--#{$prefix}scrollbar-track-color);
}
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-track {
background-clip: padding-box;
border: 3px solid transparent;
border-radius: 100px;
}
+44
View File
@@ -0,0 +1,44 @@
.alert {
padding: 0.5rem 1rem;
margin-block: 1rem;
color: inherit;
border-left: 0.25em solid var(--#{$prefix}alert-border-color);
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
.alert-title {
display: flex;
font-weight: 500;
align-items: center;
line-height: 1;
margin-bottom: 1rem;
color: var(--#{$prefix}alert-color);
> svg.icon {
width: initial;
height: initial;
margin-right: 0.5rem;
}
}
@each $type, $border-color, $color in $alert-color-map {
&.alert-#{$type} {
--#{$prefix}alert-border-color: #{$border-color};
--#{$prefix}alert-color: #{$color};
}
}
[data-theme='dark'] & {
@each $type, $border-color, $color in $alert-color-map-dark {
&.alert-#{$type} {
--#{$prefix}alert-border-color: #{$border-color};
--#{$prefix}alert-color: #{$color};
}
}
}
}
+24 -11
View File
@@ -58,6 +58,7 @@ pre:not(.mermaid[data-processed='true']) {
font-family: $code-font-family;
.table-wrapper {
--#{$prefix}scrollbar-thumb-color: initial;
> table,
> table thead,
> table tr,
@@ -78,6 +79,7 @@ pre:not(.mermaid[data-processed='true']) {
position: relative;
.code-header {
--#{$prefix}bg-code-header: #{darken($code-background-color, 3%)};
display: flex;
justify-content: space-between;
align-items: center;
@@ -87,13 +89,20 @@ pre:not(.mermaid[data-processed='true']) {
font-weight: bold;
line-height: 1.4em;
color: $code-info-color;
background-color: darken($code-background-color, 3%);
background-color: var(--#{$prefix}bg-code-header);
@include border-radius($global-border-radius);
@include transition(border-radius 0.2s ease);
// delayed loading table-wrapper
& + .table-wrapper {
max-height: 0;
@include border-radius(0 0 $global-border-radius $global-border-radius);
@include details-transition-open;
}
[data-theme='dark'] & {
color: $code-info-color-dark;
background-color: darken($code-background-color-dark, 6%);
--#{$prefix}bg-code-header: #{darken($code-background-color-dark, 3%)};
}
&:hover {
@@ -119,6 +128,13 @@ pre:not(.mermaid[data-processed='true']) {
position: absolute;
left: 50%;
transform: translateX(-50%);
background-color: var(--#{$prefix}bg-code-header);
padding-inline: 1em;
max-width: 80%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@include z-index(0, 1);
}
}
@@ -155,10 +171,8 @@ pre:not(.mermaid[data-processed='true']) {
// delayed loading table-wrapper
.table-wrapper {
max-height: 0;
overflow: hidden;
@include border-radius(0 0 $global-border-radius $global-border-radius);
@include details-transition-open;
@include border-radius($global-border-radius);
}
table {
@@ -217,11 +231,11 @@ pre:not(.mermaid[data-processed='true']) {
&.open {
.code-header {
background-color: darken($code-background-color, 6%);
--#{$prefix}bg-code-header: #{darken($code-background-color, 6%)};
@include border-radius($global-border-radius $global-border-radius 0 0);
[data-theme='dark'] & {
background-color: darken($code-background-color-dark, 3%);
--#{$prefix}bg-code-header: #{darken($code-background-color-dark, 6%)};
}
}
@@ -348,12 +362,11 @@ pre:not(.mermaid[data-processed='true']) {
}
.table-wrapper {
.highlight,
&::-webkit-scrollbar {
background-color: #f6f8fa;
.highlight {
background-color: $code-background-color;
[data-theme='dark'] & {
background-color: #2d333b;
background-color: $code-background-color-dark;
}
}
}
@@ -2,7 +2,7 @@
.collection-card {
font-size: 0.875rem;
background-color: darken($global-background-color, 3%);
margin-block: 2rem -1rem;
margin-block: 1rem;
padding: 1rem 1.25rem;
position: relative;
@include border-radius($global-border-radius * 1.5);
@@ -127,6 +127,7 @@
.collection-name {
flex-grow: 1;
font-weight: bold;
font-size: $collection-title-font-size;
&::before {
content: attr(data-collections) '';
@@ -146,7 +147,7 @@
}
.collection-content {
font-size: $toc-content-font-size;
font-size: $collection-list-font-size;
background-color: darken($global-background-color, 2%);
[data-theme='dark'] & {
@@ -161,10 +162,7 @@
list-style: none;
overflow-y: scroll;
max-height: 60vh;
&::-webkit-scrollbar {
width: 0;
}
@include scrollbar-width(none, 0);
.collection-item > a::before,
.collection-item > span::before {
@@ -1,12 +1,16 @@
.fixit-decryptor-container {
font-family: $global-font-family;
text-align: center;
margin-top: 3rem;
margin-block: var(--fixit-decryptor-margin-block);
.fixit-decryptor-loading {
vertical-align: middle;
}
.fixit-decryptor-input,
.fixit-decryptor-btn,
.fixit-encryptor-btn {
display: inline-block;
display: none;
box-sizing: border-box;
outline: none;
color: $global-font-color;
@@ -60,12 +64,33 @@
background-color: $header-background-color-dark;
}
}
.fixit-encryptor-btn {
display: none;
}
}
// fixit-encryptor shortcodes
fixit-encryptor {
&.initialized > .fixit-decryptor-container {
.fixit-decryptor-input,
.fixit-decryptor-btn {
display: inline-block;
}
.fixit-decryptor-loading {
display: none;
}
}
cipher-text {
display: none !important;
}
}
// fixit-encryptor for for the encrypted pages
article fixit-encryptor {
.fixit-decryptor-container {
margin-top: 1rem;
--fixit-decryptor-margin-block: 2rem;
}
&.decrypted > .fixit-decryptor-container {
.fixit-decryptor-loading,
@@ -73,6 +98,20 @@ fixit-encryptor {
.fixit-decryptor-btn {
display: none;
}
.fixit-encryptor-btn {
display: inline-block;
}
}
}
// fixit-encryptor shortcodes
#content fixit-encryptor {
.fixit-decryptor-container {
--fixit-decryptor-margin-block: 1rem;
}
&.decrypted > .fixit-decryptor-container {
display: none;
}
}
@@ -1,73 +1,79 @@
/**
* Theme: GitHub Dark Dimmed
* Description: Dark Dimmed theme as seen on github.com
* Author: github.com
* Maintainer: https://github.com/hugo-fixit/FixIt
* Updated: 2022-03-01
* GitHub Dark Dimmed
* Copyright (c) 2012 - current GitHub, Inc.
* Licensed under MIT (https://github.com/primer/github-syntax-theme-generator/blob/master/LICENSE)
* Maintained by @Lruihao for FixIt theme
* Created on 2022-03-01
* Updated on 2024-07-14
*/
& {
--color-fg-default: #adbac7;
--color-prettylights-syntax-comment: #768390;
--color-prettylights-syntax-constant: #6cb6ff;
--color-prettylights-syntax-entity: #dcbdfb;
--color-prettylights-syntax-storage-modifier-import: #adbac7;
--color-prettylights-syntax-entity-tag: #8ddb8c;
--color-prettylights-syntax-keyword: #f47067;
--color-prettylights-syntax-string: #96d0ff;
--color-prettylights-syntax-variable: #f69d50;
--color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--color-prettylights-syntax-invalid-illegal-bg: #922323;
--color-prettylights-syntax-carriage-return-text: #cdd9e5;
--color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--color-prettylights-syntax-string-regexp: #8ddb8c;
--color-prettylights-syntax-markup-list: #eac55f;
--color-prettylights-syntax-markup-heading: #316dca;
--color-prettylights-syntax-markup-italic: #adbac7;
--color-prettylights-syntax-markup-bold: #adbac7;
--color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--color-prettylights-syntax-markup-deleted-bg: #78191b;
--color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--color-prettylights-syntax-markup-inserted-bg: #1b4721;
--color-prettylights-syntax-markup-changed-text: #ffddb0;
--color-prettylights-syntax-markup-changed-bg: #682d0f;
--color-prettylights-syntax-markup-ignored-text: #adbac7;
--color-prettylights-syntax-markup-ignored-bg: #255ab2;
--color-prettylights-syntax-meta-diff-range: #dcbdfb;
--color-prettylights-syntax-brackethighlighter-angle: #768390;
--color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
--color-prettylights-syntax-constant-other-reference-link: #96d0ff;
// Blob colors
--#{$prefix}color-blob-num: #778491;
--#{$prefix}color-blob-code-inner: #c5d1de;
// Syntax colors
--#{$prefix}color-prettylights-syntax-comment: #768390;
--#{$prefix}color-prettylights-syntax-constant: #6cb6ff;
--#{$prefix}color-prettylights-syntax-constant-other-reference-link: #96d0ff;
--#{$prefix}color-prettylights-syntax-entity: #dcbdfb;
--#{$prefix}color-prettylights-syntax-storage-modifier-import: #adbac7;
--#{$prefix}color-prettylights-syntax-entity-tag: #8ddb8c;
--#{$prefix}color-prettylights-syntax-keyword: #f47067;
--#{$prefix}color-prettylights-syntax-string: #96d0ff;
--#{$prefix}color-prettylights-syntax-variable: #f69d50;
--#{$prefix}color-prettylights-syntax-brackethighlighter-unmatched: #e5534b;
--#{$prefix}color-prettylights-syntax-brackethighlighter-angle: #768390;
--#{$prefix}color-prettylights-syntax-invalid-illegal-text: #cdd9e5;
--#{$prefix}color-prettylights-syntax-invalid-illegal-bg: #922323;
--#{$prefix}color-prettylights-syntax-carriage-return-text: #cdd9e5;
--#{$prefix}color-prettylights-syntax-carriage-return-bg: #ad2e2c;
--#{$prefix}color-prettylights-syntax-string-regexp: #8ddb8c;
--#{$prefix}color-prettylights-syntax-markup-list: #eac55f;
--#{$prefix}color-prettylights-syntax-markup-heading: #316dca;
--#{$prefix}color-prettylights-syntax-markup-italic: #adbac7;
--#{$prefix}color-prettylights-syntax-markup-bold: #adbac7;
--#{$prefix}color-prettylights-syntax-markup-deleted-text: #ffd8d3;
--#{$prefix}color-prettylights-syntax-markup-deleted-bg: #78191b;
--#{$prefix}color-prettylights-syntax-markup-inserted-text: #b4f1b4;
--#{$prefix}color-prettylights-syntax-markup-inserted-bg: #1b4721;
--#{$prefix}color-prettylights-syntax-markup-changed-text: #ffddb0;
--#{$prefix}color-prettylights-syntax-markup-changed-bg: #682d0f;
--#{$prefix}color-prettylights-syntax-markup-ignored-text: #adbac7;
--#{$prefix}color-prettylights-syntax-markup-ignored-bg: #255ab2;
--#{$prefix}color-prettylights-syntax-meta-diff-range: #dcbdfb;
--#{$prefix}color-prettylights-syntax-sublimelinter-gutter-mark: #545d68;
.blob-num,
.blob-num {
color: var(--#{$prefix}color-blob-num);
}
.blob-code-inner {
color: val(--color-fg-default);
color: var(--#{$prefix}color-blob-code-inner);
}
.pl-c /* comment, punctuation.definition.comment, string.comment */ {
color: var(--color-prettylights-syntax-comment);
color: var(--#{$prefix}color-prettylights-syntax-comment);
}
.pl-c1 /* constant, entity.name.constant, variable.other.constant, variable.language, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header, meta.output */,
.pl-s .pl-v /* string variable */ {
color: var(--color-prettylights-syntax-constant);
color: var(--#{$prefix}color-prettylights-syntax-constant);
}
.pl-e /* entity */,
.pl-en /* entity.name */ {
color: var(--color-prettylights-syntax-entity);
color: var(--#{$prefix}color-prettylights-syntax-entity);
}
.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
.pl-s .pl-s1 /* string source */ {
color: var(--color-prettylights-syntax-storage-modifier-import);
color: var(--#{$prefix}color-prettylights-syntax-storage-modifier-import);
}
.pl-ent /* entity.name.tag, markup.quote */ {
color: var(--color-prettylights-syntax-entity-tag);
color: var(--#{$prefix}color-prettylights-syntax-entity-tag);
}
.pl-k /* keyword, storage, storage.type */ {
color: var(--color-prettylights-syntax-keyword);
color: var(--#{$prefix}color-prettylights-syntax-keyword);
}
.pl-s /* string */,
@@ -77,26 +83,26 @@
.pl-sr .pl-cce /* string.regexp constant.character.escape */,
.pl-sr .pl-sre /* string.regexp source.ruby.embedded */,
.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ {
color: var(--color-prettylights-syntax-string);
color: var(--#{$prefix}color-prettylights-syntax-string);
}
.pl-v /* variable */,
.pl-smw /* sublimelinter.mark.warning */ {
color: var(--color-prettylights-syntax-variable);
color: var(--#{$prefix}color-prettylights-syntax-variable);
}
.pl-bu /* invalid.broken, invalid.deprecated, invalid.unimplemented, message.error, brackethighlighter.unmatched, sublimelinter.mark.error */ {
color: var(--color-prettylights-syntax-brackethighlighter-unmatched);
color: var(--#{$prefix}color-prettylights-syntax-brackethighlighter-unmatched);
}
.pl-ii /* invalid.illegal */ {
color: var(--color-prettylights-syntax-invalid-illegal-text);
background-color: var(--color-prettylights-syntax-invalid-illegal-bg);
color: var(--#{$prefix}color-prettylights-syntax-invalid-illegal-text);
background-color: var(--#{$prefix}color-prettylights-syntax-invalid-illegal-bg);
}
.pl-c2 /* carriage-return */ {
color: var(--color-prettylights-syntax-carriage-return-text);
background-color: var(--color-prettylights-syntax-carriage-return-bg);
color: var(--#{$prefix}color-prettylights-syntax-carriage-return-text);
background-color: var(--#{$prefix}color-prettylights-syntax-carriage-return-bg);
}
.pl-c2::before /* carriage-return */ {
@@ -105,65 +111,65 @@
.pl-sr .pl-cce /* string.regexp constant.character.escape */ {
font-weight: bold;
color: var(--color-prettylights-syntax-string-regexp);
color: var(--#{$prefix}color-prettylights-syntax-string-regexp);
}
.pl-ml /* markup.list */ {
color: var(--color-prettylights-syntax-markup-list);
color: var(--#{$prefix}color-prettylights-syntax-markup-list);
}
.pl-mh /* markup.heading */,
.pl-mh .pl-en /* markup.heading entity.name */,
.pl-ms /* meta.separator */ {
font-weight: bold;
color: var(--color-prettylights-syntax-markup-heading);
color: var(--#{$prefix}color-prettylights-syntax-markup-heading);
}
.pl-mi /* markup.italic */ {
font-style: italic;
color: var(--color-prettylights-syntax-markup-italic);
color: var(--#{$prefix}color-prettylights-syntax-markup-italic);
}
.pl-mb /* markup.bold */ {
font-weight: bold;
color: var(--color-prettylights-syntax-markup-bold);
color: var(--#{$prefix}color-prettylights-syntax-markup-bold);
}
.pl-md /* markup.deleted, meta.diff.header.from-file, punctuation.definition.deleted */ {
color: var(--color-prettylights-syntax-markup-deleted-text);
background-color: var(--color-prettylights-syntax-markup-deleted-bg);
color: var(--#{$prefix}color-prettylights-syntax-markup-deleted-text);
background-color: var(--#{$prefix}color-prettylights-syntax-markup-deleted-bg);
}
.pl-mi1 /* markup.inserted, meta.diff.header.to-file, punctuation.definition.inserted */ {
color: var(--color-prettylights-syntax-markup-inserted-text);
background-color: var(--color-prettylights-syntax-markup-inserted-bg);
color: var(--#{$prefix}color-prettylights-syntax-markup-inserted-text);
background-color: var(--#{$prefix}color-prettylights-syntax-markup-inserted-bg);
}
.pl-mc /* markup.changed, punctuation.definition.changed */ {
color: var(--color-prettylights-syntax-markup-changed-text);
background-color: var(--color-prettylights-syntax-markup-changed-bg);
color: var(--#{$prefix}color-prettylights-syntax-markup-changed-text);
background-color: var(--#{$prefix}color-prettylights-syntax-markup-changed-bg);
}
.pl-mi2 /* markup.ignored, markup.untracked */ {
color: var(--color-prettylights-syntax-markup-ignored-text);
background-color: var(--color-prettylights-syntax-markup-ignored-bg);
color: var(--#{$prefix}color-prettylights-syntax-markup-ignored-text);
background-color: var(--#{$prefix}color-prettylights-syntax-markup-ignored-bg);
}
.pl-mdr /* meta.diff.range */ {
font-weight: bold;
color: var(--color-prettylights-syntax-meta-diff-range);
color: var(--#{$prefix}color-prettylights-syntax-meta-diff-range);
}
.pl-ba /* brackethighlighter.tag, brackethighlighter.curly, brackethighlighter.round, brackethighlighter.square, brackethighlighter.angle, brackethighlighter.quote */ {
color: var(--color-prettylights-syntax-brackethighlighter-angle);
color: var(--#{$prefix}color-prettylights-syntax-brackethighlighter-angle);
}
.pl-sg /* sublimelinter.gutter-mark */ {
color: var(--color-prettylights-syntax-sublimelinter-gutter-mark);
color: var(--#{$prefix}color-prettylights-syntax-sublimelinter-gutter-mark);
}
.pl-corl /* constant.other.reference.link, string.other.link */ {
text-decoration: underline;
color: var(--color-prettylights-syntax-constant-other-reference-link);
color: var(--#{$prefix}color-prettylights-syntax-constant-other-reference-link);
}
}
@@ -1,7 +1,6 @@
.post-reward {
padding: 1rem;
text-align: center;
margin-bottom: -1rem;
@extend .print-d-none;
&:has(.reward-ways:empty) {
+1 -4
View File
@@ -111,10 +111,7 @@
.toc-content {
overflow-y: scroll;
max-height: calc(100vh - #{2*$header-height});
&::-webkit-scrollbar {
width: 0;
}
@include scrollbar-width(none, 0);
&.always-active ul,
&.always-active ol {
@@ -9,14 +9,5 @@
}
--ti-cursor-font-family: #{$global-font-family};
--ti-cursor-font-size: #{$global-font-size};
--ti-cursor-font-style: normal;
--ti-cursor-font-weight: #{$global-font-weight};
--ti-cursor-line-height: #{$global-line-height};
--ti-cursor-color: #{$global-font-color};
--ti-cursor-transform: translateX(0);
[data-theme='dark'] & {
--ti-cursor-color: #{$global-font-color-dark};
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
margin: 1rem 0;
padding: 0 0.75rem;
border-left: .25rem solid;
overflow: auto;
overflow: hidden;
@include border-radius($global-border-radius);
.admonition-title {
+3 -3
View File
@@ -1,9 +1,9 @@
.bilibili {
position: relative;
width: 100%;
height: 0;
padding-bottom: 75%;
margin: 3% auto;
height: auto;
aspect-ratio: 16 / 9;
margin: 1rem auto;
text-align: center;
iframe {
+1
View File
@@ -97,6 +97,7 @@
flex-shrink: 0;
margin-left: 0.25rem;
object-fit: cover;
border-radius: 50%;
}
[data-theme='dark'] & {
+2 -2
View File
@@ -1,10 +1,10 @@
.blockquote-center {
blockquote.blockquote-center {
border-left: none;
margin: 40px 0;
padding: 0;
position: relative;
text-align: center;
color: initial;
color: inherit;
&::after,
&::before {
+9 -1
View File
@@ -3,7 +3,7 @@
width: 100%;
height: 0;
padding-bottom: 60.725%;
margin: 3% auto;
margin: 1rem auto;
text-align: center;
iframe {
@@ -14,3 +14,11 @@
top: 0;
}
}
@media only screen and (max-width: 680px) {
.douyin {
width: 92%;
margin-inline: 4%;
padding-bottom: 190%;
}
}
+1
View File
@@ -7,3 +7,4 @@
@import '_instagram';
@import '_mapbox';
@import '_mermaid';
@import '_timeline';
+108
View File
@@ -0,0 +1,108 @@
.#{$prefix}timeline {
list-style: none;
box-sizing: border-box;
overflow: auto;
margin: 1rem auto;
--timeline-color: #{darken($global-border-color, 5%)};
--timeline-circle-color: #FF735A;
--timeline-circle-size: 10px;
--timeline-width: 2px;
&[data-animation] {
.#{$prefix}timeline-item::before {
border-color: var(--timeline-color);
animation-name: border-color-fade;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-delay: calc(var(--timeline-index) * 0.3s);
@keyframes border-color-fade {
0% {
border-color: var(--timeline-color);
}
50% {
border-color: var(--timeline-circle-color);
}
100% {
border-color: var(--timeline-color);
}
}
}
}
.#{$prefix}timeline-item {
position: relative;
padding: 0.5rem 1.75rem;
@each $color, $value in $theme-colors {
&[data-type='#{$color}'] {
--timeline-circle-color: var(--#{$prefix}#{$color});
}
}
.#{$prefix}timeline-item__timestamp {
font-size: 0.8125rem;
line-height: 1;
color: var(--#{$prefix}secondary);
&.is-top {
margin-bottom: 0.25rem;
padding-top: 0.34375rem;
}
&.is-bottom {
margin-top: 0.25rem;
}
}
.#{$prefix}timeline-item__content {
font-size: 0.875rem;
}
&[data-node='dot']::before {
background-color: var(--timeline-circle-color) !important;
}
&[data-size='small']::before {
transform: scale(0.8) translateY(-50%);
}
&[data-size='large']::before {
transform: scale(1.2) translateY(-50%);
}
&::before {
content: '';
position: absolute;
top: 1.25rem;
transform: translateY(-50%);
left: 0;
width: var(--timeline-circle-size);
height: var(--timeline-circle-size);
font-size: var(--timeline-circle-size);
line-height: var(--timeline-circle-size);
text-align: center;
border-radius: 50%;
border-width: var(--timeline-width);
border-style: solid;
border-color: var(--timeline-circle-color);
background-color: $global-background-color;
color: transparent;
z-index: 1;
[data-theme='dark'] & {
background-color: $global-background-color-dark;
}
}
&::after {
content: '';
position: absolute;
top: 0;
left: calc(var(--timeline-circle-size) / 2 + var(--timeline-width) / 2);
width: var(--timeline-width);
height: 100%;
background-color: var(--timeline-color);
}
[data-theme='dark'] & {
--timeline-color: #{darken($global-border-color, 50%)};
}
}
}
+16 -4
View File
@@ -45,10 +45,10 @@ $global-border-color-dark: #363636 !default;
// ========== Scrollbar ========== //
// Color of the scrollbar
$scrollbar-color: #87878d !default;
$scrollbar-color: #a6a6a6 !default;
// Color of the hover scrollbar
$scrollbar-hover-color: #b1b1ba !default;
$scrollbar-hover-color: #7d7d7d !default;
// ========== Scrollbar ========== //
// ========== Selection ========== //
@@ -73,6 +73,13 @@ $header-title-font-size: 1.5rem !default;
$menu-active-color: #161209 !default;
$menu-active-color-dark: #fff !default;
// Border color of the menu item
$menu-border-color: darken($global-border-color, 5%) !default;
$menu-border-color-dark: lighten($global-border-color-dark, 5%) !default;
// Height of the submenu item of desktop header
$submenu-height: $header-height * 0.5 !default;
// Color of the search background
$search-background-color: #e9e9e9 !default;
$search-background-color-dark: #363636 !default;
@@ -88,8 +95,12 @@ $tag-cloud-end-dark: $global-font-color-dark!default;
// ========== Single Content ========== //
// Font size of the TOC
$toc-title-font-size: 1.2rem !default;
$toc-content-font-size: 1rem !default;
$toc-title-font-size: 1rem !default;
$toc-content-font-size: 0.875rem !default;
// Font size of the Collection List
$collection-title-font-size: 1rem !default;
$collection-list-font-size: 0.875rem !default;
// Color of the single link
$single-link-color: #2376b7 !default; // 花青
@@ -165,6 +176,7 @@ $github-corner-fill-dark: $header-background-color !default;
// ========== GitHub Corners ========== //
@import '_partials/_maps/admonition';
@import '_partials/_maps/alert';
@import '_partials/_maps/code-highlight';
@import '_partials/_maps/code-type';
@import '_partials/_maps/colors';
+1 -1
View File
@@ -7,7 +7,7 @@
@import "_core/base";
@import "_core/layout";
@import "_core/common";
@import "_core/patch";
@import "_page";
@import "_core/media";
@import "_core/patch";
@import "_custom";
+14 -17
View File
@@ -24,15 +24,12 @@ libFiles:
# cookieconsent@3.1.1 https://github.com/osano/cookieconsent
cookieconsentCSS: cookieconsent@3.1.1/build/cookieconsent.min.css
cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js
# crypto-js@4.1.1 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.1.1/core.js
cryptoEncBase64JS: crypto-js@4.1.1/enc-base64.js
cryptoMd5JS: crypto-js@4.1.1/md5.js
cryptoSha256JS: crypto-js@4.1.1/sha256.js
# crypto-js@4.2.0 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.2.0/core.js
cryptoEncBase64JS: crypto-js@4.2.0/enc-base64.js
cryptoSha256JS: crypto-js@4.2.0/sha256.js
# echarts@5.3.3 https://github.com/apache/echarts
echartsJS: echarts@5.3.3/dist/echarts.min.js
# eruda@3.0.1 https://github.com/liriliri/eruda
erudaJS: eruda@3.0.1/eruda.js
# fontawesome-free@6.4.2 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.4.2/css/all.min.css'
# fusejs@6.6.2 https://github.com/krisk/fuse
@@ -42,12 +39,12 @@ libFiles:
gitalkJS: gitalk@1.7.2/dist/gitalk.min.js
# instant.page@5.2.0 https://github.com/instantpage/instant.page
instantPage: instant.page@5.2.0/instantpage.min.js
# katex@0.16.9 https://github.com/KaTeX/KaTeX
katexAutoRenderJS: katex@0.16.9/dist/contrib/auto-render.min.js
katexCopyTexJS: katex@0.16.9/dist/contrib/copy-tex.min.js
katexCSS: katex@0.16.9/dist/katex.min.css
katexJS: katex@0.16.9/dist/katex.min.js
katexMhchemJS: katex@0.16.9/dist/contrib/mhchem.min.js
# katex@0.16.10 https://github.com/KaTeX/KaTeX
katexAutoRenderJS: katex@0.16.10/dist/contrib/auto-render.min.js
katexCopyTexJS: katex@0.16.10/dist/contrib/copy-tex.min.js
katexCSS: katex@0.16.10/dist/katex.min.css
katexJS: katex@0.16.10/dist/katex.min.js
katexMhchemJS: katex@0.16.10/dist/contrib/mhchem.min.js
# lightgallery@2.7.2 https://github.com/sachinchoolur/lightgallery
lightgalleryCSS: lightgallery@2.7.2/css/lightgallery-bundle.min.css
lightgalleryJS: lightgallery@2.7.2/lightgallery.min.js
@@ -73,11 +70,11 @@ libFiles:
twikooJS: twikoo@1.6.22/dist/twikoo.all.min.js
# typeit@8.7.1 https://github.com/alexmacarthur/typeit
typeitJS: typeit@8.7.1/dist/index.umd.js
# valine@1.5.1 https://github.com/xCss/Valine
valineJS: valine@1.5.1/dist/Valine.min.js
# vconsole@3.15.1 https://github.com/Tencent/vConsole
vconsoleJS: vconsole@3.15.1/dist/vconsole.min.js
# valine@1.5.2 https://github.com/xCss/Valine
valineJS: valine@1.5.2/dist/Valine.min.js
# waline@2.15.8 https://github.com/walinejs/waline
walineCSS: '@waline/client@2.15.8/dist/waline.css'
walineJS: '@waline/client@2.15.8/dist/waline.js'
# xxhash-wasm@1.0.2 https://github.com/jungomi/xxhash-wasm
xxhashWasmJS: xxhash-wasm@1.0.2/umd/xxhash-wasm.js
+14 -18
View File
@@ -24,15 +24,12 @@ libFiles:
# cookieconsent@3.1.1 https://github.com/osano/cookieconsent
cookieconsentCSS: cookieconsent@3.1.1/build/cookieconsent.min.css
cookieconsentJS: cookieconsent@3.1.1/build/cookieconsent.min.js
# crypto-js@4.1.1 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.1.1/core.js
cryptoEncBase64JS: crypto-js@4.1.1/enc-base64.js
cryptoMd5JS: crypto-js@4.1.1/md5.js
cryptoSha256JS: crypto-js@4.1.1/sha256.js
# crypto-js@4.2.0 https://github.com/brix/crypto-js
cryptoCoreJS: crypto-js@4.2.0/core.js
cryptoEncBase64JS: crypto-js@4.2.0/enc-base64.js
cryptoSha256JS: crypto-js@4.2.0/sha256.js
# echarts@5.3.3 https://github.com/apache/echarts
echartsJS: echarts@5.3.3/dist/echarts.min.js
# eruda@3.0.1 https://github.com/liriliri/eruda
erudaJS: eruda@3.0.1/eruda.js
# fontawesome-free@6.4.2 https://github.com/FortAwesome/Font-Awesome
fontawesomeFreeCSS: '@fortawesome/fontawesome-free@6.4.2/css/all.min.css'
# fusejs@6.6.2 https://github.com/krisk/fuse
@@ -42,12 +39,12 @@ libFiles:
gitalkJS: gitalk@1.7.2/dist/gitalk.min.js
# instant.page@5.2.0 https://github.com/instantpage/instant.page
instantPage: instant.page@5.2.0/instantpage.js
# katex@0.16.9 https://github.com/KaTeX/KaTeX
katexAutoRenderJS: katex@0.16.9/dist/contrib/auto-render.min.js
katexCopyTexJS: katex@0.16.9/dist/contrib/copy-tex.min.js
katexCSS: katex@0.16.9/dist/katex.min.css
katexJS: katex@0.16.9/dist/katex.min.js
katexMhchemJS: katex@0.16.9/dist/contrib/mhchem.min.js
# katex@0.16.10 https://github.com/KaTeX/KaTeX
katexAutoRenderJS: katex@0.16.10/dist/contrib/auto-render.min.js
katexCopyTexJS: katex@0.16.10/dist/contrib/copy-tex.min.js
katexCSS: katex@0.16.10/dist/katex.min.css
katexJS: katex@0.16.10/dist/katex.min.js
katexMhchemJS: katex@0.16.10/dist/contrib/mhchem.min.js
# lightgallery@2.7.2 https://github.com/sachinchoolur/lightgallery
lightgalleryCSS: lightgallery@2.7.2/css/lightgallery-bundle.min.css
lightgalleryJS: lightgallery@2.7.2/lightgallery.min.js
@@ -73,11 +70,10 @@ libFiles:
twikooJS: twikoo@1.6.22/dist/twikoo.all.min.js
# typeit@8.7.1 https://github.com/alexmacarthur/typeit
typeitJS: typeit@8.7.1/dist/index.umd.js
# valine@1.5.1 https://github.com/xCss/Valine
valineJS: valine@1.5.1/dist/Valine.min.js
# vconsole@3.15.1 https://github.com/Tencent/vConsole
vconsoleJS: vconsole@3.15.1/dist/vconsole.min.js
# valine@1.5.2 https://github.com/xCss/Valine
valineJS: valine@1.5.2/dist/Valine.min.js
# waline@2.15.8 https://github.com/walinejs/waline
walineCSS: '@waline/client@2.15.8/dist/waline.css'
walineJS: '@waline/client@2.15.8/dist/waline.js'
# xxhash-wasm@1.0.2 https://github.com/jungomi/xxhash-wasm
xxhashWasmJS: xxhash-wasm@1.0.2/umd/xxhash-wasm.js
+3 -3
View File
@@ -14,13 +14,13 @@ linkedin:
Icon:
Class: fa-brands fa-linkedin fa-fw
# 003: Twitter
# 003: Twitter (X)
twitter:
Weight: 3
Prefix: https://twitter.com/
Title: Twitter
Title: X
Icon:
Class: fa-brands fa-twitter fa-fw
Class: fa-brands fa-x-twitter fa-fw
# 004: Instagram
instagram:
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>

After

Width:  |  Height:  |  Size: 409 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>

After

Width:  |  Height:  |  Size: 354 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>

After

Width:  |  Height:  |  Size: 800 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>

After

Width:  |  Height:  |  Size: 524 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>

After

Width:  |  Height:  |  Size: 493 B

+104 -94
View File
@@ -1,67 +1,57 @@
/**
* FixIt decryptor for encrypted pages and fixit-encryptor shortcode
* @param {Object} options
* @param {Function} [options.decrypted] [Lifecycle Hooks] handler after decrypting
* @param {Function} [options.reset] [Lifecycle Hooks] handler after encrypting again
* @param {Number} [options.duration=86400] number of seconds to cache decryption statistics. unit: s
* @author @Lruihao https://lruihao.cn
* @since v0.2.15
*/
FixItDecryptor = function (options = {}) {
var _proto = FixItDecryptor.prototype;
this.options = options || {};
this.options.duration = this.options.duration || 24 * 60 * 60; // default cache one day
this.decryptedEventSet = new Set();
this.partialDecryptedEventSet = new Set();
this.resetEventSet = new Set();
this.$el = document.querySelector('.fixit-decryptor-container');
class FixItDecryptor {
/**
* FixIt decryptor for encrypted pages and fixit-encryptor shortcode
* @param {Object} options
* @param {Function} [options.decrypted] [Lifecycle Hooks] handler after decrypting
* @param {Function} [options.reset] [Lifecycle Hooks] handler after encrypting again
* @param {Number} [options.duration=86400] number of seconds to cache decryption statistics. unit: s
*/
constructor(options = {}) {
this.options = options || {};
this.options.duration = this.options.duration || 24 * 60 * 60; // default cache one day
this.decryptedEventSet = new Set();
this.partialDecryptedEventSet = new Set();
this.resetEventSet = new Set();
customElements.get('fixit-encryptor') || customElements.define('fixit-encryptor', class extends HTMLElement {});
customElements.get('cipher-text') || customElements.define('cipher-text', class extends HTMLElement {});
}
/**
* decrypt content
* @param {Element} $content content element
* @param {Element} $cipherText cipher text element
* @param {Element} $target target content element
* @param {String} salt salt string
* @param {Boolean} [isAll=true] whether to decrypt all content
*/
var _decryptContent = ($content, salt, isAll=true) => {
#decryptContent($cipherText, $target, salt) {
try {
if (isAll) {
// decrypt all content
this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none');
this.$el.querySelector('.fixit-decryptor-input').classList.add('d-none');
this.$el.querySelector('.fixit-decryptor-btn').classList.add('d-none');
this.$el.querySelector('.fixit-encryptor-btn').classList.remove('d-none');
} else {
// decrypt shortcode content
$content.parentElement.classList.add('decrypted');
}
$content.insertAdjacentHTML(
'afterbegin',
CryptoJS.enc.Base64
.parse($content.getAttribute('data-content').replace(salt, ''))
.toString(CryptoJS.enc.Utf8)
);
$target.innerHTML = CryptoJS.enc.Base64
.parse($cipherText.innerText.replace(salt, ''))
.toString(CryptoJS.enc.Utf8);
$cipherText.parentElement.classList.add('decrypted');
} catch (err) {
return console.error(err);
}
// decrypted hook
const eventSet = isAll ? this.decryptedEventSet : this.partialDecryptedEventSet;
const eventSet = $target.id === 'content' ? this.decryptedEventSet : this.partialDecryptedEventSet;
for (const event of eventSet) {
event($content);
event($target);
}
};
}
/**
* validate password
* @param {Element} $decryptor decryptor element
* @param {Element} $content content element
* @param {Element} $encryptor fixit-encryptor element
* @param {Function} callback callback function after password validation
* @returns
*/
var _validatePassword = ($decryptor, $content, callback) => {
const password = $content.getAttribute('data-password');
const inputEl = $decryptor.querySelector('.fixit-decryptor-input');
async #validatePassword($encryptor, callback) {
const $cipherText = $encryptor.querySelector('cipher-text');
const password = $cipherText.dataset.password;
const inputEl = $encryptor.querySelector('.fixit-decryptor-input');
const input = inputEl.value.trim();
const inputMd5 = CryptoJS.MD5(input).toString();
// Warning: insufficient-password-hash Weak hashing algorithms for passwords poses security risks.
const { h64ToString } = await xxhash();
const inputHash = h64ToString(input);
const inputSha256 = CryptoJS.SHA256(input).toString();
const saltLen = input.length % 2 ? input.length : input.length + 1;
@@ -71,84 +61,103 @@ FixItDecryptor = function (options = {}) {
alert('Please enter the correct password!');
return console.warn('Please enter the correct password!');
}
if (inputMd5 !== password) {
if (inputHash !== password) {
alert(`Password error: ${input} not the correct password!`);
return console.warn(`Password error: ${input} not the correct password!`);
}
callback(inputMd5, inputSha256.slice(saltLen));
callback($cipherText, inputHash, inputSha256.slice(saltLen));
}
/**
* initialize FixIt decryptor
* @param {Object} options
* @param {Boolean} options.all whether to decrypt all content
* @param {String} options.shortcode whether to decrypt fixit-encryptor shortcode
*/
_proto.init = () => {
init({ all, shortcode }) {
this.addEventListener('decrypted', this.options?.decrypted);
this.addEventListener('partial-decrypted', this.options?.partialDecrypted);
this.addEventListener('reset', this.options?.reset);
const $content = document.querySelector('#content');
if (shortcode) {
this.addEventListener('decrypted', () => {
this.initShortcodes($content);
});
this.addEventListener('partial-decrypted', ($parent) => {
this.initShortcodes($parent);
});
}
if (all) {
this.initPage();
} else if (shortcode) {
this.initShortcodes($content);
}
}
/**
* initialize FixIt decryptor for the encrypted pages
*/
initPage() {
this.validateCache();
const $encryptor = document.querySelector('article > fixit-encryptor');
const $content = document.querySelector('#content');
const decryptorHandler = () => {
const $content = document.querySelector('#content');
_validatePassword(this.$el, $content, (passwordMD5, salt) => {
this.#validatePassword($encryptor, ($cipherText, passwordHash, salt) => {
// cache decryption statistics
window.localStorage?.setItem(
`fixit-decryptor/#${location.pathname}`,
JSON.stringify({
expiration: Math.ceil(Date.now() / 1000) + this.options.duration,
password: passwordMD5,
password: passwordHash,
salt,
})
);
_decryptContent($content, salt);
this.#decryptContent($cipherText, $content, salt);
});
};
// bind decryptor input enter keydown event
this.$el.querySelector('#fixit-decryptor-input')?.addEventListener('keydown', (e) => {
$encryptor.querySelector('.fixit-decryptor-input')?.addEventListener('keydown', (e) => {
if (e.key === 'Enter') {
e.preventDefault();
decryptorHandler();
}
});
// bind decryptor button click event
this.$el.querySelector('.fixit-decryptor-btn')?.addEventListener('click', (e) => {
$encryptor.querySelector('.fixit-decryptor-btn')?.addEventListener('click', (e) => {
e.preventDefault();
decryptorHandler();
});
// bind encryptor button click event
this.$el.querySelector('.fixit-encryptor-btn')?.addEventListener('click', (e) => {
$encryptor.querySelector('.fixit-encryptor-btn')?.addEventListener('click', (e) => {
e.preventDefault();
e.target.classList.add('d-none')
this.$el.querySelector('.fixit-decryptor-input').classList.remove('d-none');
this.$el.querySelector('.fixit-decryptor-btn').classList.remove('d-none');
document.querySelector('#content').innerHTML = '';
document.querySelector('#content').insertAdjacentElement(
'afterbegin',
this.$el
);
$encryptor.classList.remove('decrypted');
$content.innerHTML = '';
window.localStorage?.removeItem(`fixit-decryptor/#${location.pathname}`);
// reset hook
for (const event of this.resetEventSet) {
event();
}
});
};
$encryptor.classList.add('initialized');
}
/**
* initialize fixit-encryptor shortcodes
* initialize FixIt decryptor for fixit-encryptor shortcodes
* @param {Element} $parent parent element
*/
_proto.initShortcodes = () => {
customElements.get('fixit-encryptor') || customElements.define('fixit-encryptor', class extends HTMLElement {});
const $shortcodes = document.querySelectorAll('fixit-encryptor:not(:has(.decrypted))');
initShortcodes($parent) {
const $shortcodes = $parent.querySelectorAll('fixit-encryptor:not(.initialized)');
$shortcodes.forEach($shortcode => {
const decryptorHandler = () => {
const $decryptor = $shortcode.querySelector('.fixit-decryptor-container');
const $content = $shortcode.querySelector('[data-password][data-content]');
_validatePassword($decryptor, $content, (passwordMD5, salt) => {
_decryptContent($content, salt, false);
const $content = $shortcode.querySelector('.decryptor-content');
this.#validatePassword($shortcode, ($cipherText, passwordHash, salt) => {
this.#decryptContent($cipherText, $content, salt);
});
};
@@ -165,34 +174,32 @@ FixItDecryptor = function (options = {}) {
e.preventDefault();
decryptorHandler();
});
$shortcode.classList.add('initialized');
});
};
}
/**
* validate the cached decryption statistics in localStorage
* @returns {FixItDecryptor}
*/
_proto.validateCache = () => {
validateCache() {
const $content = document.querySelector('#content');
const password = $content.getAttribute('data-password');
const $encryptor = document.querySelector('article > fixit-encryptor');
const $cipherText = $encryptor.querySelector('cipher-text');
const password = $cipherText.dataset.password;
const cachedStat = JSON.parse(window.localStorage?.getItem(`fixit-decryptor/#${location.pathname}`));
if (!cachedStat) {
this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none');
this.$el.querySelector('.fixit-decryptor-input').classList.remove('d-none');
this.$el.querySelector('.fixit-decryptor-btn').classList.remove('d-none');
if (!cachedStat || cachedStat?.password !== password || Number(cachedStat?.expiration) < Math.ceil(Date.now() / 1000)) {
if (cachedStat) {
window.localStorage?.removeItem(`fixit-decryptor/#${location.pathname}`);
console.warn('The password has expired, please re-enter!');
}
return this;
}
if (cachedStat?.password !== password || Number(cachedStat?.expiration) < Math.ceil(Date.now() / 1000)) {
this.$el.querySelector('.fixit-decryptor-loading').classList.add('d-none');
this.$el.querySelector('.fixit-decryptor-input').classList.remove('d-none');
window.localStorage?.removeItem(`fixit-decryptor/#${location.pathname}`);
console.warn('The password has expired, please re-enter!');
return this;
}
_decryptContent($content, cachedStat.salt);
this.#decryptContent($cipherText, $content, cachedStat.salt);
return this;
};
}
/**
* add event listener for FixIt Decryptor
@@ -200,7 +207,7 @@ FixItDecryptor = function (options = {}) {
* @param {Function} listener event handler
* @returns {FixItDecryptor}
*/
_proto.addEventListener = (event, listener) => {
addEventListener(event, listener) {
if (typeof listener !== 'function') {
return this;
}
@@ -219,7 +226,7 @@ FixItDecryptor = function (options = {}) {
break;
}
return this;
};
}
/**
* remove event listener for FixIt Decryptor
@@ -227,7 +234,7 @@ FixItDecryptor = function (options = {}) {
* @param {Function} listener event handler
* @returns {FixItDecryptor}
*/
_proto.removeEventListener = (event, listener) => {
removeEventListener(event, listener) {
if (typeof listener !== 'function') {
return this;
}
@@ -246,5 +253,8 @@ FixItDecryptor = function (options = {}) {
break;
}
return this;
};
};
}
}
window.FixItDecryptor = FixItDecryptor;
+77 -72
View File
@@ -362,7 +362,15 @@ class FixIt {
}
}
initHighlight() {
/**
* init code wrapper
*/
initCodeWrapper() {
if (!this.config.code) {
this.initCopyCode();
return
}
// if markup.highlight.lineNumbersInTable set to false
this.util.forEach(document.querySelectorAll('.highlight > pre.chroma'), ($preChroma) => {
const $chroma = document.createElement('div');
$chroma.className = $preChroma.className;
@@ -377,7 +385,13 @@ class FixIt {
$preChroma.parentElement.replaceChild($chroma, $preChroma);
$td.appendChild($preChroma);
});
this.util.forEach(document.querySelectorAll('.highlight > .chroma:not(:has(.code-header))'), ($chroma) => {
// render code header
this.util.forEach(document.querySelectorAll('.highlight > .chroma:not([data-init])'), ($chroma) => {
$chroma.dataset.init = 'true';
if ($chroma.parentElement.classList.contains('no-header')) {
this.initCopyCode($chroma);
return;
}
const $codeElements = $chroma.querySelectorAll('pre.chroma > code');
if ($codeElements.length) {
const $code = $codeElements[$codeElements.length - 1];
@@ -409,20 +423,20 @@ class FixIt {
if (this.config.code.editable) {
const $edit = document.createElement('span');
$edit.classList.add('edit');
$edit.insertAdjacentHTML('afterbegin', `<i class="fa-solid fa-key fa-fw" title="${this.config.code.editUnLockTitle}" aria-hidden="true"></i>`);
$edit.insertAdjacentHTML('afterbegin', `<i class="fa-solid fa-pen-to-square fa-fw" title="${this.config.code.editUnLockTitle}" aria-hidden="true"></i>`);
$edit.addEventListener('click', () => {
const $iconKey = $edit.querySelector('.fa-key');
const $iconKey = $edit.querySelector('.fa-pen-to-square');
const $iconLock = $edit.querySelector('.fa-lock');
const $preChromas = $edit.parentElement.parentElement.querySelectorAll('pre.chroma');
const $preChroma = $preChromas.length === 2 ? $preChromas[1] : $preChromas[0];
if ($iconKey) {
$iconKey.classList.add('fa-lock');
$iconKey.classList.remove('fa-key');
$iconKey.classList.remove('fa-pen-to-square');
$iconKey.title = this.config.code.editLockTitle;
$preChroma.setAttribute('contenteditable', true);
$preChroma.focus();
} else {
$iconLock.classList.add('fa-key');
$iconLock.classList.add('fa-pen-to-square');
$iconLock.classList.remove('fa-lock');
$iconLock.title = this.config.code.editUnLockTitle;
$preChroma.setAttribute('contenteditable', false);
@@ -437,8 +451,15 @@ class FixIt {
$copy.insertAdjacentHTML('afterbegin', '<i class="fa-regular fa-copy fa-fw" aria-hidden="true"></i>');
$copy.classList.add('copy');
// remove the leading and trailing whitespace of the code string
const code = $code.innerText.trim();
if (this.config.code.maxShownLines < 0 || code.split('\n').length < this.config.code.maxShownLines + 2) {
let code = $code.innerText.trim();
// in the details element, the code string cannot be gotten directly.
if ($chroma.closest('details') !== null) {
const _tempEl = document.createElement('div');
_tempEl.appendChild($code.cloneNode(true));
code = _tempEl.innerText.trim();
}
const forceOpen = $chroma.parentElement.dataset.open ? JSON.parse($chroma.parentElement.dataset.open) : void 0;
if (forceOpen ?? (this.config.code.maxShownLines < 0 || code.split('\n').length < this.config.code.maxShownLines + 2)) {
$chroma.classList.add('open');
}
$copy.title = this.config.code.copyTitle;
@@ -465,20 +486,23 @@ class FixIt {
});
}
/**
* init simple copy code when there is no code header
* https://github.com/github/clipboard-copy-element
* @param {ELement} singleCode single code block
*/
initCopyCode(singleCode) {
// TODO
}
/**
* init table of contents
*/
initToc() {
let $tocCore = document.getElementById('TableOfContents');
const $tocCore = document.getElementById('TableOfContents');
if ($tocCore === null) {
return;
}
// It's a dirty hack to fix the bug of APlayer, see https://github.com/hugo-fixit/FixIt/issues/292
if (typeof APlayer === 'function') {
const $newTocCore = $tocCore.cloneNode(true);
$tocCore.parentElement.replaceChild($newTocCore, $tocCore);
$tocCore = $newTocCore;
}
if (document.getElementById('toc-static').dataset.kept === 'true' || this.util.isTocStatic()) {
const $tocContentStatic = document.getElementById('toc-content-static');
if ($tocCore.parentElement !== $tocContentStatic) {
@@ -549,6 +573,27 @@ class FixIt {
}, false);
}
/**
* It's a dirty hack to fix the bug of APlayer and smoothScroll.
* see https://github.com/hugo-fixit/FixIt/issues/292
*/
fixTocScroll() {
if (typeof APlayer === 'function') {
// remove APlayer click event listener of the toc link
let $tocCore = document.getElementById('TableOfContents');
if ($tocCore) {
const $newTocCore = $tocCore.cloneNode(true);
$tocCore.parentElement.replaceChild($newTocCore, $tocCore);
$tocCore = $newTocCore;
}
// remove APlayer click event listener of the heading mark
this.util.forEach(document.querySelectorAll('.heading-mark'), ($headingMark) => {
const $newHeadingMark = $headingMark.cloneNode(true);
$headingMark.parentElement.replaceChild($newHeadingMark, $headingMark);
});
}
}
initMath(target = document.body) {
if (this.config.math) {
renderMathInElement(target, this.config.math);
@@ -693,7 +738,7 @@ class FixIt {
Object.values(groupMap).forEach((group) => {
const typeone = (i) => {
const typeitElement = group[i];
const singleLoop = typeitElement.dataset.loop;
const singleData = typeitElement.dataset;
stagingDOM.stage(typeitElement.querySelector('template').content.cloneNode(true));
// for shortcodes usage
let targetEle = typeitElement.firstElementChild
@@ -705,18 +750,19 @@ class FixIt {
// create a new instance of TypeIt for each element
const instance = new TypeIt(targetEle, {
strings: stagingDOM.$el.querySelector('pre')?.innerHTML || stagingDOM.contentAsHtml(),
speed: speed,
speed: Number(singleData.speed) >= 0 ? Number(singleData.speed) : speed,
lifeLike: true,
cursorSpeed: cursorSpeed,
cursorChar: cursorChar,
cursorSpeed: Number(singleData.cursorSpeed) >= 0 ? Number(singleData.cursorSpeed) : cursorSpeed,
cursorChar: singleData.cursorChar || cursorChar,
waitUntilVisible: true,
loop: singleLoop ? JSON.parse(singleLoop) : loop,
loop: singleData.loop ? singleData.loop === 'true' : loop,
afterComplete: () => {
const duration = Number(singleData.duration ?? vtypeitConfig.duration);
if (i === group.length - 1) {
if (typeitConfig.duration >= 0) {
if (duration >= 0) {
window.setTimeout(() => {
instance.destroy();
}, typeitConfig.duration);
}, duration);
}
return;
}
@@ -869,7 +915,7 @@ class FixIt {
}
initCookieconsent() {
this.config.cookieconsent && cookieconsent.initialise(this.config.cookieconsent);
this.config.cookieconsent && window.cookieconsent?.initialise(this.config.cookieconsent);
}
getSiteTime = () => {
@@ -960,7 +1006,7 @@ class FixIt {
this.initTwemoji();
this.initDetails();
this.initLightGallery();
this.initHighlight();
this.initCodeWrapper();
this.initTable();
this.initMath();
this.initMermaid();
@@ -970,6 +1016,7 @@ class FixIt {
this.initToc();
this.initTocListener();
this.initPangu();
this.fixTocScroll();
this.util.forEach(document.querySelectorAll('.encrypted-hidden'), ($element) => {
$element.classList.replace('encrypted-hidden', 'decrypted-shown');
});
@@ -978,7 +1025,7 @@ class FixIt {
this.initTwemoji($content);
this.initDetails($content);
this.initLightGallery();
this.initHighlight();
this.initCodeWrapper();
this.initTable($content);
this.initMath($content);
this.initMermaid();
@@ -996,42 +1043,7 @@ class FixIt {
});
}
});
if (this.config.encryption?.shortcode) {
this.decryptor.addEventListener('decrypted', () => {
this.decryptor.initShortcodes();
})
this.decryptor.addEventListener('partial-decrypted', () => {
this.decryptor.initShortcodes();
})
this.decryptor.initShortcodes();
}
this.config.encryption?.all && this.decryptor.init();
}
initMDevtools() {
const type = this.config?.mDevtools;
if (typeof window.orientation === 'undefined') {
return;
}
if (type === 'vConsole') {
const vConsole = new VConsole({
target: '.widgets',
theme: this.isDark ? 'dark' : 'light'
});
this._vConsoleOnSwitchTheme = this._vConsoleOnSwitchTheme || (() => {
vConsole.setOption('theme', this.isDark ? 'dark' : 'light');
});
this.switchThemeEventSet.add(this._vConsoleOnSwitchTheme);
}
if(type === 'eruda') {
eruda.init({
defaults: { theme: this.isDark ? 'Dark' : 'Light' }
});
this._erudaOnSwitchTheme = this._erudaOnSwitchTheme || (() => {
eruda.util.evalCss.setTheme(this.isDark ? 'Dark' : 'Light');
});
this.switchThemeEventSet.add(this._erudaOnSwitchTheme);
}
this.decryptor.init(this.config.encryption);
}
initAutoMark() {
@@ -1039,9 +1051,9 @@ class FixIt {
return;
}
window.addEventListener('beforeunload', () => {
window.localStorage?.setItem(`fixit-bookmark/#${location.pathname}`, this.util.getScrollTop());
window.sessionStorage?.setItem(`fixit-bookmark/#${location.pathname}`, this.util.getScrollTop());
});
const scrollTop = Number(window.localStorage?.getItem(`fixit-bookmark/#${location.pathname}`));
const scrollTop = Number(window.sessionStorage?.getItem(`fixit-bookmark/#${location.pathname}`));
// If the page opens with a specific hash, just jump out
if (scrollTop && location.hash === '') {
window.scrollTo({
@@ -1087,7 +1099,6 @@ class FixIt {
const $fixedButtons = document.querySelector('.fixed-buttons');
const $backToTop = document.querySelector('.back-to-top');
const $readingProgressBar = document.querySelector('.reading-progress-bar');
let scrollTimer = void 0;
if (document.body.dataset.headerDesktop === 'auto') {
$headers.push(document.getElementById('header-desktop'));
}
@@ -1106,12 +1117,6 @@ class FixIt {
const $mask = document.getElementById('mask');
this.newScrollTop = this.util.getScrollTop();
const scroll = this.newScrollTop - this.oldScrollTop;
// body scrollbar style
document.body.toggleAttribute('data-scroll', true);
scrollTimer && window.clearTimeout(scrollTimer);
scrollTimer = window.setTimeout(() => {
document.body.toggleAttribute('data-scroll');
}, 500);
// header animation
this.util.forEach($headers, ($header) => {
if (scroll > ACCURACY) {
@@ -1206,7 +1211,7 @@ class FixIt {
this.initTwemoji();
this.initDetails();
this.initLightGallery();
this.initHighlight();
this.initCodeWrapper();
this.initTable();
this.initMath();
this.initMermaid();
@@ -1225,7 +1230,6 @@ class FixIt {
this.initSiteTime();
this.initServiceWorker();
this.initWatermark();
this.initMDevtools();
this.initAutoMark();
this.initReward();
@@ -1234,6 +1238,7 @@ class FixIt {
if (!this.config.encryption?.all) {
this.initToc();
this.initTocListener();
this.fixTocScroll();
}
this.onScroll();
this.onResize();
+4 -5
View File
@@ -5,16 +5,15 @@ artalk@latest https://github.com/ArtalkJS/Artalk
autocomplete-js@0.38.1 https://github.com/algolia/autocomplete
cell-watermark@1.0.3 https://github.com/Lruihao/watermark
cookieconsent@3.1.1 https://github.com/osano/cookieconsent
crypto-js@4.1.1 https://github.com/brix/crypto-js
crypto-js@4.2.0 https://github.com/brix/crypto-js
echarts@5.3.3 https://github.com/apache/echarts
TODO update emoji-data to 15.x
emoji-data@14.0.0 https://github.com/iamcal/emoji-data
eruda@3.0.1 https://github.com/liriliri/eruda
fontawesome-free@6.4.2 https://github.com/FortAwesome/Font-Awesome
fusejs@6.6.2 https://github.com/krisk/fuse
gitalk@1.7.2 https://github.com/gitalk/gitalk
instant.page@5.2.0 https://github.com/instantpage/instant.page
katex@0.16.9 https://github.com/KaTeX/KaTeX
katex@0.16.10 https://github.com/KaTeX/KaTeX
lightgallery@2.7.2 https://github.com/sachinchoolur/lightgallery
mapbox-gl@2.10.0 https://github.com/mapbox/mapbox-gl-js
meting@2.0.1 https://github.com/metowolf/MetingJS
@@ -26,6 +25,6 @@ simple-icons@9.19.0 https://github.com/simple-icons/simple-icons
twemoji@14.0.2 https://github.com/twitter/twemoji
twikoo@1.6.22 https://github.com/imaegoo/twikoo
typeit@8.7.1 https://github.com/alexmacarthur/typeit
valine@1.5.1 https://github.com/xCss/Valine
vconsole@3.15.1 https://github.com/Tencent/vConsole
valine@1.5.2 https://github.com/xCss/Valine
waline@2.15.8 https://github.com/walinejs/waline
xxhash-wasm@1.0.2 https://github.com/jungomi/xxhash-wasm
-8
View File
@@ -48,14 +48,6 @@
.aplayer-list {
background-color: #212121;
&::-webkit-scrollbar-thumb {
background-color: #999;
}
&::-webkit-scrollbar-thumb:hover {
background-color: #bbb;
}
li {
color: #fff;
border-top-color: #666;
-268
View File
@@ -1,268 +0,0 @@
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
(function (Math) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
// Constants table
var T = [];
// Compute constants
(function () {
for (var i = 0; i < 64; i++) {
T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;
}
}());
/**
* MD5 hash algorithm.
*/
var MD5 = C_algo.MD5 = Hasher.extend({
_doReset: function () {
this._hash = new WordArray.init([
0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476
]);
},
_doProcessBlock: function (M, offset) {
// Swap endian
for (var i = 0; i < 16; i++) {
// Shortcuts
var offset_i = offset + i;
var M_offset_i = M[offset_i];
M[offset_i] = (
(((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
(((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
);
}
// Shortcuts
var H = this._hash.words;
var M_offset_0 = M[offset + 0];
var M_offset_1 = M[offset + 1];
var M_offset_2 = M[offset + 2];
var M_offset_3 = M[offset + 3];
var M_offset_4 = M[offset + 4];
var M_offset_5 = M[offset + 5];
var M_offset_6 = M[offset + 6];
var M_offset_7 = M[offset + 7];
var M_offset_8 = M[offset + 8];
var M_offset_9 = M[offset + 9];
var M_offset_10 = M[offset + 10];
var M_offset_11 = M[offset + 11];
var M_offset_12 = M[offset + 12];
var M_offset_13 = M[offset + 13];
var M_offset_14 = M[offset + 14];
var M_offset_15 = M[offset + 15];
// Working varialbes
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
// Computation
a = FF(a, b, c, d, M_offset_0, 7, T[0]);
d = FF(d, a, b, c, M_offset_1, 12, T[1]);
c = FF(c, d, a, b, M_offset_2, 17, T[2]);
b = FF(b, c, d, a, M_offset_3, 22, T[3]);
a = FF(a, b, c, d, M_offset_4, 7, T[4]);
d = FF(d, a, b, c, M_offset_5, 12, T[5]);
c = FF(c, d, a, b, M_offset_6, 17, T[6]);
b = FF(b, c, d, a, M_offset_7, 22, T[7]);
a = FF(a, b, c, d, M_offset_8, 7, T[8]);
d = FF(d, a, b, c, M_offset_9, 12, T[9]);
c = FF(c, d, a, b, M_offset_10, 17, T[10]);
b = FF(b, c, d, a, M_offset_11, 22, T[11]);
a = FF(a, b, c, d, M_offset_12, 7, T[12]);
d = FF(d, a, b, c, M_offset_13, 12, T[13]);
c = FF(c, d, a, b, M_offset_14, 17, T[14]);
b = FF(b, c, d, a, M_offset_15, 22, T[15]);
a = GG(a, b, c, d, M_offset_1, 5, T[16]);
d = GG(d, a, b, c, M_offset_6, 9, T[17]);
c = GG(c, d, a, b, M_offset_11, 14, T[18]);
b = GG(b, c, d, a, M_offset_0, 20, T[19]);
a = GG(a, b, c, d, M_offset_5, 5, T[20]);
d = GG(d, a, b, c, M_offset_10, 9, T[21]);
c = GG(c, d, a, b, M_offset_15, 14, T[22]);
b = GG(b, c, d, a, M_offset_4, 20, T[23]);
a = GG(a, b, c, d, M_offset_9, 5, T[24]);
d = GG(d, a, b, c, M_offset_14, 9, T[25]);
c = GG(c, d, a, b, M_offset_3, 14, T[26]);
b = GG(b, c, d, a, M_offset_8, 20, T[27]);
a = GG(a, b, c, d, M_offset_13, 5, T[28]);
d = GG(d, a, b, c, M_offset_2, 9, T[29]);
c = GG(c, d, a, b, M_offset_7, 14, T[30]);
b = GG(b, c, d, a, M_offset_12, 20, T[31]);
a = HH(a, b, c, d, M_offset_5, 4, T[32]);
d = HH(d, a, b, c, M_offset_8, 11, T[33]);
c = HH(c, d, a, b, M_offset_11, 16, T[34]);
b = HH(b, c, d, a, M_offset_14, 23, T[35]);
a = HH(a, b, c, d, M_offset_1, 4, T[36]);
d = HH(d, a, b, c, M_offset_4, 11, T[37]);
c = HH(c, d, a, b, M_offset_7, 16, T[38]);
b = HH(b, c, d, a, M_offset_10, 23, T[39]);
a = HH(a, b, c, d, M_offset_13, 4, T[40]);
d = HH(d, a, b, c, M_offset_0, 11, T[41]);
c = HH(c, d, a, b, M_offset_3, 16, T[42]);
b = HH(b, c, d, a, M_offset_6, 23, T[43]);
a = HH(a, b, c, d, M_offset_9, 4, T[44]);
d = HH(d, a, b, c, M_offset_12, 11, T[45]);
c = HH(c, d, a, b, M_offset_15, 16, T[46]);
b = HH(b, c, d, a, M_offset_2, 23, T[47]);
a = II(a, b, c, d, M_offset_0, 6, T[48]);
d = II(d, a, b, c, M_offset_7, 10, T[49]);
c = II(c, d, a, b, M_offset_14, 15, T[50]);
b = II(b, c, d, a, M_offset_5, 21, T[51]);
a = II(a, b, c, d, M_offset_12, 6, T[52]);
d = II(d, a, b, c, M_offset_3, 10, T[53]);
c = II(c, d, a, b, M_offset_10, 15, T[54]);
b = II(b, c, d, a, M_offset_1, 21, T[55]);
a = II(a, b, c, d, M_offset_8, 6, T[56]);
d = II(d, a, b, c, M_offset_15, 10, T[57]);
c = II(c, d, a, b, M_offset_6, 15, T[58]);
b = II(b, c, d, a, M_offset_13, 21, T[59]);
a = II(a, b, c, d, M_offset_4, 6, T[60]);
d = II(d, a, b, c, M_offset_11, 10, T[61]);
c = II(c, d, a, b, M_offset_2, 15, T[62]);
b = II(b, c, d, a, M_offset_9, 21, T[63]);
// Intermediate hash value
H[0] = (H[0] + a) | 0;
H[1] = (H[1] + b) | 0;
H[2] = (H[2] + c) | 0;
H[3] = (H[3] + d) | 0;
},
_doFinalize: function () {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
// Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
var nBitsTotalL = nBitsTotal;
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (
(((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |
(((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)
);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
(((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |
(((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)
);
data.sigBytes = (dataWords.length + 1) * 4;
// Hash final blocks
this._process();
// Shortcuts
var hash = this._hash;
var H = hash.words;
// Swap endian
for (var i = 0; i < 4; i++) {
// Shortcut
var H_i = H[i];
H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
(((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
}
// Return final computed hash
return hash;
},
clone: function () {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
function FF(a, b, c, d, x, s, t) {
var n = a + ((b & c) | (~b & d)) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
function GG(a, b, c, d, x, s, t) {
var n = a + ((b & d) | (c & ~d)) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
function HH(a, b, c, d, x, s, t) {
var n = a + (b ^ c ^ d) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
function II(a, b, c, d, x, s, t) {
var n = a + (c ^ (b | ~d)) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.MD5('message');
* var hash = CryptoJS.MD5(wordArray);
*/
C.MD5 = Hasher._createHelper(MD5);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacMD5(message, key);
*/
C.HmacMD5 = Hasher._createHmacHelper(MD5);
}(Math));
return CryptoJS.MD5;
}));
-3
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var i={};return function(){n.d(i,{default:function(){return s}});var e=n(771),t=n.n(e),r=function(e,t,r){for(var n=r,i=0,a=e.length;n<t.length;){var o=t[n];if(i<=0&&t.slice(n,n+a)===e)return n;"\\"===o?n++:"{"===o?i++:"}"===o&&i--,n++}return-1},a=/^\\begin{/,o=function(e,t){for(var n,i=[],o=new RegExp("("+t.map((function(e){return e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")})).join("|")+")");-1!==(n=e.search(o));){n>0&&(i.push({type:"text",data:e.slice(0,n)}),e=e.slice(n));var l=t.findIndex((function(t){return e.startsWith(t.left)}));if(-1===(n=r(t[l].right,e,t[l].left.length)))break;var d=e.slice(0,n+t[l].right.length),s=a.test(d)?d:e.slice(t[l].left.length,n);i.push({type:"math",data:s,rawData:d,display:t[l].display}),e=e.slice(n+t[l].right.length)}return""!==e&&i.push({type:"text",data:e}),i},l=function(e,r){var n=o(e,r.delimiters);if(1===n.length&&"text"===n[0].type)return null;for(var i=document.createDocumentFragment(),a=0;a<n.length;a++)if("text"===n[a].type)i.appendChild(document.createTextNode(n[a].data));else{var l=document.createElement("span"),d=n[a].data;r.displayMode=n[a].display;try{r.preProcess&&(d=r.preProcess(d)),t().render(d,l,r)}catch(e){if(!(e instanceof t().ParseError))throw e;r.errorCallback("KaTeX auto-render: Failed to parse `"+n[a].data+"` with ",e),i.appendChild(document.createTextNode(n[a].rawData));continue}i.appendChild(l)}return i},d=function e(t,r){for(var n=0;n<t.childNodes.length;n++){var i=t.childNodes[n];if(3===i.nodeType){for(var a=i.textContent,o=i.nextSibling,d=0;o&&o.nodeType===Node.TEXT_NODE;)a+=o.textContent,o=o.nextSibling,d++;var s=l(a,r);if(s){for(var f=0;f<d;f++)i.nextSibling.remove();n+=s.childNodes.length-1,t.replaceChild(s,i)}else n+=d}else 1===i.nodeType&&function(){var t=" "+i.className+" ";-1===r.ignoredTags.indexOf(i.nodeName.toLowerCase())&&r.ignoredClasses.every((function(e){return-1===t.indexOf(" "+e+" ")}))&&e(i,r)}()}},s=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code","option"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},d(e,r)}}(),i=i.default}()}));
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,(function(e){return function(){"use strict";var t={771:function(t){t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){r.d(o,{default:function(){return d}});var e=r(771),t=r.n(e);const n=function(e,t,n){let r=n,o=0;const i=e.length;for(;r<t.length;){const n=t[r];if(o<=0&&t.slice(r,r+i)===e)return r;"\\"===n?r++:"{"===n?o++:"}"===n&&o--,r++}return-1},i=/^\\begin{/;var a=function(e,t){let r;const o=[],a=new RegExp("("+t.map((e=>e.left.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"))).join("|")+")");for(;r=e.search(a),-1!==r;){r>0&&(o.push({type:"text",data:e.slice(0,r)}),e=e.slice(r));const a=t.findIndex((t=>e.startsWith(t.left)));if(r=n(t[a].right,e,t[a].left.length),-1===r)break;const l=e.slice(0,r+t[a].right.length),s=i.test(l)?l:e.slice(t[a].left.length,r);o.push({type:"math",data:s,rawData:l,display:t[a].display}),e=e.slice(r+t[a].right.length)}return""!==e&&o.push({type:"text",data:e}),o};const l=function(e,n){const r=a(e,n.delimiters);if(1===r.length&&"text"===r[0].type)return null;const o=document.createDocumentFragment();for(let e=0;e<r.length;e++)if("text"===r[e].type)o.appendChild(document.createTextNode(r[e].data));else{const i=document.createElement("span");let a=r[e].data;n.displayMode=r[e].display;try{n.preProcess&&(a=n.preProcess(a)),t().render(a,i,n)}catch(i){if(!(i instanceof t().ParseError))throw i;n.errorCallback("KaTeX auto-render: Failed to parse `"+r[e].data+"` with ",i),o.appendChild(document.createTextNode(r[e].rawData));continue}o.appendChild(i)}return o},s=function(e,t){for(let n=0;n<e.childNodes.length;n++){const r=e.childNodes[n];if(3===r.nodeType){let o=r.textContent,i=r.nextSibling,a=0;for(;i&&i.nodeType===Node.TEXT_NODE;)o+=i.textContent,i=i.nextSibling,a++;const s=l(o,t);if(s){for(let e=0;e<a;e++)r.nextSibling.remove();n+=s.childNodes.length-1,e.replaceChild(s,r)}else n+=a}else if(1===r.nodeType){const e=" "+r.className+" ";-1===t.ignoredTags.indexOf(r.nodeName.toLowerCase())&&t.ignoredClasses.every((t=>-1===e.indexOf(" "+t+" ")))&&s(r,t)}}};var d=function(e,t){if(!e)throw new Error("No element provided to render");const n={};for(const e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);n.delimiters=n.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}],n.ignoredTags=n.ignoredTags||["script","noscript","style","textarea","pre","code","option"],n.ignoredClasses=n.ignoredClasses||[],n.errorCallback=n.errorCallback||console.error,n.macros=n.macros||{},s(e,n)}}(),o=o.default}()}));
+1 -1
View File
@@ -1 +1 @@
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={},t={inline:["$","$"],display:["$$","$$"]};var n=function(e,n){void 0===n&&(n=t);for(var r=e.querySelectorAll(".katex-mathml + .katex-html"),a=0;a<r.length;a++){var o=r[a];o.remove?o.remove():o.parentNode&&o.parentNode.removeChild(o)}for(var i=e.querySelectorAll(".katex-mathml"),l=0;l<i.length;l++){var f=i[l],c=f.querySelector("annotation");c&&(f.replaceWith?f.replaceWith(c):f.parentNode&&f.parentNode.replaceChild(c,f),c.innerHTML=n.inline[0]+c.innerHTML+n.inline[1])}for(var d=e.querySelectorAll(".katex-display annotation"),s=0;s<d.length;s++){var p=d[s];p.innerHTML=n.display[0]+p.innerHTML.substr(n.inline[0].length,p.innerHTML.length-n.inline[0].length-n.inline[1].length)+n.display[1]}return e};function r(e){var t=e instanceof Element?e:e.parentElement;return t&&t.closest(".katex")}return document.addEventListener("copy",(function(e){var t=window.getSelection();if(!t.isCollapsed&&e.clipboardData){var a=e.clipboardData,o=t.getRangeAt(0),i=r(o.startContainer);i&&o.setStartBefore(i);var l=r(o.endContainer);l&&o.setEndAfter(l);var f=o.cloneContents();if(f.querySelector(".katex-mathml")){var c=Array.prototype.map.call(f.childNodes,(function(e){return e instanceof Text?e.textContent:e.outerHTML})).join("");a.setData("text/html",c),a.setData("text/plain",n(f).textContent),e.preventDefault()}}})),e=e.default}()}));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}("undefined"!=typeof self?self:this,(function(){return function(){"use strict";var e={};const t={inline:["$","$"],display:["$$","$$"]};var n=function(e,n){void 0===n&&(n=t);const o=e.querySelectorAll(".katex-mathml + .katex-html");for(let e=0;e<o.length;e++){const t=o[e];t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}const r=e.querySelectorAll(".katex-mathml");for(let e=0;e<r.length;e++){const t=r[e],o=t.querySelector("annotation");o&&(t.replaceWith?t.replaceWith(o):t.parentNode&&t.parentNode.replaceChild(o,t),o.innerHTML=n.inline[0]+o.innerHTML+n.inline[1])}const l=e.querySelectorAll(".katex-display annotation");for(let e=0;e<l.length;e++){const t=l[e];t.innerHTML=n.display[0]+t.innerHTML.substr(n.inline[0].length,t.innerHTML.length-n.inline[0].length-n.inline[1].length)+n.display[1]}return e};function o(e){const t=e instanceof Element?e:e.parentElement;return t&&t.closest(".katex")}return document.addEventListener("copy",(function(e){const t=window.getSelection();if(t.isCollapsed||!e.clipboardData)return;const r=e.clipboardData,l=t.getRangeAt(0),i=o(l.startContainer);i&&l.setStartBefore(i);const a=o(l.endContainer);a&&l.setEndAfter(a);const s=l.cloneContents();if(!s.querySelector(".katex-mathml"))return;const c=Array.prototype.map.call(s.childNodes,(e=>e instanceof Text?e.textContent:e.outerHTML)).join("");r.setData("text/html",c),r.setData("text/plain",n(s).textContent),e.preventDefault()})),e=e.default}()}));
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -6
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
-1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,10 +1,10 @@
{
"output": "CHANGELOG.md",
"template": ".auto-changelog/template.hbs",
"handlebarsSetup": ".auto-changelog/setup.js",
"template": "build/changelog/template.hbs",
"handlebarsSetup": "build/changelog/setup.cjs",
"sortCommits": "relevance",
"commitLimit": false,
"ignoreCommitPattern": "\\(ignore\\)",
"ignoreCommitPattern": "(Chore|chore):|\\(ignore\\)",
"replaceText": {
"^(Feat|feat):": ":sparkles: Feat:",
"^(Fix|fix):": ":bug: Fix:",
@@ -15,7 +15,7 @@ All notable changes to this project will be documented in this file.
{{/if}}
{{!-- List commits with `Breaking change: ` somewhere in the message --}}
{{#commit-list commits heading='### :boom: Breaking Changes' message='^(Breaking change|BREAKING CHANGE):'}}
{{#commit-list commits heading='### :boom: Breaking Changes' message='(:boom:|Breaking change:|BREAKING CHANGE:)'}}
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
{{/commit-list}}
+61
View File
@@ -0,0 +1,61 @@
import fs from 'fs';
import { dirname, join } from 'path'
import { fileURLToPath } from 'url'
import { execSync } from 'child_process';
// node build/update-version.js --stage [version/commit]
const stage = process.argv[3] || 'commit';
const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim();
const match = [
'archetypes/',
'assets/',
'i18n/',
'layouts/',
'static/',
'go.mod',
'hugo.toml',
'package.json',
'package-lock.json',
'theme.toml',
];
const gitDiff = execSync('git diff --cached --name-only').toString().trim();
if (stage !== 'version') {
// Avoid conflicts when creating a Pull Request
if (!['dev', 'master'].includes(branch)) {
console.log(`The current branch is ${branch}, no need to update the FixIt version.`);
process.exit(0);
}
if (!match.some((item) => gitDiff.includes(item))) {
console.log('No need to update the FixIt version.');
process.exit(0);
}
}
const __root = join(dirname(fileURLToPath(import.meta.url)), '../');
const initHtmlPath = join(__root, 'layouts/partials/init/index.html');
const packageJsonPath = join(__root, 'package.json');
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
const version = packageJson.version;
// Get the short hash of the last commit (can not get this commit hash at pre-commit hook)
const shortHash = execSync('git rev-parse --short HEAD').toString().trim();
// Build the development version v{major}.{minor}.{patch+1}-{shortHash}
const devVersion = `${version.replace(/(\d+)$/, (match, part) => parseInt(part) + 1)}-${shortHash}`;
const initHtml = fs.readFileSync(initHtmlPath, 'utf8');
const latestVersion = stage === 'version' ? version : devVersion;
const lastVersion = initHtml.match(/v\d+\.\d+\.\d+(-\w+)?/)[0].slice(1);
const newInitHtml = initHtml.replace(/v\d+\.\d+\.\d+(-\w+)?/, `v${latestVersion}`);
if (lastVersion === version) {
// After running `npm version`, the version number is updated
console.log(`The FixIt version has been updated to v${lastVersion}.`);
process.exit(0);
}
// Update the version number in layouts/partials/init/index.html
fs.writeFileSync(initHtmlPath, newInitHtml);
// Add the updated files to the git stage
execSync('git add layouts/partials/init/index.html package.json package-lock.json');
console.log(`Update the FixIt version from v${lastVersion} to v${latestVersion}.`);
export default latestVersion;
-330
View File
@@ -1,330 +0,0 @@
# Contributors-Readme
## [Contributors](https://github.com/hugo-fixit/FixIt/graphs/contributors)
<!-- readme: contributors,d-baer -start -->
<table>
<tr>
<td align="center">
<a href="https://github.com/Lruihao">
<img src="https://avatars.githubusercontent.com/u/33419593?v=4" width="100;" alt="Lruihao"/>
<br />
<sub><b>Cell</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/dillonzq">
<img src="https://avatars.githubusercontent.com/u/30786232?v=4" width="100;" alt="dillonzq"/>
<br />
<sub><b>Dillon</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Fastbyte01">
<img src="https://avatars.githubusercontent.com/u/16869546?v=4" width="100;" alt="Fastbyte01"/>
<br />
<sub><b>Giuseppe Pignataro</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Programazing">
<img src="https://avatars.githubusercontent.com/u/11393826?v=4" width="100;" alt="Programazing"/>
<br />
<sub><b>Christopher C. Johnson</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/astropenguin">
<img src="https://avatars.githubusercontent.com/u/13254278?v=4" width="100;" alt="astropenguin"/>
<br />
<sub><b>Akio Taniguchi</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/DaveA-W">
<img src="https://avatars.githubusercontent.com/u/6415842?v=4" width="100;" alt="DaveA-W"/>
<br />
<sub><b>Dave A-W</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/yureiita">
<img src="https://avatars.githubusercontent.com/u/26035759?v=4" width="100;" alt="yureiita"/>
<br />
<sub><b>Abdul Halim Daud</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/psi59">
<img src="https://avatars.githubusercontent.com/u/15508203?v=4" width="100;" alt="psi59"/>
<br />
<sub><b>Sangil Park</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Fedomn">
<img src="https://avatars.githubusercontent.com/u/6177727?v=4" width="100;" alt="Fedomn"/>
<br />
<sub><b>Frank Ma</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Mejituu">
<img src="https://avatars.githubusercontent.com/u/36153418?v=4" width="100;" alt="Mejituu"/>
<br />
<sub><b>Mejituu</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/ctj12461">
<img src="https://avatars.githubusercontent.com/u/42143810?v=4" width="100;" alt="ctj12461"/>
<br />
<sub><b>Justin Chen</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/edte">
<img src="https://avatars.githubusercontent.com/u/50194671?v=4" width="100;" alt="edte"/>
<br />
<sub><b>Edte</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/solarpowerinncr">
<img src="https://avatars.githubusercontent.com/u/37186560?v=4" width="100;" alt="solarpowerinncr"/>
<br />
<sub><b>Solarpowerinncr</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/xueweiwujxw">
<img src="https://avatars.githubusercontent.com/u/45992640?v=4" width="100;" alt="xueweiwujxw"/>
<br />
<sub><b>Xuewei Wu</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/youngxhui">
<img src="https://avatars.githubusercontent.com/u/16971804?v=4" width="100;" alt="youngxhui"/>
<br />
<sub><b>Youngxhui</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Kapusch">
<img src="https://avatars.githubusercontent.com/u/9576733?v=4" width="100;" alt="Kapusch"/>
<br />
<sub><b>Jean-Emmanuel BAILLAT</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/0x020B">
<img src="https://avatars.githubusercontent.com/u/106423923?v=4" width="100;" alt="0x020B"/>
<br />
<sub><b>N0tr00t</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/dogukanerel">
<img src="https://avatars.githubusercontent.com/u/19349444?v=4" width="100;" alt="dogukanerel"/>
<br />
<sub><b>Doğukan Erel</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/devandreacarratta">
<img src="https://avatars.githubusercontent.com/u/46504271?v=4" width="100;" alt="devandreacarratta"/>
<br />
<sub><b>Andrea Carratta</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/cmpsoares91">
<img src="https://avatars.githubusercontent.com/u/4914211?v=4" width="100;" alt="cmpsoares91"/>
<br />
<sub><b>Carlos Manuel Soares</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/AutomationD">
<img src="https://avatars.githubusercontent.com/u/1790594?v=4" width="100;" alt="AutomationD"/>
<br />
<sub><b>Dmitry Kireev</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/thejayhaykid">
<img src="https://avatars.githubusercontent.com/u/9452325?v=4" width="100;" alt="thejayhaykid"/>
<br />
<sub><b>Jake Hayes</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/markdluethje">
<img src="https://avatars.githubusercontent.com/u/31922494?v=4" width="100;" alt="markdluethje"/>
<br />
<sub><b>Mark-Daniel Lüthje</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/mathieu-gilloots">
<img src="https://avatars.githubusercontent.com/u/1282351?v=4" width="100;" alt="mathieu-gilloots"/>
<br />
<sub><b>Mathieu GILLOOTS</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/NicoDreamzZ">
<img src="https://avatars.githubusercontent.com/u/12086166?v=4" width="100;" alt="NicoDreamzZ"/>
<br />
<sub><b>Nico Rügheimer</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/ramrodo">
<img src="https://avatars.githubusercontent.com/u/2797052?v=4" width="100;" alt="ramrodo"/>
<br />
<sub><b>Rodolfo Martínez Vega</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/SilkeHenderickx">
<img src="https://avatars.githubusercontent.com/u/28140438?v=4" width="100;" alt="SilkeHenderickx"/>
<br />
<sub><b>Silke Henderickx</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/stefanoginobili">
<img src="https://avatars.githubusercontent.com/u/67482642?v=4" width="100;" alt="stefanoginobili"/>
<br />
<sub><b>Stefano Ginobili</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/tlereste">
<img src="https://avatars.githubusercontent.com/u/12964583?v=4" width="100;" alt="tlereste"/>
<br />
<sub><b>Thibault Le Reste</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/vanildosouto">
<img src="https://avatars.githubusercontent.com/u/1603028?v=4" width="100;" alt="vanildosouto"/>
<br />
<sub><b>Vanildo Souto Mangueira</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/victor-pogor">
<img src="https://avatars.githubusercontent.com/u/24962085?v=4" width="100;" alt="victor-pogor"/>
<br />
<sub><b>Victor Pogor</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/wtchangdm">
<img src="https://avatars.githubusercontent.com/u/1546333?v=4" width="100;" alt="wtchangdm"/>
<br />
<sub><b>W.T. Chang</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/anup92k">
<img src="https://avatars.githubusercontent.com/u/51033013?v=4" width="100;" alt="anup92k"/>
<br />
<sub><b>Anup</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/codedge">
<img src="https://avatars.githubusercontent.com/u/4409904?v=4" width="100;" alt="codedge"/>
<br />
<sub><b>Holger Lösken</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/hiifong">
<img src="https://avatars.githubusercontent.com/u/89133723?v=4" width="100;" alt="hiifong"/>
<br />
<sub><b>Hiifong</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/nikusaikou">
<img src="https://avatars.githubusercontent.com/u/32993922?v=4" width="100;" alt="nikusaikou"/>
<br />
<sub><b>Niku</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/onisuly">
<img src="https://avatars.githubusercontent.com/u/8399827?v=4" width="100;" alt="onisuly"/>
<br />
<sub><b>Onisuly</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/quyleanh">
<img src="https://avatars.githubusercontent.com/u/9365035?v=4" width="100;" alt="quyleanh"/>
<br />
<sub><b>Quy Le Anh</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/sarathsp06">
<img src="https://avatars.githubusercontent.com/u/964542?v=4" width="100;" alt="sarathsp06"/>
<br />
<sub><b>Sarath Sadasivan Pillai</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/tomaja-linuxo">
<img src="https://avatars.githubusercontent.com/u/37209662?v=4" width="100;" alt="tomaja-linuxo"/>
<br />
<sub><b>Tomaja</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/ziobron">
<img src="https://avatars.githubusercontent.com/u/4595135?v=4" width="100;" alt="ziobron"/>
<br />
<sub><b>Łukasz Ziobroń</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/d-baer">
<img src="https://avatars.githubusercontent.com/u/22482986?v=4" width="100;" alt="d-baer"/>
<br />
<sub><b>D-baer</b></sub>
</a>
</td></tr>
</table>
<!-- readme: contributors,d-baer -end -->
## Bots
<!-- readme: bots -start -->
<table>
<tr>
<td align="center">
<a href="https://github.com/dependabot[bot]">
<img src="https://avatars.githubusercontent.com/in/29110?v=4" width="100;" alt="dependabot[bot]"/>
<br />
<sub><b>dependabot[bot]</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/github-actions[bot]">
<img src="https://avatars.githubusercontent.com/in/15368?v=4" width="100;" alt="github-actions[bot]"/>
<br />
<sub><b>github-actions[bot]</b></sub>
</a>
</td></tr>
</table>
<!-- readme: bots -end -->
+6
View File
@@ -2,6 +2,12 @@
title: My First Post
date: 2023-02-20T20:14:22+08:00
draft: false
categories:
- blog
collections:
- blog
tags:
- blog
---
A blog (a truncation of "weblog") is an informational website published on the World Wide Web consisting of discrete, often informal diary-style text entries (posts). Posts are typically displayed in reverse chronological order so that the most recent post appears first, at the top of the web page. Until 2009, blogs were usually the work of a single individual,[citation needed] occasionally of a small group, and often covered a single subject or topic. In the 2010s, "multi-author blogs" (MABs) emerged, featuring the writing of multiple authors and sometimes professionally edited. MABs from newspapers, other media outlets, universities, think tanks, advocacy groups, and similar institutions account for an increasing quantity of blog traffic. The rise of Twitter and other "microblogging" systems helps integrate MABs and single-author blogs into the news media. Blog can also be used as a verb, meaning to maintain or add content to a blog.
+17 -35
View File
@@ -1,48 +1,30 @@
# -------------------------------------------------------------------------------------
# =====================================================================================
# The following is a necessary configuration for the FixIt theme.
# =====================================================================================
# -------------------------------------------------------------------------------------
# Hugo Configuration
# See: https://gohugo.io/getting-started/configuration/
# -------------------------------------------------------------------------------------
title = "My Hugo FixIt Site"
title = "Hugo FixIt Demo"
baseURL = "http://example.org/"
# Change the default theme to be use when building the site with Hugo
# theme = "FixIt"
[markup]
# Syntax Highlighting (https://gohugo.io/content-management/syntax-highlighting)
[markup.highlight]
########## necessary configurations ##########
# https://github.com/hugo-fixit/FixIt/issues/43
codeFences = true
lineNos = true
lineNumbersInTable = true
noClasses = false
########## necessary configurations ##########
guessSyntax = true
# Goldmark is from Hugo 0.60 the default library used for Markdown
[markup.goldmark]
[markup.goldmark.extensions]
definitionList = true
footnote = true
linkify = true
strikethrough = true
table = true
taskList = true
typographer = true
[markup.goldmark.renderer]
# whether to use HTML tags directly in the document
unsafe = true
# Table Of Contents settings
[markup.tableOfContents]
ordered = false
startLevel = 2
endLevel = 6
_merge = "shallow"
[outputs]
home = ["HTML", "RSS", "JSON", "archives"]
page = ["HTML", "MarkDown"]
section = ["HTML", "RSS"]
taxonomy = ["HTML"]
term = ["HTML", "RSS"]
_merge = "shallow"
# -------------------------------------------------------------------------------------
# Taxonomies Configuration
# See: https://gohugo.io/content-management/taxonomies/#configure-taxonomies
# -------------------------------------------------------------------------------------
[taxonomies]
_merge = "shallow"
# -------------------------------------------------------------------------------------
# Theme Core Configuration
+1 -1
View File
@@ -10,5 +10,5 @@
"https://docs-[A-z0-9]{9}-cell-x\\.vercel\\.app",
"http://localhost:[0-9]+"
],
"defaultCommentOrder": "oldest"
"defaultCommentOrder": "newest"
}
+100 -64
View File
@@ -63,6 +63,8 @@ enableEmoji = true
icon = "fa-solid fa-archive"
# FixIt 0.2.16 | NEW set menu item type, optional values: ["mobile", "desktop"]
type = ""
# FixIt 0.3.9 | NEW whether to show the submenu item divider line
divided = false
[[menu.main]]
identifier = "categories"
parent = ""
@@ -133,7 +135,7 @@ enableEmoji = true
[module]
[module.hugoVersion]
extended = true
min = "0.123.0"
min = "0.132.0"
# -------------------------------------------------------------------------------------
# Markup related configuration in Hugo
@@ -152,18 +154,41 @@ enableEmoji = true
########## necessary configurations ##########
guessSyntax = true
# Goldmark is from Hugo 0.60 the default library used for Markdown
# https://gohugo.io/getting-started/configuration-markup/#goldmark
[markup.goldmark]
duplicateResourceFiles = false
[markup.goldmark.extensions]
definitionList = true
footnote = true
linkify = true
strikethrough = true
linkifyProtocol = 'https'
strikethrough = false
table = true
taskList = true
typographer = true
# https://gohugo.io/getting-started/configuration-markup/#extras
[markup.goldmark.extensions.extras]
[markup.goldmark.extensions.extras.delete]
enable = true
[markup.goldmark.extensions.extras.insert]
enable = true
[markup.goldmark.extensions.extras.mark]
enable = true
[markup.goldmark.extensions.extras.subscript]
enable = true
[markup.goldmark.extensions.extras.superscript]
enable = true
# TODO passthrough refactor https://gohugo.io/getting-started/configuration-markup/#parserattributeblock
# TODO hugo 0.122.0 https://gohugo.io/content-management/mathematics/
[markup.goldmark.parser]
[markup.goldmark.parser.attribute]
block = true
title = true
[markup.goldmark.renderer]
hardWraps = false
# whether to use HTML tags directly in the document
unsafe = true
xhtml = false
# Table Of Contents settings
[markup.tableOfContents]
ordered = false
@@ -206,12 +231,8 @@ enableEmoji = true
# -------------------------------------------------------------------------------------
[mediaTypes]
# Options to make output .md files
[mediaTypes."text/markdown"]
suffixes = ["md"]
# Options to make output .txt files
[mediaTypes."text/plain"]
suffixes = ["txt"]
# [mediaTypes."application/feed+json"]
# suffixes = ["json"]
# -------------------------------------------------------------------------------------
# Output Format Definitions
@@ -219,11 +240,6 @@ enableEmoji = true
# -------------------------------------------------------------------------------------
[outputFormats]
# Options to make output .md files
[outputFormats.MarkDown]
mediaType = "text/markdown"
isPlainText = true
isHTML = false
# FixIt 0.3.0 | NEW Options to make output /archives/index.html file
[outputFormats.archives]
path = "archives"
@@ -232,6 +248,7 @@ enableEmoji = true
isPlainText = false
isHTML = true
permalinkable = true
notAlternative = true
# FixIt 0.3.0 | NEW Options to make output /offline/index.html file
[outputFormats.offline]
path = "offline"
@@ -240,18 +257,29 @@ enableEmoji = true
isPlainText = false
isHTML = true
permalinkable = true
notAlternative = true
# FixIt 0.3.0 | NEW Options to make output readme.md file
[outputFormats.README]
[outputFormats.readme]
baseName = "readme"
mediaType = "text/markdown"
isPlainText = true
isHTML = false
notAlternative = true
# FixIt 0.3.0 | CHANGED Options to make output baidu_urls.txt file
[outputFormats.baidu_urls]
baseName = "baidu_urls"
mediaType = "text/plain"
isPlainText = true
isHTML = false
notAlternative = true
# FixIt 0.3.10 | NEW Options to make output search.json file
[outputFormats.search]
baseName = "search"
mediaType = "application/json"
rel = "search"
isPlainText = true
isHTML = false
permalinkable = true
# -------------------------------------------------------------------------------------
# Customizing Output Formats
@@ -259,17 +287,17 @@ enableEmoji = true
# -------------------------------------------------------------------------------------
# Options to make hugo output files, the optional values are below:
# home: ["HTML", "RSS", "JSON", "archives", "offline", "README", "baidu_urls"]
# page: ["HTML", "MarkDown"]
# section: ["HTML", "RSS"]
# taxonomy: ["HTML", "RSS"]
# term: ["HTML", "RSS"]
# home = ["html", "rss", "archives", "offline", "readme", "baidu_urls", "search"]
# page = ["html", "markdown"]
# section = ["html", "rss"]
# taxonomy = ["html"]
# term = ["html", "rss"]
[outputs]
home = ["HTML", "RSS", "JSON", "archives"]
page = ["HTML", "MarkDown"]
section = ["HTML", "RSS"]
taxonomy = ["HTML"]
term = ["HTML", "RSS"]
home = ["html", "rss", "archives", "offline", "search"]
page = ["html", "markdown"]
section = ["html", "rss"]
taxonomy = ["html"]
term = ["html", "rss"]
# -------------------------------------------------------------------------------------
# Taxonomies Configuration
@@ -306,8 +334,6 @@ enableEmoji = true
enablePWA = false
# FixIt 0.2.14 | NEW whether to add external Icon for external links automatically
externalIcon = false
# FixIt 0.3.0 | NEW whether to reverse the order of the navigation menu
navigationReverse = false
# FixIt 0.3.0 | NEW whether to add site title to the title of every page
# remember to set up your site title in `hugo.toml` (e.g. title = "title")
withSiteTitle = true
@@ -419,13 +445,16 @@ enableEmoji = true
sticky = false
showHome = false
# FixIt 0.3.10 | NEW Post navigation config
[params.navigation]
# whether to show the post navigation in section pages scope
inSection = false
# whether to reverse the next/previous post navigation order
reverse = false
# 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 = ""
# whether to show copyright info
copyright = true
# whether to show the author
@@ -471,8 +500,12 @@ enableEmoji = true
paginate = 20
# date format (month and day)
dateFormat = "01-02"
# amount of RSS pages
rss = 10
# FixIt 0.3.10 | NEW Section feed config for RSS, Atom and JSON feed.
[params.section.feed]
# The number of posts to include in the feed. If set to -1, all posts.
limit = -1
# whether to show the full text content in feed.
fullText = false
# FixIt 0.2.13 | NEW recently updated pages config
# TODO refactor to support archives, section, taxonomy and term
[params.section.recentlyUpdated]
@@ -481,14 +514,18 @@ enableEmoji = true
days = 30
maxCount = 10
# List (category or tag) page config
# Term list (category or tag) page config
[params.list]
# special amount of posts in each list page
paginate = 20
# date format (month and day)
dateFormat = "01-02"
# amount of RSS pages
rss = 10
# FixIt 0.3.10 | NEW Term list feed config for RSS, Atom and JSON feed.
[params.list.feed]
# The number of posts to include in the feed. If set to -1, all posts.
limit = -1
# whether to show the full text content in feed.
fullText = false
# FixIt 0.2.17 | NEW TagCloud config for tags page
[params.tagcloud]
@@ -500,8 +537,6 @@ enableEmoji = true
# Home page config
[params.home]
# amount of RSS pages
rss = 10
# Home page profile
[params.home.profile]
enable = false
@@ -672,11 +707,16 @@ enableEmoji = true
# FixIt 0.2.13 | NEW watermark's fontFamily
fontFamily = "inherit"
# FixIt 0.2.12 | NEW Busuanzi count
[params.ibruce]
# FixIt 0.3.10 | NEW Busuanzi count
[params.busuanzi]
# whether to enable busuanzi count
enable = false
# Enable in post meta
enablePost = false
# busuanzi count core script source. Default is https://vercount.one/js
source = "https://vercount.one/js"
# whether to show the site views
siteViews = true
# whether to show the page views
pageViews = true
# Site verification code config for Google/Bing/Yandex/Pinterest/Baidu/360/Sogou
[params.verification]
@@ -777,13 +817,12 @@ enableEmoji = true
# "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.3.10 | NEW Global Feed config for RSS, Atom and JSON feed.
[params.feed]
# The number of posts to include in the feed. If set to -1, all posts.
limit = 10
# whether to show the full text content in feed.
fullText = true
# FixIt 0.2.15 | NEW Developer options
# Select the scope named `public_repo` to generate personal access token,
@@ -792,11 +831,6 @@ enableEmoji = true
enable = false
# Check for updates
c4u = false
# Mobile Devtools config
[params.dev.mDevtools]
enable = false
# "vConsole", "eruda" supported
type = "vConsole"
# Page config
[params.page]
@@ -806,14 +840,15 @@ enableEmoji = true
hiddenFromHomePage = false
# whether to hide a page from search results
hiddenFromSearch = false
# FixIt 0.3.0 | NEW whether to hide a page from RSS feed
hiddenFromRss = false
# FixIt 0.3.0 | NEW whether to hide a page from related posts
hiddenFromRelated = false
# FixIt 0.3.10 | NEW whether to hide a page from RSS, Atom and JSON feed
hiddenFromFeed = false
# whether to enable twemoji
twemoji = false
# whether to enable lightgallery
# FixIt 0.2.18 | CHANGED if set to "force", images in the content will be forced to shown as the gallery.
# FixIt 0.2.18 | CHANGED whether to enable lightgallery
# set to true, images in the content will be shown as the gallery if the image has a title, e.g. ![alt](src "title")
# set to "force", images in the content will be forced to shown as the gallery regardless of the image has a title or not, e.g. ![alt](src)
lightgallery = false
# whether to enable the ruby extended syntax
ruby = true
@@ -831,9 +866,7 @@ enableEmoji = true
linkToEdit = true
# FixIt 0.3.0 | NEW whether to show link to report issue for the post
linkToReport = true
# whether to show the full text content in RSS
rssFullText = false
# FixIt 0.2.13 | NEW Page style ["narrow", "normal", "wide", ...]
# FixIt 0.3.10 | CHANGED Page style ["narrow", "normal", "wide", ...]
pageStyle = "normal"
# FixIt 0.2.17 | CHANGED Auto Bookmark Support
# If true, save the reading progress when closing the page.
@@ -904,11 +937,13 @@ enableEmoji = true
copyTex = true
# KaTeX extension mhchem
mhchem = true
# Code config
# Code wrapper config
[params.page.code]
# whether to show the copy button of the code block
# FixIt 0.3.9 | NEW whether to enable the code wrapper
enable = true
# whether to show the copy button of the code wrapper
copy = true
# FixIt 0.2.13 | NEW whether to show the edit button of the code block
# FixIt 0.2.13 | NEW whether to show the edit button of the code wrapper
edit = true
# the maximum number of lines of displayed code by default
maxShownLines = 10
@@ -1059,6 +1094,7 @@ enableEmoji = true
texRenderer = false # FixIt 0.2.16 | NEW
search = false # FixIt 0.2.16 | NEW
recaptchaV3Key = "" # FixIt 0.2.16 | NEW
turnstileKey = "" # FixIt 0.3.8 | NEW
reaction = false # FixIt 0.2.18 | NEW
# Facebook comment config (https://developers.facebook.com/docs/plugins/comments)
[params.page.comment.facebook]
@@ -1109,7 +1145,7 @@ enableEmoji = true
category = ""
categoryId = ""
mapping = ""
origin = "https://giscus.app" # Or set it to your self-hosted domain
origin = "https://giscus.app" # FixIt NEW | 0.3.7 Or set it to your self-hosted domain
strict = "0" # FixIt NEW | 0.2.18
term = ""
reactionsEnabled = "1"
+10 -1
View File
@@ -7,7 +7,7 @@
[init]
configurationError = ""
compatibilityError = ""
RCVersionWarn = ""
devVersionWarn = ""
devEnvWarn = ""
quicklyUpgrade = ""
# === init ===
@@ -173,6 +173,15 @@ other = "Offline"
other = "Sie sind nicht mit dem Internet verbunden, es stehen nur zwischengespeicherte Seiten zur Verfügung."
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Notiz"
+12 -3
View File
@@ -5,8 +5,8 @@
[init]
configurationError = "Configuration Error\nYou haven't configured the FixIt version param correctly yet. See https://fixit.lruihao.cn/documentation/basics/#theme-configuration"
compatibilityError = "Compatibility Error ({{ .From }} -> {{ .To }}):\nYou have an incompatible update. See https://github.com/hugo-fixit/FixIt/releases"
RCVersionWarn = "You are using a development version of FixIt. Please consider using a stable version.\nSee https://github.com/hugo-fixit/FixIt/releases"
devEnvWarn = "Current environment is \"development\". The \"comment system\", \"CDN\" and \"fingerprint\" will be disabled."
devVersionWarn = "You are using a development version of FixIt. Please consider using a stable version.\nSee https://github.com/hugo-fixit/FixIt/releases"
devEnvWarn = "Current environment is \"development\". The \"comment system\", \"PWA\", \"CDN\" and \"fingerprint\" will be disabled."
quicklyUpgrade = "Quickly upgrade use command: "
# === init ===
@@ -14,7 +14,7 @@ quicklyUpgrade = "Quickly upgrade use command: "
[baseof]
backToTop = "Back to Top"
viewComments = "View Comments"
noscript = "यह वेबसाइट जावास्क्रिप्ट सक्षम होने पर सबसे अच्छा काम करती है।"
noscript = "This website works best with JavaScript enabled."
# === baseof ===
# === Taxonomy ===
@@ -172,6 +172,15 @@ other = "Offline"
other = "You are not connected to the Internet, only cached pages will be available."
# === offline ===
# === GitHub Alert ===
[alert]
note = "Note"
tip = "Tip"
important = "Important"
warning = "Warning"
caution = "Caution"
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Note"
+10 -1
View File
@@ -7,7 +7,7 @@
[init]
configurationError = ""
compatibilityError = ""
RCVersionWarn = ""
devVersionWarn = ""
devEnvWarn = ""
quicklyUpgrade = ""
# === init ===
@@ -173,6 +173,15 @@ other = "desconectado"
other = "No está conectado a Internet, solo estarán disponibles las páginas almacenadas en caché."
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Nota"
+11 -2
View File
@@ -6,8 +6,8 @@
[init]
configurationError = "Erreur de configuration\nVous n'avez pas configuré la version de FixIt correctement. Voir https://fixit.lruihao.cn/documentation/basics/#theme-configuration"
compatibilityError = "Erreur de compatibilité ({{ .From }} -> {{ .To }}):\nVous avez une mise à jour incompatible. Voir https://github.com/hugo-fixit/FixIt/releases"
RCVersionWarn = "Vous utilisez une version de développement de FixIt. Veuillez considérer l'utilisation d'une version stable.\nVoir https://github.com/hugo-fixit/FixIt/releases"
devEnvWarn = "L'environnement actuel est \"développement\". Le \"système de commentaires\", le \"CDN\" et la \"prise d'empreinte\" seront désactivés."
devVersionWarn = "Vous utilisez une version de développement de FixIt. Veuillez considérer l'utilisation d'une version stable.\nVoir https://github.com/hugo-fixit/FixIt/releases"
devEnvWarn = "L'environnement actuel est \"développement\". Le \"système de commentaires\", le \"PWA\", le \"CDN\" et la \"prise d'empreinte\" seront désactivés."
quicklyUpgrade = "La mise à jour rapide utilise la commande: "
# === init ===
@@ -172,6 +172,15 @@ other = "Hors ligne"
other = "Vous n'êtes pas connecté à Internet, seules les pages mises en cache seront disponibles."
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Remarque"
+11 -3
View File
@@ -6,8 +6,8 @@
[init]
configurationError = "कन्फ़िग्यरेशन त्रुटि \nआपने फिक्सइट संस्करण पैरामीटर को सही ढंग से कॉन्फ़िगर नहीं किया है।. यह देखें: https://fixit.lruihao.cn/documentation/basics/#theme-configuration"
compatibilityError = "संगतता त्रुटि ({{ .From }} -> {{ .To }}):\nआपके पास एक असंगत अपडेट है. यह देखें: https://github.com/hugo-fixit/FixIt/releases"
RCVersionWarn = "आप फिक्सइट के डिवेलपर संस्करण का उपयोग कर रहे हैं। कृपया एक स्थिर संस्करण का उपयोग करने पर विचार करें।\nयह देखें: https://github.com/hugo-fixit/FixIt/releases"
devEnvWarn = "वर्तमान परिवेश \"डिवेलप्मेंट\" का है। \"टिप्पणी प्रणाली\", \"सीडीएन\" और \"फ़िंगरप्रिंट\" अक्षम कर दिए जाएंगे। "
devVersionWarn = "आप फिक्सइट के डिवेलपर संस्करण का उपयोग कर रहे हैं। कृपया एक स्थिर संस्करण का उपयोग करने पर विचार करें।\nयह देखें: https://github.com/hugo-fixit/FixIt/releases"
devEnvWarn = "वर्तमान परिवेश \"डिवेलप्मेंट\" का है। \"टिप्पणी प्रणाली\", \"पीडब्ल्यूए\", \"सीडीएन\" और \"फ़िंगरप्रिंट\" अक्षम कर दिए जाएंगे। "
quicklyUpgrade = "शीघ्रता से अपग्रेड यह कमांड का उपयोग करें: "
# === init ===
@@ -15,7 +15,6 @@ quicklyUpgrade = "शीघ्रता से अपग्रेड यह क
[baseof]
backToTop = "वापस शीर्ष पर"
viewComments = "टिप्पणियाँ देखें"
# This website works best with JavaScript enabled.
noscript = "यह वेबसाइट जेएस को चालू करके बेहतर काम करती है।"
# === baseof ===
@@ -174,6 +173,15 @@ other = "ऑफलाइन"
other = "आप इंटरनेट से कनेक्ट नहीं हैं, केवल कैश्ड पेज ही उपलब्ध होंगे।"
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "ध्यान दें"
+10 -1
View File
@@ -7,7 +7,7 @@
[init]
configurationError = ""
compatibilityError = ""
RCVersionWarn = ""
devVersionWarn = ""
devEnvWarn = ""
quicklyUpgrade = ""
# === init ===
@@ -173,6 +173,15 @@ other = "disconnesso"
other = "Non sei connesso a Internet, saranno disponibili solo le pagine memorizzate nella cache."
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Note"
+10 -1
View File
@@ -7,7 +7,7 @@
[init]
configurationError = ""
compatibilityError = ""
RCVersionWarn = ""
devVersionWarn = ""
devEnvWarn = ""
quicklyUpgrade = ""
# === init ===
@@ -173,6 +173,15 @@ other = "Offline"
other = "Nie masz połączenia z Internetem, dostępne będą tylko strony z pamięci podręcznej."
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Notka"
+10 -1
View File
@@ -7,7 +7,7 @@
[init]
configurationError = ""
compatibilityError = ""
RCVersionWarn = ""
devVersionWarn = ""
devEnvWarn = ""
quicklyUpgrade = ""
# === init ===
@@ -173,6 +173,15 @@ other = "Offline"
other = "Você não está conectado à Internet, apenas as páginas em cache estarão disponíveis."
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Nota"
+10 -1
View File
@@ -7,7 +7,7 @@
[init]
configurationError = ""
compatibilityError = ""
RCVersionWarn = ""
devVersionWarn = ""
devEnvWarn = ""
quicklyUpgrade = ""
# === init ===
@@ -173,6 +173,15 @@ other = "Deconectat"
other = "Nu sunteți conectat la Internet, vor fi disponibile doar paginile stocate în cache."
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Notă"
+10 -1
View File
@@ -7,7 +7,7 @@
[init]
configurationError = ""
compatibilityError = ""
RCVersionWarn = ""
devVersionWarn = ""
devEnvWarn = ""
quicklyUpgrade = ""
# === init ===
@@ -173,6 +173,15 @@ other = "Не в сети"
other = "Вы не подключены к интернету, будут доступны только кешированные страницы."
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Замечание"
+10 -1
View File
@@ -7,7 +7,7 @@
[init]
configurationError = ""
compatibilityError = ""
RCVersionWarn = ""
devVersionWarn = ""
devEnvWarn = ""
quicklyUpgrade = ""
# === init ===
@@ -173,6 +173,15 @@ other = "Оффлине"
other = "Нисте повезани на Интернет, биће доступне само кеширане странице."
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Напомена"
+10 -1
View File
@@ -6,7 +6,7 @@
[init]
configurationError = ""
compatibilityError = ""
RCVersionWarn = ""
devVersionWarn = ""
devEnvWarn = ""
quicklyUpgrade = ""
# === init ===
@@ -172,6 +172,15 @@ other = "ngoại tuyến"
other = "Bạn chưa kết nối với Internet, chỉ các trang được lưu trong bộ nhớ cache sẽ khả dụng."
# === offline ===
# === GitHub Alert ===
[alert]
note = ""
tip = ""
important = ""
warning = ""
caution = ""
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "Ghi chú"
+11 -2
View File
@@ -6,8 +6,8 @@
[init]
configurationError = "配置文件错误\n您还没有正确配置 FixIt 的版本参数。参考 https://fixit.lruihao.cn/zh-cn/documentation/basics/#theme-configuration"
compatibilityError = "兼容性错误 ({{ .From }} -> {{ .To }}):\n您进行了一次不兼容的更新。参考 https://github.com/hugo-fixit/FixIt/releases"
RCVersionWarn = "您正在使用开发版的 FixIt,请考虑使用稳定版。\n见 https://github.com/hugo-fixit/FixIt/releases"
devEnvWarn = "当前运行环境是“development”。“评论系统”“CDN”和“fingerprint”不会启用。"
devVersionWarn = "您正在使用开发版的 FixIt,请考虑使用稳定版。\n见 https://github.com/hugo-fixit/FixIt/releases"
devEnvWarn = "当前运行环境是“development”。“评论系统”、“PWA”、“CDN”和“fingerprint”不会启用。"
quicklyUpgrade = "使用命令快速升级:"
# === init ===
@@ -168,6 +168,15 @@ other = "离线"
other = "您没有连接到 Internet,只有缓存的页面可用。"
# === offline ===
# === GitHub Alert ===
[alert]
note = "注意"
tip = "提示"
important = "重要"
warning = "警告"
caution = "小心"
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "注意"
+11 -2
View File
@@ -6,8 +6,8 @@
[init]
configurationError = "配置文件錯誤\n您還沒有正確配置 FixIt 的版本參數。參考 https://fixit.lruihao.cn/zh-cn/documentation/basics/#theme-configuration"
compatibilityError = "兼容性錯誤 ({{ .From }} -> {{ .To }}):\n您進行了一次不兼容的更新。参考 https://github.com/hugo-fixit/FixIt/releases"
RCVersionWarn = "您正在使用開發版的 FixIt,請考慮使用穩定版。\n見 https://github.com/hugo-fixit/FixIt/releases"
devEnvWarn = "當前運行環境是“development”。“評論系統”“CDN”和“fingerprint”不會啟用。"
devVersionWarn = "您正在使用開發版的 FixIt,請考慮使用穩定版。\n見 https://github.com/hugo-fixit/FixIt/releases"
devEnvWarn = "當前運行環境是“development”。“評論系統”、“PWA”、“CDN”和“fingerprint”不會啟用。"
quicklyUpgrade = "使用命令快速升級:"
# === init ===
@@ -168,6 +168,15 @@ other = "離線"
other = "您沒有連接到 Internet,只有緩存的頁面可用。"
# === offline ===
# === GitHub Alert ===
[alert]
note = "注意"
tip = "提示"
important = "重要"
warning = "警告"
caution = "小心"
# === GitHub Alert ===
# === shortcodes/admonition.html ===
[admonition]
note = "注意"
Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 KiB

After

Width:  |  Height:  |  Size: 436 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 109 KiB

@@ -0,0 +1,11 @@
{{- $attrs := "" }}
{{- range $key, $value := .Attributes }}
{{- $attrs = printf "%s %s=%q" $attrs $key $value }}
{{- end }}
{{- $attrs = trim $attrs " " }}
{{- if eq .Type "alert" -}}
{{- dict "Text" .Text "Type" .AlertType "Attributes" .Attributes | partial "plugin/alert.html" -}}
{{- else -}}
<blockquote {{- with $attrs }} {{ . | safeHTMLAttr }}{{ end }}>{{ .Text | safeHTML }}</blockquote>
{{- end -}}
@@ -0,0 +1,2 @@
{{- dict "Options" .Attributes "Inner" .Inner | partial "plugin/echarts.html" -}}
{{- .Page.Store.Set "hasEcharts" true -}}
@@ -1,5 +1,2 @@
<pre class="mermaid">
{{- .Inner | safeHTML }}
</pre>
<template>{{- .Inner | safeHTML }}</template>
{{- dict "Options" .Attributes "Inner" .Inner | partial "plugin/mermaid.html" -}}
{{- .Page.Store.Set "hasMermaid" true -}}
@@ -0,0 +1 @@
{{- dict "Options" .Attributes "Inner" .Inner | partial "plugin/timeline.html" -}}
+1 -1
View File
@@ -1,5 +1,5 @@
{{- /* Read the config and format */ -}}
{{- $params := partial "function/params.html" -}}
{{- $params := .Page.Params | merge site.Params.page -}}
{{- $h1Format := $params.heading.number.format.h1 | default "{title}" -}}
{{- $h2Format := $params.heading.number.format.h2 | default "{h2} {title}" -}}
{{- $h3Format := $params.heading.number.format.h3 | default "{h2}.{h3} {title}" -}}
+2 -2
View File
@@ -2,12 +2,12 @@
{{- if .Title | and .Text -}}
{{- $linked := ne $params.lightgallery false -}}
<figure>
{{- dict "Src" .Destination "Alt" .Text "Caption" .Text "Title" .Title "Linked" $linked "Responsive" true | partial "plugin/image.html" -}}
{{- dict "Src" .Destination "Alt" .Text "Caption" .Text "Title" .Title "Linked" $linked "Responsive" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
<figcaption class="image-caption">
{{- .Text | safeHTML -}}
</figcaption>
</figure>
{{- else -}}
{{- $linked := (eq $params.lightgallery "force") | or ($params.lightgallery | and (ne .Title "")) -}}
{{- dict "Src" .Destination "Alt" .Text "Title" .Title "Linked" $linked "Responsive" true | partial "plugin/image.html" -}}
{{- dict "Src" .Destination "Alt" .Text "Title" .Title "Linked" $linked "Responsive" true "Resources" .Page.Resources | partial "plugin/image.html" -}}
{{- end -}}
@@ -51,7 +51,8 @@
{{- if eq $repost.enable true -}}
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
{{- end -}}
{{- title .LinkTitle -}}
{{- /* Use the original title after archiving the articles */ -}}
{{- title .Title -}}
</a>
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Date.Format }}'>
{{- .Date | dateFormat ($.Site.Params.archives.dateFormat | default "01-02") -}}

Some files were not shown because too many files have changed in this diff Show More