Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4203b573cb | |||
| 5991958bca | |||
| afc504e33a | |||
| c8081affa6 | |||
| 1f22b538b5 | |||
| 442ec84049 | |||
| 52184d96d4 | |||
| 5dac03a90d | |||
| e2cf5fe31d | |||
| 8798f5b51f | |||
| 3b99838980 | |||
| 5aaacec004 | |||
| 349de54009 | |||
| 312b6363dc | |||
| a67efe41be | |||
| 64529c99c8 | |||
| ede47a2bae | |||
| b7ed9cac69 | |||
| ccce5b52fd | |||
| e7dd4c838c | |||
| 18643271f8 | |||
| 91f3c7c3cf | |||
| 466bb7b7e9 | |||
| 3ffef8acb0 | |||
| 6a83650506 | |||
| 1c84791db9 | |||
| 24873c5e99 | |||
| 51d64cb152 | |||
| 94553e9b8e | |||
| 656f00b6a4 | |||
| 9a1b4570a7 | |||
| 976db36bc8 | |||
| c0942a92b9 | |||
| 0a5007921a | |||
| a482e14bd5 | |||
| 9109ef22e2 | |||
| ed2f5f6d10 | |||
| 4065ce606a | |||
| 72a77c2fc5 | |||
| 291364255c | |||
| 66b86d97cf | |||
| 16c903fac9 | |||
| 7c85205519 | |||
| 7c67b90acf | |||
| 6c752c1bbd | |||
| b8ecfc1127 | |||
| a0b4b81fd6 |
@@ -0,0 +1 @@
|
||||
node build/update-version.js --stage commit
|
||||
@@ -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.
|
||||
|
||||
@@ -1,36 +1,57 @@
|
||||
# FixIt Theme | Hugo
|
||||
<!-- markdownlint-disable-file MD033 MD041 -->
|
||||

|
||||
|
||||
<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
|
||||
|
||||
[](https://github.com/hugo-fixit/FixIt/releases)
|
||||
[](https://gohugo.io/)
|
||||
[](https://gohugo.io/)
|
||||
[](/LICENSE)
|
||||
[](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
|
||||
|
||||

|
||||
<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
|
||||
|
||||
1. [Installation](https://fixit.lruihao.cn/documentation/installation/)
|
||||
2. [Getting Started](https://fixit.lruihao.cn/documentation/getting-started/)
|
||||
3. [Content Management](https://fixit.lruihao.cn/documentation/content-management/)
|
||||
4. [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/generate)
|
||||
- [hugo-fixit/hugo-fixit-start1](https://github.com/hugo-fixit/hugo-fixit-start1/generate)
|
||||
- [hugo-fixit/docs](https://github.com/hugo-fixit/docs/generate)
|
||||
- [Lruihao/hugo-blog](https://github.com/Lruihao/hugo-blog/generate)
|
||||
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
|
||||
|
||||
@@ -95,12 +116,12 @@ To see this theme in action, here are some [live demo sites](https://fixit.lruih
|
||||
- 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
|
||||
@@ -133,27 +154,30 @@ FixIt supports the following languages:
|
||||
|
||||
All feedback is welcome! Head over to the [discussions][discussions], [Pull requests][pulls] and [issues][issues] tracker.
|
||||
|
||||
| Community | Description |
|
||||
| :------------------------- | :------------------------------- |
|
||||
| [Discussions][discussions] | Official GitHub discussion forum |
|
||||
| [FixIt QQ group][qq-group] | Official QQ group: `814031017` |
|
||||
| [Hugo FixIt Planet][zsxq] | Official Knowledge Planet |
|
||||
| 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 |
|
||||
|
||||
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/oZYCt
|
||||
[zsxq]: https://t.zsxq.com/GgKEW
|
||||
[wx-mp]: https://lruihao.cn/images/qr-wx-mp.webp
|
||||
|
||||
## Contributing
|
||||
|
||||
- [Roadmap of FixIt](https://github.com/orgs/hugo-fixit/projects/2)
|
||||
We welcome you to join the development of FixIt. Please see [contributing document](CONTRIBUTING.md). 🤗
|
||||
|
||||
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for getting started with the contribution.
|
||||
Also, we welcome Issue or PR to our [official-components](https://github.com/hugo-fixit).
|
||||
|
||||
Make sure that you follow [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) while contributing and engaging in the discussions.
|
||||
|
||||
**When contributing, please first discuss the change you wish to make via an issue on this repository before making the actual change**.
|
||||
> [!note]
|
||||
> When contributing, please first discuss the change you wish to make via a discussion on this repository before making the actual change.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
@@ -186,6 +210,7 @@ Thanks to all the [contributors](https://github.com/hugo-fixit/FixIt/graphs/cont
|
||||
- [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/)
|
||||
@@ -193,9 +218,8 @@ Thanks to all the [contributors](https://github.com/hugo-fixit/FixIt/graphs/cont
|
||||
- [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>
|
||||
|
||||
@@ -211,20 +235,14 @@ Thanks to all the [contributors](https://github.com/hugo-fixit/FixIt/graphs/cont
|
||||
|
||||
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
|
||||
|
||||
[](https://github.com/hugo-fixit/FixIt)
|
||||
|
||||
If you enjoy the theme, please consider buying me a coffee ☕️. Thanks!
|
||||
|
||||
- [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")
|
||||
|
||||
@@ -1,36 +1,57 @@
|
||||
# FixIt 主题 | Hugo
|
||||
<!-- markdownlint-disable-file MD033 MD041 -->
|
||||

|
||||
|
||||
<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
|
||||
|
||||
[](https://github.com/hugo-fixit/FixIt/releases)
|
||||
[](https://gohugo.io/)
|
||||
[](https://gohugo.io/)
|
||||
[](/LICENSE)
|
||||
[](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]
|
||||
## 即时预览
|
||||
|
||||

|
||||
<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>
|
||||
|
||||
## 主题文档
|
||||
|
||||
1. [安装篇](https://fixit.lruihao.cn/zh-cn/documentation/installation/)
|
||||
2. [入门篇](https://fixit.lruihao.cn/zh-cn/documentation/getting-started/)
|
||||
3. [内容管理](https://fixit.lruihao.cn/zh-cn/documentation/content-management/)
|
||||
4. [进阶篇](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/generate)
|
||||
- [hugo-fixit/hugo-fixit-start1](https://github.com/hugo-fixit/hugo-fixit-start1/generate)
|
||||
- [hugo-fixit/docs](https://github.com/hugo-fixit/docs/generate)
|
||||
- [Lruihao/hugo-blog](https://github.com/Lruihao/hugo-blog/generate)
|
||||
点击以下链接使用模板生成一个新的仓库:
|
||||
|
||||
## 谁在用 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 -->
|
||||
|
||||
## 特性
|
||||
|
||||
@@ -95,17 +116,17 @@
|
||||
- 支持多种**注释**的 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/) 供用户选择。
|
||||
|
||||
## 多语言和国际化
|
||||
|
||||
@@ -129,35 +150,38 @@ FixIt 支持下列语言:
|
||||
|
||||
[语言兼容性](https://fixit.lruihao.cn/zh-cn/theme-documentation-basics/#language-compatibility)
|
||||
|
||||
## 镜像
|
||||
|
||||
Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
|
||||
|
||||
## 社区支持
|
||||
|
||||
所有的反馈都是欢迎的!详见 [Discussions][discussions]、[Pull requests][pulls] 和 [Issues][issues]。
|
||||
|
||||
| 社区 | 说明 |
|
||||
| :--------------------------- | :---------------------- |
|
||||
| [Discussions][discussions] | 官方 GitHub 讨论区 |
|
||||
| [FixIt 主题交流群][qq-group] | 官方 QQ 群:`814031017` |
|
||||
| [Hugo FixIt 星球][zsxq] | 官方知识星球 |
|
||||
| 官方社区 | 说明 |
|
||||
| :--------------------------------- | :------------------------------ |
|
||||
| [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/oZYCt
|
||||
[zsxq]: https://t.zsxq.com/GgKEW
|
||||
[wx-mp]: https://lruihao.cn/images/qr-wx-mp.webp
|
||||
|
||||
## 参与贡献
|
||||
|
||||
- [Hugo FixIt 路线图](https://github.com/orgs/hugo-fixit/projects/2)
|
||||
我们欢迎你加入 FixIt 的开发,贡献出你的一份力量。请看开源 [贡献指南](CONTRIBUTING.md)。 🤗
|
||||
|
||||
请参阅 [CONTRIBUTING.md](CONTRIBUTING.md) 以了解贡献该项目的基本信息。
|
||||
你也可以随时向我们的 [官方插件](https://github.com/hugo-fixit) 提交 Issue 或 Pull Request。
|
||||
|
||||
确保在贡献和参与讨论时遵守 [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)。
|
||||
|
||||
**贡献时,请先通过此存储库上的问题讨论你希望进行的更改,然后再进行实际更改**。
|
||||
|
||||
## 镜像
|
||||
|
||||
- Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
|
||||
> [!note]
|
||||
> 在贡献时,请先通过此存储库上的讨论来讨论你希望进行的更改,然后再进行实际更改。
|
||||
|
||||
## 致谢
|
||||
|
||||
@@ -190,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/)
|
||||
@@ -197,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>
|
||||
|
||||
@@ -215,20 +239,14 @@ FixIt 支持下列语言:
|
||||
|
||||
FixIt 根据 **MIT** 许可协议授权。更多信息请查看 [LICENSE 文件](LICENSE)。
|
||||
|
||||
## 作者
|
||||
|
||||
Follow [Lruihao](https://github.com/Lruihao "在 GitHub 上关注我")
|
||||
|
||||
## 赞助支持
|
||||
|
||||
[](https://github.com/hugo-fixit/FixIt)
|
||||
|
||||
如果你喜爱这个主题,请考虑给我买杯咖啡 ☕️,谢谢!
|
||||
|
||||
- [微信支付](images/wechatpay.jpg)
|
||||
- [支付宝](images/alipay.jpg)
|
||||
- [PayPal](https://paypal.me/Lruihao)
|
||||
|
||||
如果你喜欢这个主题,别忘了留下一颗 ⭐️ 哦,谢谢!
|
||||
## 作者
|
||||
|
||||
[^1]: 主题名称趣谈:“leave it, keep it,love it,fix it”。出现又离开,爱而不得。这像不像那该死的爱情和 BUG 呢?🤣
|
||||
[Lruihao](https://github.com/Lruihao "在 GitHub 上关注我")
|
||||
|
||||
@@ -20,8 +20,8 @@ categories:
|
||||
- draft
|
||||
hiddenFromHomePage: false
|
||||
hiddenFromSearch: false
|
||||
hiddenFromRss: false
|
||||
hiddenFromRelated: false
|
||||
hiddenFromFeed: false
|
||||
summary:
|
||||
resources:
|
||||
- name: featured-image
|
||||
|
||||
@@ -20,8 +20,8 @@ categories:
|
||||
- draft
|
||||
hiddenFromHomePage: false
|
||||
hiddenFromSearch: false
|
||||
hiddenFromRss: false
|
||||
hiddenFromRelated: false
|
||||
hiddenFromFeed: false
|
||||
summary:
|
||||
resources:
|
||||
- name: featured-image
|
||||
|
||||
@@ -21,12 +21,6 @@
|
||||
.d-none {
|
||||
display: none !important;
|
||||
}
|
||||
.d-none-desktop {
|
||||
display: none;
|
||||
}
|
||||
.d-none-mobile {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ms-1,
|
||||
.mx-1 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -469,6 +470,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@import '../_partials/_single/alert';
|
||||
@import '../_partials/_single/code';
|
||||
@import '../_shortcodes';
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -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};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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'] & {
|
||||
|
||||
@@ -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,7 +1,6 @@
|
||||
.post-reward {
|
||||
padding: 1rem;
|
||||
text-align: center;
|
||||
margin-bottom: -1rem;
|
||||
@extend .print-d-none;
|
||||
|
||||
&:has(.reward-ways:empty) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -11,17 +11,21 @@
|
||||
&[data-animation] {
|
||||
.#{$prefix}timeline-item::before {
|
||||
border-color: var(--timeline-color);
|
||||
animation-name: change-border-color;
|
||||
animation-duration: 0.9s;
|
||||
animation-direction: alternate;
|
||||
animation-name: border-color-fade;
|
||||
animation-duration: 2s;
|
||||
animation-iteration-count: infinite;
|
||||
animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
||||
animation-delay: calc(var(--timeline-index) * 0.3s);
|
||||
|
||||
@keyframes change-border-color {
|
||||
to {
|
||||
@keyframes border-color-fade {
|
||||
0% {
|
||||
border-color: var(--timeline-color);
|
||||
}
|
||||
50% {
|
||||
border-color: var(--timeline-circle-color);
|
||||
}
|
||||
100% {
|
||||
border-color: var(--timeline-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,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; // 花青
|
||||
@@ -172,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';
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -27,12 +27,9 @@ libFiles:
|
||||
# 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
|
||||
cryptoMd5JS: crypto-js@4.2.0/md5.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
|
||||
@@ -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
|
||||
|
||||
@@ -27,12 +27,9 @@ libFiles:
|
||||
# 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
|
||||
cryptoMd5JS: crypto-js@4.2.0/md5.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
|
||||
@@ -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
|
||||
|
||||
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -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;
|
||||
|
||||
|
||||
@@ -423,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);
|
||||
@@ -738,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
|
||||
@@ -750,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;
|
||||
}
|
||||
@@ -1042,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() {
|
||||
@@ -1264,7 +1230,6 @@ class FixIt {
|
||||
this.initSiteTime();
|
||||
this.initServiceWorker();
|
||||
this.initWatermark();
|
||||
this.initMDevtools();
|
||||
this.initAutoMark();
|
||||
this.initReward();
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ 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
|
||||
@@ -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
|
||||
|
||||
@@ -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 variables
|
||||
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;
|
||||
|
||||
}));
|
||||
@@ -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}}
|
||||
|
||||
@@ -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;
|
||||
@@ -135,7 +135,7 @@ enableEmoji = true
|
||||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = true
|
||||
min = "0.127.0"
|
||||
min = "0.132.0"
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
# Markup related configuration in Hugo
|
||||
@@ -231,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
|
||||
@@ -244,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"
|
||||
@@ -257,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"
|
||||
@@ -265,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
|
||||
@@ -284,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
|
||||
@@ -331,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
|
||||
@@ -444,6 +445,13 @@ 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
|
||||
@@ -492,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]
|
||||
@@ -502,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]
|
||||
@@ -521,8 +537,6 @@ enableEmoji = true
|
||||
|
||||
# Home page config
|
||||
[params.home]
|
||||
# amount of RSS pages
|
||||
rss = 10
|
||||
# Home page profile
|
||||
[params.home.profile]
|
||||
enable = false
|
||||
@@ -693,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]
|
||||
@@ -797,6 +816,13 @@ enableEmoji = true
|
||||
# ["barber-shop", "big-counter", "bounce", "center-atom", "center-circle", "center-radar", "center-simple",
|
||||
# "corner-indicator", "fill-left", "flash", "flat-top", "loading-bar", "mac-osx", "material", "minimal"]
|
||||
theme = "minimal"
|
||||
|
||||
# FixIt 0.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,
|
||||
@@ -805,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]
|
||||
@@ -819,10 +840,10 @@ 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
|
||||
# FixIt 0.2.18 | CHANGED whether to enable lightgallery
|
||||
@@ -845,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.
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 ===
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 ===
|
||||
|
||||
@@ -173,6 +173,15 @@ other = "ऑफलाइन"
|
||||
other = "आप इंटरनेट से कनेक्ट नहीं हैं, केवल कैश्ड पेज ही उपलब्ध होंगे।"
|
||||
# === offline ===
|
||||
|
||||
# === GitHub Alert ===
|
||||
[alert]
|
||||
note = ""
|
||||
tip = ""
|
||||
important = ""
|
||||
warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "ध्यान दें"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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ă"
|
||||
|
||||
@@ -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 = "Замечание"
|
||||
|
||||
@@ -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 = "Напомена"
|
||||
|
||||
@@ -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ú"
|
||||
|
||||
@@ -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 = "注意"
|
||||
|
||||
@@ -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 = "注意"
|
||||
|
||||
|
After Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 353 KiB After Width: | Height: | Size: 436 KiB |
|
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 -}}
|
||||
@@ -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,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 -}}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
{{- if .Site.Params.search.enable -}}
|
||||
{{- $index := slice -}}
|
||||
{{- $pages := where .Site.RegularPages "Params.password" "eq" nil -}}
|
||||
{{- if .Site.Params.page.hiddenFromSearch -}}
|
||||
{{- $pages = where $pages "Params.hiddenfromsearch" false -}}
|
||||
{{- else -}}
|
||||
{{- $pages = where $pages "Params.hiddenfromsearch" "!=" true -}}
|
||||
{{- end -}}
|
||||
{{- range $pages -}}
|
||||
{{- $uri := .RelPermalink -}}
|
||||
{{- if $.Site.Params.search.absoluteURL -}}
|
||||
{{- $uri = .Permalink -}}
|
||||
{{- end -}}
|
||||
{{- $meta := dict "uri" $uri "title" .Title "tags" .Params.tags "categories" .Params.categories -}}
|
||||
{{- $meta = $.Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format | dict "date" | merge $meta -}}
|
||||
{{- with .Description -}}
|
||||
{{- $index = $index | append (dict "content" . "objectID" $uri | merge $meta) -}}
|
||||
{{- end -}}
|
||||
{{- $params := .Params | merge $.Site.Params.page -}}
|
||||
{{/* Extended Markdown syntax */}}
|
||||
{{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
|
||||
{{/* Remove line number for code */}}
|
||||
{{- $content = $content | replaceRE `<span class="lnt?"> *\d*\n?</span>` "" -}}
|
||||
{{- range $i, $contenti := split $content "<h2 id=" -}}
|
||||
{{- if gt $i 0 -}}
|
||||
{{- $contenti = printf "<h2 id=%v" $contenti -}}
|
||||
{{- end -}}
|
||||
{{- range $j, $contentj := split $contenti "<h3 id=" -}}
|
||||
{{- if gt $j 0 -}}
|
||||
{{- $contentj = printf "<h3 id=%v" $contentj -}}
|
||||
{{- end -}}
|
||||
{{/* Plainify, unescape and remove (\n, \t) */}}
|
||||
{{- $contentj = $contentj | plainify | htmlUnescape | replaceRE `[\n\t ]+` " " -}}
|
||||
{{- if gt $.Site.Params.search.contentLength 0 -}}
|
||||
{{- $contentj = substr $contentj 0 $.Site.Params.search.contentLength -}}
|
||||
{{- end -}}
|
||||
{{- if $contentj | and (ne $contentj " ") -}}
|
||||
{{- $one := printf "%v:%v:%v" $uri $i $j | dict "content" $contentj "objectID" | merge $meta -}}
|
||||
{{- $index = $index | append $one -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $index | jsonify | safeJS -}}
|
||||
{{- end -}}
|
||||
@@ -16,29 +16,15 @@
|
||||
|
||||
{{- /* Content */ -}}
|
||||
{{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
|
||||
{{- if $params.password -}}
|
||||
{{- $saltLen := strings.RuneCount (trim $params.password " ") -}}
|
||||
{{- $saltLen = cond (eq (mod $saltLen 2) 0) (add $saltLen 1) $saltLen -}}
|
||||
{{- $base64EncodeContent := $content | base64Encode -}}
|
||||
{{- $content = printf "%v%v%v"
|
||||
(substr $base64EncodeContent 0 $saltLen)
|
||||
(substr (sha256 $params.password) $saltLen)
|
||||
(substr $base64EncodeContent $saltLen)
|
||||
-}}
|
||||
{{- end -}}
|
||||
<div
|
||||
class="content"
|
||||
id="content"
|
||||
{{ with $params.password }}data-password="{{ md5 $params.password }}"{{ end }}
|
||||
{{ with $params.password }}data-content="{{ $content }}"{{ end }}
|
||||
>
|
||||
<div class="content" id="content">
|
||||
{{- if not $params.password -}}
|
||||
{{- $content -}}
|
||||
{{- else -}}
|
||||
{{- partial "single/fixit-decryptor.html" . -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
|
||||
{{- /* Content Encryption */ -}}
|
||||
{{- dict "Content" $content "Password" $params.password "Message" $params.message | partial "plugin/fixit-encryptor.html" -}}
|
||||
|
||||
{{- /* Comment */ -}}
|
||||
{{- partial "single/comment.html" . -}}
|
||||
</article>
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
{{- if .Site.Params.search.enable -}}
|
||||
{{- $index := slice -}}
|
||||
{{- $pages := where .Site.RegularPages "Params.password" "eq" nil -}}
|
||||
{{- if .Site.Params.page.hiddenFromSearch -}}
|
||||
{{- $pages = where $pages "Params.hiddenfromsearch" false -}}
|
||||
{{- else -}}
|
||||
{{- $pages = where $pages "Params.hiddenfromsearch" "!=" true -}}
|
||||
{{- end -}}
|
||||
{{- range $pages -}}
|
||||
{{- $uri := .RelPermalink -}}
|
||||
{{- if $.Site.Params.search.absoluteURL -}}
|
||||
{{- $uri = .Permalink -}}
|
||||
{{- end -}}
|
||||
{{- $meta := dict "uri" $uri "title" .Title "tags" .Params.tags "categories" .Params.categories -}}
|
||||
{{- $meta = $.Site.Params.dateFormat | default "2006-01-02" | .PublishDate.Format | dict "date" | merge $meta -}}
|
||||
{{- with .Description -}}
|
||||
{{- $index = $index | append (dict "content" . "objectID" $uri | merge $meta) -}}
|
||||
{{- end -}}
|
||||
{{- $params := .Params | merge $.Site.Params.page -}}
|
||||
{{/* Extended Markdown syntax */}}
|
||||
{{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
|
||||
{{/* Remove line number for code */}}
|
||||
{{- $content = $content | replaceRE `<span class="lnt?"> *\d*\n?</span>` "" -}}
|
||||
{{- range $i, $contenti := split $content "<h2 id=" -}}
|
||||
{{- if gt $i 0 -}}
|
||||
{{- $contenti = printf "<h2 id=%v" $contenti -}}
|
||||
{{- end -}}
|
||||
{{- range $j, $contentj := split $contenti "<h3 id=" -}}
|
||||
{{- if gt $j 0 -}}
|
||||
{{- $contentj = printf "<h3 id=%v" $contentj -}}
|
||||
{{- end -}}
|
||||
{{/* Plainify, unescape and remove (\n, \t) */}}
|
||||
{{- $contentj = $contentj | plainify | htmlUnescape | replaceRE `[\n\t ]+` " " -}}
|
||||
{{- if gt $.Site.Params.search.contentLength 0 -}}
|
||||
{{- $contentj = substr $contentj 0 $.Site.Params.search.contentLength -}}
|
||||
{{- end -}}
|
||||
{{- if $contentj | and (ne $contentj " ") -}}
|
||||
{{- $one := printf "%v:%v:%v" $uri $i $j | dict "content" $contentj "objectID" | merge $meta -}}
|
||||
{{- $index = $index | append $one -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $index | jsonify | safeJS -}}
|
||||
{{- end -}}
|
||||
@@ -1,46 +0,0 @@
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
|
||||
<channel>
|
||||
<title>
|
||||
{{- .Site.Title -}}
|
||||
</title>
|
||||
<link>
|
||||
{{- .Permalink -}}
|
||||
</link>
|
||||
<description>
|
||||
{{- .Site.Params.description | default .Site.Title -}}
|
||||
</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
{{- with .Site.LanguageCode -}}
|
||||
<language>
|
||||
{{- . -}}
|
||||
</language>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.author.email -}}
|
||||
<managingEditor>
|
||||
{{- . }}{{ with $.Site.Params.author.name }} ({{ . }}){{ end -}}
|
||||
</managingEditor>
|
||||
<webMaster>
|
||||
{{- . }}{{ with $.Site.Params.author.name }} ({{ . }}){{ end -}}
|
||||
</webMaster>
|
||||
{{- end -}}
|
||||
{{- with .Site.Copyright -}}
|
||||
<copyright>
|
||||
{{- . -}}
|
||||
</copyright>
|
||||
{{- end -}}
|
||||
{{- if not .Date.IsZero -}}
|
||||
<lastBuildDate>
|
||||
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
|
||||
</lastBuildDate>
|
||||
{{- end -}}
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end }}
|
||||
{{- range .Scratch.Get "mainSectionPages" | first (.Site.Params.home.rss | default 10) -}}
|
||||
{{- /* TODO 0.4.0 待重构为去掉 `.page` 改用 hugo 推荐的 .Param 方法获取页面参数 */ -}}
|
||||
{{- $params := .Params | merge site.Params.page -}}
|
||||
{{- if $params.password | or $params.hiddenFromRss }}{{ continue }}{{ end -}}
|
||||
{{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
|
||||
{{- end -}}
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -17,7 +17,7 @@
|
||||
<script src="//at.alicdn.com/t/font_578712_g26jo2kbzd5qm2t9.js" async defer></script>
|
||||
<div class="friend-links">
|
||||
{{ range $index, $friend := .Site.Data.friends }}
|
||||
<a class="friend-link" title="{{ $friend.description }}" href="{{ $friend.url | safeURL }}" rel="external noopener noreferrer" target="_blank">
|
||||
<a class="friend-link" title="{{ $friend.description }}" href="{{ $friend.url | safeURL }}" rel="external noopener" target="_blank">
|
||||
{{ if $friend.avatar }}
|
||||
{{- dict "Src" $friend.avatar "Alt" $friend.nickname "Title" $friend.description "Class" "friend-avatar" | partial "plugin/image.html" -}}
|
||||
{{ else }}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config = dict "type" "algolia" "algoliaIndex" $search.algolia.index "algoliaAppID" $search.algolia.appID "algoliaSearchKey" $search.algolia.searchKey | dict "search" | merge $config -}}
|
||||
{{- else if eq $search.type "fuse" -}}
|
||||
{{- with .Site.Home.OutputFormats.Get "json" -}}
|
||||
{{- with .Site.Home.OutputFormats.Get "search" -}}
|
||||
{{- $config = dict "type" "fuse" "fuseIndexURL" .RelPermalink | dict "search" | merge $config -}}
|
||||
{{- end -}}
|
||||
{{- $source := $cdn.fuseJS | default "lib/fuse/fuse.min.js" -}}
|
||||
@@ -188,30 +188,24 @@
|
||||
{{- if $params.password | or $encryptPartial -}}
|
||||
{{- $cryptoCoreJS := $cdn.cryptoCoreJS | default "lib/crypto-js/core.js" -}}
|
||||
{{- $cryptoEncBase64JS := $cdn.cryptoEncBase64JS | default "lib/crypto-js/enc-base64.js" -}}
|
||||
{{- $cryptoMd5JS := $cdn.cryptoMd5JS | default "lib/crypto-js/md5.js" -}}
|
||||
{{- $cryptoSha256JS := $cdn.cryptoSha256JS | default "lib/crypto-js/sha256.js" -}}
|
||||
{{- $xxhashWasmJS := $cdn.xxhashWasmJS | default "lib/xxhash-wasm/xxhash-wasm.js" -}}
|
||||
{{- dict "Source" $cryptoCoreJS "Minify" true "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $cryptoEncBase64JS "Minify" true "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $cryptoMd5JS "Minify" true "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $cryptoSha256JS "Minify" true "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" "js/fixit-decryptor.js" "Minify" hugo.IsProduction "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- dict "Source" $xxhashWasmJS "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- /* Decryption script */ -}}
|
||||
{{- $options := dict "targetPath" "js/fixit-decryptor.min.js" "minify" hugo.IsProduction -}}
|
||||
{{- if not hugo.IsProduction -}}
|
||||
{{- $options = dict "sourceMap" "external" | merge $options -}}
|
||||
{{- end -}}
|
||||
{{- dict "Source" (resources.Get "js/fixit-decryptor.js") "Build" $options "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config = dict "all" (isset $params "password") "shortcode" ($encryptPartial | default false) | dict "encryption" | merge $config -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Mobile Devtools */ -}}
|
||||
{{- $mDevtools := (.Scratch.Get "devOpts").mDevtools -}}
|
||||
{{- if $mDevtools.enable -}}
|
||||
{{- $devtoolsJS := $cdn.vconsoleJS | default "lib/vconsole/vconsole.min.js" -}}
|
||||
{{- if eq $mDevtools.type "eruda" -}}
|
||||
{{- $devtoolsJS = $cdn.erudaJS | default "lib/eruda/eruda.js" -}}
|
||||
{{- end -}}
|
||||
{{- dict "Source" $devtoolsJS "Fingerprint" $fingerprint "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- $config = dict "mDevtools" ($mDevtools.type | default "vConsole") | merge $config -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 不蒜子 */ -}}
|
||||
{{- if eq .Site.Params.ibruce.enable true -}}
|
||||
{{- $source := "//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" -}}
|
||||
{{- if .Site.Params.busuanzi.enable | and hugo.IsProduction -}}
|
||||
{{- $source := .Site.Params.busuanzi.source | default "https://vercount.one/js" -}}
|
||||
{{- dict "Source" $source "Fingerprint" $fingerprint "Async" true "Defer" true | dict "Scratch" .Scratch "Data" | partial "scratch/script.html" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -224,7 +218,7 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- /* PWA */ -}}
|
||||
{{- if .Site.Params.enablePWA | and hugo.IsProduction -}}
|
||||
{{- if not hugo.IsServer | and .Site.Params.enablePWA | and hugo.IsProduction -}}
|
||||
{{- $options := dict "targetPath" "service-worker.min.js" "minify" true -}}
|
||||
{{- $source := resources.Get "js/service-worker.js" | js.Build $options -}}
|
||||
{{- $_ := $source.RelPermalink -}}
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
{{- define "custom-aside" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-comment" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-footer" -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -20,3 +23,9 @@
|
||||
|
||||
{{- define "custom-assets" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-post__footer:before" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom-post__footer:after" -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,72 @@
|
||||
{{- $pages := .Pages -}}
|
||||
{{- /* Front matter: password */ -}}
|
||||
{{- $pages = where $pages "Params.password" "eq" nil -}}
|
||||
{{- /* Front matter: hiddenFromFeed */ -}}
|
||||
{{- $pages = where $pages "Params.hiddenFromFeed" "ne" true -}}
|
||||
{{- if ge .Config.limit 1 -}}
|
||||
{{- $pages = $pages | first .Config.limit -}}
|
||||
{{- end -}}
|
||||
{{- $length := $pages.Len -}}
|
||||
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>{{ .Site.Params.description | default .Site.Title }}</description>
|
||||
<generator>Hugo {{ hugo.Version }} & FixIt {{ .Version }}</generator>
|
||||
<language>{{ .Site.Language.LanguageCode }}</language>{{ with .Site.Params.author.email }}
|
||||
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{ . }}){{ end }}</managingEditor>{{ end }}{{ with .Site.Params.author.email }}
|
||||
<webMaster>{{ . }}{{ with $.Site.Params.author.name }} ({{ . }}){{ end }}</webMaster>{{ end }}{{ with .Site.Copyright }}
|
||||
<copyright>{{ . }}</copyright>{{ end }}{{ if not .Date.IsZero }}
|
||||
<lastBuildDate>{{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{- with .OutputFormats.Get "rss" }}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end }}
|
||||
{{- range $page := $pages }}
|
||||
{{- $params := .Params | merge .Site.Params.Page }}
|
||||
{{- $fullText := ((.Params.feed | default dict) | merge $.Config ).fulltext }}
|
||||
{{- $author := partial "function/get-author-map.html" .Params.author }}
|
||||
{{- $cacheRemoteImages := $params.cacheRemoteImages }}
|
||||
{{- $image := $params.featuredimagepreview | default $params.featuredimage }}
|
||||
{{- with dict "Path" $image "Resources" .Resources "CacheRemoteImages" $cacheRemoteImages.enable | partial "function/resource.html" }}
|
||||
{{- $url := urls.Parse $image }}
|
||||
{{- if not $url.Host | or $cacheRemoteImages.replace }}
|
||||
{{- $image = .Permalink }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Resources.GetMatch "featured-image" }}
|
||||
{{- $image = .Permalink }}
|
||||
{{- end }}
|
||||
{{- with .Resources.GetMatch "featured-image-preview" }}
|
||||
{{- $image = .Permalink }}
|
||||
{{- end }}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<pubDate>{{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
|
||||
{{- with $author.email }}<author>{{ . }}{{ with $author.name }} ({{ . }}){{ end }}</author>{{ end }}
|
||||
<guid>{{ .Permalink }}</guid>
|
||||
{{- with .GetTerms "categories" }}
|
||||
{{- range . }}
|
||||
<category domain="{{ .Permalink }}">{{ .LinkTitle }}</category>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $fullText }}
|
||||
<description>
|
||||
{{- "<![CDATA[" | safeHTML }}
|
||||
{{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" }}
|
||||
{{- /* {{- $content | replaceRE `<figure[^>]*>.*</figure>` "" | replaceRE `<img[^>]*( /)?>` "" | safeHTML -}} */ -}}
|
||||
{{- with $image }}
|
||||
{{- $content = add (printf "<img src=%q alt=%q referrerpolicy=%q>" . "featured image" "no-referrer") $content | safeHTML }}
|
||||
{{- end }}
|
||||
{{- $content | transform.XMLEscape | safeHTML }}
|
||||
{{- "]]>" | safeHTML -}}
|
||||
</description>
|
||||
{{- else }}
|
||||
<description>{{ (.Summary | default .Description | default .Title) | transform.XMLEscape | safeHTML }}</description>
|
||||
{{- end }}
|
||||
</item>
|
||||
{{- end }}
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -70,15 +70,20 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- /* 不蒜子 */ -}}
|
||||
{{- if eq .Site.Params.ibruce.enable true -}}
|
||||
{{- $busuanzi := .Site.Params.busuanzi -}}
|
||||
{{- if eq $busuanzi.enable true -}}
|
||||
{{- $loading := dict "Class" "fa-solid fa-spinner fa-spin fa-fw" | partial "plugin/icon.html" -}}
|
||||
<div class="footer-line visitor{{ with $footerConfig.order.visitor }} order-{{ . }}{{ end }}">
|
||||
{{- $iconUV := dict "Class" "fa-regular fa-user fa-fw me-1" | partial "plugin/icon.html" -}}
|
||||
{{- $iconPV := dict "Class" "fa-regular fa-eye fa-fw me-1" | partial "plugin/icon.html" -}}
|
||||
<div class="footer-line visitor{{ with $footerConfig.order.visitor }} order-{{ . }}{{ end }}{{ if not $busuanzi.siteViews }} d-none{{ end }}">
|
||||
<span id="busuanzi_container_site_uv" title='{{ T "footer.siteUV" }}'>
|
||||
{{- dict "Class" "fa-regular fa-user fa-fw" | partial "plugin/icon.html" -}} <span id="busuanzi_value_site_uv">{{ $loading }}</span>{{- /* NO_SPACING */ -}}
|
||||
{{- $iconUV }}<span id="busuanzi_value_site_uv">{{ $loading }}</span>
|
||||
{{- /* NO_SPACING */ -}}
|
||||
</span>
|
||||
{{- /* NO_SPACING */ -}}
|
||||
<span id="busuanzi_container_site_pv" class="footer-divider" title='{{ T "footer.sitePV" }}'>
|
||||
{{- dict "Class" "fa-regular fa-eye fa-fw" | partial "plugin/icon.html" -}} <span id="busuanzi_value_site_pv">{{ $loading }}</span>{{- /* NO_SPACING */ -}}
|
||||
{{- $iconPV }}<span id="busuanzi_value_site_pv">{{ $loading }}</span>
|
||||
{{- /* NO_SPACING */ -}}
|
||||
</span>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- $content := .Content -}}
|
||||
|
||||
{{- /* If Hugo Support AES, refactor with AES. */ -}}
|
||||
{{- if .Password -}}
|
||||
{{- $saltLen := strings.RuneCount (trim .Password " ") -}}
|
||||
{{- $saltLen = cond (eq (mod $saltLen 2) 0) (add $saltLen 1) $saltLen -}}
|
||||
{{- $base64EncodeContent := $content | base64Encode -}}
|
||||
{{- $content = printf "%v%v%v"
|
||||
(substr $base64EncodeContent 0 $saltLen)
|
||||
(substr (sha256 .Password) $saltLen)
|
||||
(substr $base64EncodeContent $saltLen)
|
||||
-}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $content -}}
|
||||
@@ -0,0 +1,44 @@
|
||||
{{- /*
|
||||
Get author in map format.
|
||||
@param {String|Map} . the author name or map
|
||||
@returns {Map}
|
||||
@example {{- $author := partial "function/get-author-map.html" .Params.author -}}
|
||||
*/ -}}
|
||||
|
||||
{{- if not (reflect.IsMap site.Params.author) -}}
|
||||
{{- errorf "FixIt params error: site.Params.author must be a map, got %T." site.Params.author -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $default := dict "name" "" "link" "" "email" "" "avatar" "" -}}
|
||||
{{- $author := site.Params.author | merge $default -}}
|
||||
{{- $authorParam := dict -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- $authorParam = . -}}
|
||||
{{- else -}}
|
||||
{{- with . -}}
|
||||
{{- $authorParam = dict "name" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if isset $authorParam "name" | and (ne $authorParam.name site.Params.author.name) -}}
|
||||
{{- $author = $authorParam | merge $default | merge $author -}}
|
||||
{{- else -}}
|
||||
{{- with $authorParam.link -}}{{ $author = dict "link" . | merge $author }}{{- end -}}
|
||||
{{- with $authorParam.email -}}{{ $author = dict "email" . | merge $author }}{{- end -}}
|
||||
{{- with $authorParam.avatar -}}{{ $author = dict "avatar" . | merge $author }}{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $gravatar := site.Params.gravatar -}}
|
||||
{{- if $gravatar.enable | and $author.email -}}
|
||||
{{- with $gravatar -}}
|
||||
{{- /* TODO migrate to gravatar */ -}}
|
||||
{{- $author = dict "avatar" (printf "https://%v/avatar/%v?s=32&d=%v"
|
||||
(path.Clean .Host | default "www.gravatar.com")
|
||||
(md5 $author.email)
|
||||
(.Style | default ""))
|
||||
| merge $author
|
||||
-}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $author -}}
|
||||
@@ -1,5 +1,9 @@
|
||||
{{- $cdn := .Scratch.Get "cdn" | default dict -}}
|
||||
{{- $fingerprint := .Scratch.Get "fingerprint" -}}
|
||||
{{- $title := printf "%s %s %s" .Title .Site.Params.titleDelimiter .Site.Title -}}
|
||||
{{- if .IsHome -}}
|
||||
{{- $title = site.Title -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not .Site.Params.app.noFavicon -}}
|
||||
{{- with .Site.Params.app.svgFavicon -}}
|
||||
@@ -18,17 +22,19 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
{{- if .Prev -}}
|
||||
<link rel="prev" href="{{ .Prev.Permalink }}" />
|
||||
<link rel="canonical" type="text/html" href="{{ .Permalink }}" title="{{ $title }}" />
|
||||
{{- with .Prev -}}
|
||||
<link rel="prev" type="text/html" href="{{ .Permalink }}" title="{{ .Title }}" />
|
||||
{{- end -}}
|
||||
{{- if .Next -}}
|
||||
<link rel="next" href="{{ .Next.Permalink }}" />
|
||||
{{- with .Next -}}
|
||||
<link rel="next" type="text/html" href="{{ .Permalink }}" title="{{ .Title }}" />
|
||||
{{- end -}}
|
||||
|
||||
{{- with .OutputFormats.Get "RSS" -}}
|
||||
<link rel="alternate" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
|
||||
<link rel="feed" href="{{ .RelPermalink }}" type="application/rss+xml" title="{{ $.Site.Title }}">
|
||||
{{- range .AlternativeOutputFormats -}}
|
||||
{{- printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink $title | safeHTML -}}
|
||||
{{- end -}}
|
||||
{{- /* Compatible with https://github.com/hugo-fixit/hugo-json-feed */ -}}
|
||||
{{- with .OutputFormats.Get "jsonfeed" -}}
|
||||
<link rel="alternate" type="application/feed+json" href="{{ .Permalink }}" title="{{ $title }}" />
|
||||
{{- end -}}
|
||||
|
||||
{{- /* style.min.css */ -}}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
{{- $author := partial "function/get-author-map.html" .Params.author -}}
|
||||
|
||||
<meta name="author" content="{{ .Site.Params.author.name }}">
|
||||
<meta name="author-link" content="{{ .Site.Params.author.link }}">
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage | and .Summary }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
|
||||
<meta name="author" content="{{ $author.name }}">
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage | and .Summary }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
|
||||
{{- $keywords := .Keywords -}}
|
||||
{{- if not $keywords -}}
|
||||
@@ -13,12 +12,15 @@
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with $keywords -}}
|
||||
<meta name="keywords" content='{{ delimit . ", " }}' />
|
||||
<meta name="keywords" content='{{ delimit . ", " }}'>
|
||||
{{- end -}}
|
||||
|
||||
{{- template "_internal/schema.html" . -}}
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
{{- template "_internal/twitter_cards.html" . -}}
|
||||
{{- with .Site.Params.social.Twitter -}}
|
||||
<meta name="twitter:creator" content="@{{ . }}" />
|
||||
{{- end -}}
|
||||
|
||||
<meta name="application-name" content="{{ .Site.Params.app.title | default .Site.Title }}">
|
||||
<meta name="apple-mobile-web-app-title" content="{{ .Site.Params.app.title | default .Site.Title }}">
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
{{- $warns = $warns | append "The parameter `params.footer.custom` is deprecated since v0.3.7, use `layouts/partials/custom.html` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- with .Site.Params.ibruce -}}
|
||||
{{- $warns = $warns | append "The parameter `params.ibruce` is deprecated since v0.3.9, use `params.busuanzi` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if len $warns -}}
|
||||
{{- warnf "Deprecated parameter detection until %v\n - %v\n\n" (.Scratch.Get "version") (delimit $warns "\n - ") -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
{{- else if gt "0.2.0" (strings.TrimPrefix "v" .Site.Params.version) -}}
|
||||
{{- errorf "FixIt %v\n%v\n\n" $version (dict "From" .Site.Params.version "To" $version | T "init.compatibilityError") -}}
|
||||
{{- end -}}
|
||||
{{- if (strings.HasSuffix $version "RC") | and $devOpts.c4u -}}
|
||||
{{- warnf "FixIt %v\n%v\n\n" $version (T "init.RCVersionWarn") -}}
|
||||
{{- if gt (len (findRE "^v[0-9]+\\.[0-9]+\\.[0-9]+-[0-9a-f]+$" $version)) 0 -}}
|
||||
{{- warnidf "warning-dev-version" "FixIt %v\n%v" $version (T "init.devVersionWarn") -}}
|
||||
{{- end -}}
|
||||
{{- if (gt $latest $version) | and $devOpts.c4u -}}
|
||||
{{- warnf "FixIt %v (⬆️ %v)\n%v`git submodule update --remote --merge`\n\n" $version $latest (T "init.quicklyUpgrade") -}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- .Scratch.Set "version" "v0.3.9" -}}
|
||||
{{- .Scratch.Set "version" "v0.3.11" -}}
|
||||
{{- .Scratch.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
{{- /*
|
||||
This partial is used to render an alert box.
|
||||
@param {String} .Type the type of the alert box
|
||||
@param {String} .Text the content of the alert box
|
||||
@param {Map} [.Attributes] the attributes of the alert box
|
||||
@example {{- dict "Text" .Text "Type" .AlertType "Attributes" .Attributes | partial "plugin/alert.html" -}}
|
||||
*/ -}}
|
||||
|
||||
{{- $icons := dict
|
||||
"caution" "images/icons/alerts/stop.svg"
|
||||
"important" "images/icons/alerts/report.svg"
|
||||
"note" "images/icons/alerts/info.svg"
|
||||
"tip" "images/icons/alerts/light-bulb.svg"
|
||||
"warning" "images/icons/alerts/alert.svg"
|
||||
-}}
|
||||
|
||||
{{- $attrs := "" }}
|
||||
{{- range $key, $value := .Attributes }}
|
||||
{{- $attrs = printf "%s %s=%q" $attrs $key $value }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Attributes.class }}
|
||||
{{- $attrs = replace $attrs . (printf "alert alert-%s %s" $.Type .) }}
|
||||
{{- else }}
|
||||
{{- $attrs = printf "class=%q %s" (printf "alert alert-%s" $.Type) $attrs }}
|
||||
{{- end }}
|
||||
{{- $attrs = trim $attrs " " -}}
|
||||
|
||||
<div {{ $attrs | safeHTMLAttr }}>
|
||||
{{- $icon := index $icons .Type -}}
|
||||
<p class="alert-title">
|
||||
{{- dict "Src" $icon | partial "plugin/icon.html" }}
|
||||
{{- or (T (printf "alert.%v" .Type)) (title .Type) -}}
|
||||
</p>
|
||||
{{- .Text | safeHTML -}}
|
||||
</div>
|
||||
{{- /* EOF */ -}}
|
||||
@@ -0,0 +1,30 @@
|
||||
{{- if .Password -}}
|
||||
{{- /* Content Encryption */ -}}
|
||||
{{- $content := dict "Content" .Content "Password" .Password | partial "function/content-encryption.html" -}}
|
||||
|
||||
{{- /* Generating fixit-encryptor DOM */ -}}
|
||||
{{- $message := .Message | default (T "single.encryptedMessage") -}}
|
||||
{{- $loading := resources.Get "images/loading.svg" | minify -}}
|
||||
{{- $id := "fixit-decryptor-input" -}}
|
||||
{{- if .IsPartial -}}
|
||||
{{- $id = dict "Scratch" page.Scratch | partial "function/id.html" -}}
|
||||
{{- end -}}
|
||||
<fixit-encryptor>
|
||||
<div class="fixit-decryptor-container">
|
||||
<img class="fixit-decryptor-loading" src="{{ $loading.RelPermalink }}" alt="decryptor loading" width="48" height="48" />
|
||||
<label for="{{ $id }}" title="{{ T `single.password` }}">
|
||||
<input type="password" id="{{ $id }}" class="fixit-decryptor-input" placeholder="🔑 {{ $message }}" />
|
||||
</label>
|
||||
<button class="fixit-decryptor-btn">
|
||||
{{- dict "Class" "fa-solid fa-unlock" | partial "plugin/icon.html" }} {{ T "single.enterBtn" -}}
|
||||
</button>
|
||||
{{- if not .IsPartial -}}
|
||||
<button class="fixit-encryptor-btn">
|
||||
{{- dict "Class" "fa-solid fa-lock" | partial "plugin/icon.html" }} {{ T "single.encryptyAgain" -}}
|
||||
</button>
|
||||
{{- end -}}
|
||||
</div>
|
||||
{{- if .IsPartial }}<div class="decryptor-content"></div>{{ end -}}
|
||||
<cipher-text data-password="{{ xxhash .Password }}">{{ $content }}</cipher-text>
|
||||
</fixit-encryptor>
|
||||
{{- end -}}
|
||||
@@ -6,8 +6,20 @@
|
||||
{{- $prefix := $.Prefix | default "lib/simple-icons/icons" | strings.TrimSuffix "/" -}}
|
||||
{{- $src = printf "%v/%v.svg" $prefix . -}}
|
||||
{{- end -}}
|
||||
{{- if (urls.Parse $src).Host | not -}}
|
||||
{{- $src = (resources.Get $src | minify).RelPermalink -}}
|
||||
|
||||
{{ if not $src }}
|
||||
{{- errorf "Icon src is missing" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if (urls.Parse $src).Host | not -}}
|
||||
{{- $resource := resources.Get $src | minify -}}
|
||||
{{ if not $resource }}
|
||||
{{- errorf "Icon does not exist %v" $src -}}
|
||||
{{- end -}}
|
||||
{{- $resource := $resource.Content -}}
|
||||
{{- $resource | replaceRE `<svg ` `<svg class="icon" ` | safeHTML -}}
|
||||
{{- else -}}
|
||||
{{- /* fetch svg icon from external source */ -}}
|
||||
<i data-svg-src="{{ $src }}" aria-hidden="true"></i>
|
||||
{{- end -}}
|
||||
<i data-svg-src="{{ $src }}" aria-hidden="true"></i>
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- /* TODO refactor */ -}}
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
{{- $class := .Class | default "" -}}
|
||||
{{- $style := "" -}}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
{{- $params := .Page.Params | merge .Site.Params.Page -}}
|
||||
{{- $authorName := .Site.Params.author.name | default (T "single.author") -}}
|
||||
{{- with .Params.author -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- $authorName = cond (isset . "name") .name $authorName -}}
|
||||
{{- else -}}
|
||||
{{- $authorName = . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $image := $params.featuredimagepreview | default $params.featuredimage -}}
|
||||
{{- with .Page.Resources.GetMatch "featured-image" -}}
|
||||
{{- $image = .Permalink -}}
|
||||
{{- end -}}
|
||||
{{- with .Page.Resources.GetMatch "featured-image-preview" -}}
|
||||
{{- $image = .Permalink -}}
|
||||
{{- end -}}
|
||||
|
||||
<item>
|
||||
<title>
|
||||
{{- .Page.Title -}}
|
||||
</title>
|
||||
<link>
|
||||
{{- .Page.Permalink -}}
|
||||
</link>
|
||||
<pubDate>
|
||||
{{- .Page.Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
|
||||
</pubDate>
|
||||
<author>{{ $authorName }}</author>
|
||||
<guid>
|
||||
{{- .Page.Permalink -}}
|
||||
</guid>
|
||||
<description>
|
||||
{{- "<![CDATA[" | safeHTML -}}
|
||||
{{- with $image -}}
|
||||
<div class="featured-image">
|
||||
{{- dict "Src" . "Title" $.Page.Description "Alt" $.Page.Title "Loading" "eager" "Referrerpolicy" "no-referrer" | partial "plugin/image.html" -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- $content := .Page.Description -}}
|
||||
{{- if $params.rssFullText -}}
|
||||
{{- $content = dict "Content" .Page.Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
|
||||
{{- else -}}
|
||||
{{- with .Page.Summary -}}
|
||||
{{- $content = dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{/* {{- $content | replaceRE `<figure[^>]*>.*</figure>` "" | replaceRE `<img[^>]*( /)?>` "" | safeHTML -}} */}}
|
||||
{{- $content | safeHTML -}}
|
||||
{{- "]]>" | safeHTML -}}
|
||||
</description>
|
||||
</item>
|
||||
@@ -331,6 +331,9 @@
|
||||
</noscript>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Custom Comment System */ -}}
|
||||
{{- block "custom-comment" . }}{{ end -}}
|
||||
</div>
|
||||
{{- /* lightgallery for Artalk and Twikoo */ -}}
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
|
||||
@@ -98,11 +98,18 @@
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{{- $navigation := .Site.Params.navigation -}}
|
||||
<div class="post-nav">
|
||||
{{- $pages := .Scratch.Get "mainSectionPages" -}}
|
||||
{{- $prev := $pages.Prev . -}}
|
||||
{{- $next := $pages.Next . -}}
|
||||
{{- if .Site.Params.navigationReverse -}}
|
||||
{{- /* Show the post navigation in section pages */ -}}
|
||||
{{- if $navigation.inSection -}}
|
||||
{{- $prev = .PrevInSection -}}
|
||||
{{- $next = .NextInSection -}}
|
||||
{{- end -}}
|
||||
{{- /* Reverse the next/previous post navigation order */ -}}
|
||||
{{- if $navigation.reverse -}}
|
||||
{{- $prev = $pages.Next . -}}
|
||||
{{- $next = $pages.Prev . -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,39 +1,11 @@
|
||||
{{- $params := .Params | merge .Site.Params.page -}}
|
||||
|
||||
{{- /* Author data patch */ -}}
|
||||
{{- $authorDefault := dict "name" "" "link" "" "email" "" "avatar" "" -}}
|
||||
{{- $author := .Site.Params.author | merge $authorDefault -}}
|
||||
{{- $authorPost := dict -}}
|
||||
{{- if reflect.IsMap $params.author -}}
|
||||
{{- $authorPost = $params.author -}}
|
||||
{{- else if isset $params "author" -}}
|
||||
{{- warnf "检测到你的 author 参数格式错误,请参考主题文档设置为正常的格式。" -}}
|
||||
{{- $authorPost = dict "name" $params.author -}}
|
||||
{{- end -}}
|
||||
{{- if isset $authorPost "name" | and (ne $authorPost.name .Site.Params.author.name) -}}
|
||||
{{- $author = $authorPost | merge $authorDefault | merge $author -}}
|
||||
{{- else -}}
|
||||
{{- with $authorPost.link -}}{{ $author = dict "link" . | merge $author }}{{- end -}}
|
||||
{{- with $authorPost.email -}}{{ $author = dict "email" . | merge $author }}{{- end -}}
|
||||
{{- with $authorPost.avatar -}}{{ $author = dict "avatar" . | merge $author }}{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $gravatar := .Site.Params.gravatar -}}
|
||||
{{- if $gravatar.enable | and $author.email -}}
|
||||
{{- with $gravatar -}}
|
||||
{{- $author = dict "avatar" (printf "https://%v/avatar/%v?s=32&d=%v"
|
||||
(path.Clean .Host | default "www.gravatar.com")
|
||||
(md5 $author.email)
|
||||
(.Style | default ""))
|
||||
| merge $author
|
||||
-}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $author := partial "function/get-author-map.html" .Params.author -}}
|
||||
{{- .Store.Set "author" $author -}}
|
||||
|
||||
<span class="post-author">
|
||||
{{- $content := $author.name | default "Anonymous" -}}
|
||||
{{- $icon := dict "Class" "fa-solid fa-user-circle" -}}
|
||||
{{- /* Deprecate $params.authorAvatar in favor of $params.showAvatar and dd front matter gravatar {bool} */ -}}
|
||||
{{- if $author.avatar | and $params.authorAvatar -}}
|
||||
{{- $content = printf "%v %v" (dict "Src" $author.avatar "Class" "avatar" "Alt" $content "Width" 20 "Height" 20 | partial "plugin/image.html") $content -}}
|
||||
{{- $icon = "" -}}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
|
||||
<channel>
|
||||
<title>
|
||||
{{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) -}}
|
||||
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
|
||||
</title>
|
||||
<link>
|
||||
{{- .Permalink -}}
|
||||
</link>
|
||||
<description>
|
||||
{{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) }} | {{ .Site.Title -}}
|
||||
</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
{{- with .Site.LanguageCode -}}
|
||||
<language>
|
||||
{{- . -}}
|
||||
</language>
|
||||
{{- end -}}
|
||||
{{- with .Site.Params.author.email -}}
|
||||
<managingEditor>
|
||||
{{- . }}{{ with $.Site.Params.author.name }} ({{ . }}){{ end -}}
|
||||
</managingEditor>
|
||||
<webMaster>
|
||||
{{- . }}{{ with $.Site.Params.author.name }} ({{ . }}){{ end -}}
|
||||
</webMaster>
|
||||
{{- end -}}
|
||||
{{- with .Site.Copyright -}}
|
||||
<copyright>
|
||||
{{- . -}}
|
||||
</copyright>
|
||||
{{- end -}}
|
||||
{{- if not .Date.IsZero -}}
|
||||
<lastBuildDate>
|
||||
{{- .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" -}}
|
||||
</lastBuildDate>
|
||||
{{- end -}}
|
||||
<atom:link href="{{ .Permalink }}" rel="self" type="application/rss+xml" />
|
||||
{{- if .Site.Params.section.recentlyUpdated.rss -}}
|
||||
{{- $postCount := 0 -}}
|
||||
{{- $maxPostCount := .Site.Params.section.recentlyUpdated.maxCount | default 10 -}}
|
||||
{{- $days := .Site.Params.section.recentlyUpdated.days | default 30 -}}
|
||||
{{- range (where .Data.Pages.ByLastmod.Reverse "Section" "!=" "") -}}
|
||||
{{- if gt (add .Lastmod.Unix (mul 86900 $days)) now.Unix -}}
|
||||
{{- if lt $postCount $maxPostCount -}}
|
||||
{{- if ne .Lastmod.Unix .Date.Unix }}
|
||||
{{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- range .Pages | first (.Site.Params.section.rss | default 10) -}}
|
||||
{{- dict "Page" . "Site" .Site | partial "rss/item.html" -}}
|
||||
{{- end -}}
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -13,6 +13,9 @@
|
||||
{{- /* Collection List */ -}}
|
||||
{{- partial "single/collection-list.html" . -}}
|
||||
|
||||
{{- /* TODO Related Content */ -}}
|
||||
{{/* {{- partial "single/related.html" . -}} */}}
|
||||
|
||||
{{- /* Custom Aside */ -}}
|
||||
{{- block "custom-aside" . }}{{ end -}}
|
||||
</aside>
|
||||
@@ -87,31 +90,25 @@
|
||||
{{- $visitorIcon := dict "Class" "fa-regular fa-eye fa-fw me-1" | partial "plugin/icon.html" -}}
|
||||
{{- $commentIcon := dict "Class" "fa-regular fa-comments fa-fw me-1" | partial "plugin/icon.html" -}}
|
||||
{{- /* Visitor Count */ -}}
|
||||
{{- if $comment.enable -}}
|
||||
{{- if $comment.artalk.enable -}}
|
||||
<span class="comment-visitors" data-flag-title="{{ $title }}">
|
||||
{{ $visitorIcon }}<span class="artalk-visitor-count" data-page-key="{{ .RelPermalink }}">-</span> {{ T "single.views" }}
|
||||
</span>
|
||||
{{- else if ($comment.valine.enable | and $comment.valine.visitor) -}}
|
||||
<span id="{{ .RelPermalink }}" class="leancloud_visitors comment-visitors" data-flag-title="{{ $title }}">
|
||||
{{ $visitorIcon }}<span class="leancloud-visitors-count">-</span> {{ T "single.views" }}
|
||||
</span>
|
||||
{{- else if $comment.waline.enable | and $comment.waline.pageview -}}
|
||||
<span class="comment-visitors" data-flag-title="{{ $title }}">
|
||||
{{ $visitorIcon }}<span data-path="{{ .RelPermalink }}" class="waline-pageview-count">-</span> {{ T "single.views" }}
|
||||
</span>
|
||||
{{- else if $comment.twikoo.enable | and $comment.twikoo.visitor -}}
|
||||
<span id="{{ .RelPermalink }}" class="comment-visitors" data-flag-title="{{ $title }}">
|
||||
{{ $visitorIcon }}<span id="twikoo_visitors">-</span> {{ T "single.views" }}
|
||||
</span>
|
||||
{{- else if .Site.Params.ibruce.enable | and .Site.Params.ibruce.enablePost -}}
|
||||
<span id="busuanzi_container_page_pv" class="busuanzi_visitors comment-visitors" data-flag-title="{{ $title }}">
|
||||
{{ $visitorIcon }}<span id="busuanzi_value_page_pv">-</span> {{ T "single.views" }}
|
||||
</span>
|
||||
{{- end -}}
|
||||
{{- else if .Site.Params.ibruce.enable | and .Site.Params.ibruce.enablePost -}}
|
||||
{{- if $comment.enable | and $comment.artalk.enable -}}
|
||||
<span class="comment-visitors" data-flag-title="{{ $title }}">
|
||||
{{- $visitorIcon }}<span class="artalk-visitor-count" data-page-key="{{ .RelPermalink }}">-</span> {{ T "single.views" }}
|
||||
</span>
|
||||
{{- else if $comment.enable | and $comment.valine.enable | and $comment.valine.visitor -}}
|
||||
<span id="{{ .RelPermalink }}" class="leancloud_visitors comment-visitors" data-flag-title="{{ $title }}">
|
||||
{{- $visitorIcon }}<span class="leancloud-visitors-count">-</span> {{ T "single.views" }}
|
||||
</span>
|
||||
{{- else if $comment.enable | and $comment.waline.enable | and $comment.waline.pageview -}}
|
||||
<span class="comment-visitors" data-flag-title="{{ $title }}">
|
||||
{{- $visitorIcon }}<span data-path="{{ .RelPermalink }}" class="waline-pageview-count">-</span> {{ T "single.views" }}
|
||||
</span>
|
||||
{{- else if $comment.enable | and $comment.twikoo.enable | and $comment.twikoo.visitor -}}
|
||||
<span id="{{ .RelPermalink }}" class="comment-visitors" data-flag-title="{{ $title }}">
|
||||
{{- $visitorIcon }}<span id="twikoo_visitors">-</span> {{ T "single.views" }}
|
||||
</span>
|
||||
{{- else if .Site.Params.busuanzi.enable | and .Site.Params.busuanzi.pageViews | and hugo.IsProduction -}}
|
||||
<span id="busuanzi_container_page_pv" class="busuanzi_visitors comment-visitors" data-flag-title="{{ $title }}">
|
||||
{{ $visitorIcon }}<span id="busuanzi_value_page_pv">-</span> {{ T "single.views" }}
|
||||
{{- $visitorIcon }}<span id="busuanzi_value_page_pv">-</span> {{ T "single.views" }}
|
||||
</span>
|
||||
{{- end -}}
|
||||
{{- /* Comment Count */ -}}
|
||||
@@ -163,21 +160,7 @@
|
||||
|
||||
{{- /* Content */ -}}
|
||||
{{- $content := dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
|
||||
{{- if $params.password -}}
|
||||
{{- $saltLen := strings.RuneCount (trim $params.password " ") -}}
|
||||
{{- $saltLen = cond (eq (mod $saltLen 2) 0) (add $saltLen 1) $saltLen -}}
|
||||
{{- $base64EncodeContent := $content | base64Encode -}}
|
||||
{{- $content = printf "%v%v%v"
|
||||
(substr $base64EncodeContent 0 $saltLen)
|
||||
(substr (sha256 $params.password) $saltLen)
|
||||
(substr $base64EncodeContent $saltLen)
|
||||
-}}
|
||||
{{- end -}}
|
||||
<div class="content" id="content"
|
||||
{{- with $params.endFlag }} data-end-flag="{{ . }}"{{- end -}}
|
||||
{{- with $params.password }} data-password="{{ md5 . }}"{{- end -}}
|
||||
{{- with $params.password }} data-content="{{ $content }}"{{- end -}}
|
||||
>
|
||||
<div class="content" id="content"{{ with $params.endFlag }} data-end-flag="{{ . }}"{{ end }}>
|
||||
{{- if not $params.password -}}
|
||||
{{- /* Expiration Reminder */ -}}
|
||||
{{- partial "single/expiration-reminder.html" . -}}
|
||||
@@ -197,17 +180,23 @@
|
||||
{{- /* Collection Navigation */ -}}
|
||||
{{- partial "single/collection-nav.html" . -}}
|
||||
|
||||
{{- /* FixIt Decryptor */ -}}
|
||||
{{- partial "single/fixit-decryptor.html" . -}}
|
||||
{{- /* Content Encryption */ -}}
|
||||
{{- dict "Content" $content "Password" $params.password "Message" $params.message | partial "plugin/fixit-encryptor.html" -}}
|
||||
|
||||
{{- /* Custom block before post footer */ -}}
|
||||
{{- block "custom-post__footer:before" . }}{{ end -}}
|
||||
|
||||
{{- /* Footer */ -}}
|
||||
{{- partial "single/footer.html" . -}}
|
||||
|
||||
{{- /* Reward after Footer */ -}}
|
||||
{{- /* Reward after post footer */ -}}
|
||||
{{- if eq $reward.position "after" -}}
|
||||
{{- partial "single/reward.html" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Custom block after post footer */ -}}
|
||||
{{- block "custom-post__footer:after" . }}{{ end -}}
|
||||
|
||||
{{- /* Comment */ -}}
|
||||
{{- partial "single/comment.html" . -}}
|
||||
</article>
|
||||
|
||||
@@ -65,4 +65,36 @@ Disallow: /
|
||||
User-agent: ZoominfoBot
|
||||
Disallow: /
|
||||
|
||||
# OpenAI, ChatGPT
|
||||
User-agent: GPTBot
|
||||
Disallow: /
|
||||
|
||||
# Google AI (Bard, etc)
|
||||
User-agent: Google-Extended
|
||||
Disallow: /
|
||||
|
||||
# Block common crawl
|
||||
User-agent: CCBot
|
||||
Disallow: /
|
||||
|
||||
# Facebook
|
||||
User-agent: FacebookBot
|
||||
Disallow: /
|
||||
|
||||
# Cohere.ai
|
||||
User-agent: cohere-ai
|
||||
Disallow: /
|
||||
|
||||
# Perplexity
|
||||
User-agent: PerplexityBot
|
||||
Disallow: /
|
||||
|
||||
# Anthropic
|
||||
User-agent: anthropic-ai
|
||||
Disallow: /
|
||||
|
||||
# Claudebot by Anthropic
|
||||
User-agent: ClaudeBot
|
||||
Disallow: /
|
||||
|
||||
Sitemap: {{ "/sitemap.xml" | absURL }}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{{- $options := dict "Site" .Site "Config" .Site.Params.feed "OutputFormats" .OutputFormats -}}
|
||||
{{- $options = dict "Permalink" .Permalink "Version" (.Scratch.Get "version") | merge $options -}}
|
||||
{{- $options = dict "Title" .Site.Title "Pages" (.Scratch.Get "mainSectionPages") | merge $options -}}
|
||||
{{- partial "feed/rss.html" $options -}}
|
||||
@@ -0,0 +1,9 @@
|
||||
{{- $title := title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) -}}
|
||||
{{- if .Site.Params.withSiteTitle -}}
|
||||
{{- $title = printf "%s %s %s" $title .Site.Params.titleDelimiter .Site.Title -}}
|
||||
{{- end -}}
|
||||
{{- $config := (.Params.feed | default dict) | merge .Site.Params.section.feed | merge .Site.Params.feed -}}
|
||||
{{- $options := dict "Site" .Site "Config" $config "OutputFormats" .OutputFormats -}}
|
||||
{{- $options = dict "Permalink" .Permalink "Version" (.Scratch.Get "version") | merge $options -}}
|
||||
{{- $options = dict "Title" $title "Pages" .Pages | merge $options -}}
|
||||
{{- partial "feed/rss.html" $options -}}
|
||||
@@ -1,37 +1,11 @@
|
||||
{{- $password := "" -}}
|
||||
{{- $message := "" -}}
|
||||
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- $password = .Get "password" | default "" -}}
|
||||
{{- $message = .Get "message" | default (T "single.encryptedMessage") -}}
|
||||
{{- else -}}
|
||||
{{- $password = .Get 0 | default "" -}}
|
||||
{{- $message = .Get 1 | default (T "single.encryptedMessage") -}}
|
||||
{{- end -}}
|
||||
{{- $password := cond .IsNamedParams (.Get "password") (.Get 0) | default "" -}}
|
||||
{{- $message := cond .IsNamedParams (.Get "message") (.Get 1) | default (T "single.encryptedMessage") -}}
|
||||
|
||||
{{- if $password -}}
|
||||
{{- /* Content */ -}}
|
||||
{{- $content := .Inner | .Page.RenderString -}}
|
||||
{{- $saltLen := strings.RuneCount (trim $password "") -}}
|
||||
{{- $saltLen = cond (eq (mod $saltLen 2) 0) (add $saltLen 1) $saltLen -}}
|
||||
{{- $base64EncodeContent := $content | base64Encode -}}
|
||||
{{- $content = printf "%v%v%v"
|
||||
(substr $base64EncodeContent 0 $saltLen)
|
||||
(substr (sha256 $password) $saltLen)
|
||||
(substr $base64EncodeContent $saltLen)
|
||||
-}}
|
||||
|
||||
<fixit-encryptor class="fixit-encryptor-shortcode">
|
||||
<div class="fixit-decryptor-container">
|
||||
<label title='{{ T "single.password" }}'>
|
||||
<input type="password" class="fixit-decryptor-input" placeholder="🔑 {{ $message }}" />
|
||||
</label>
|
||||
<button class="fixit-decryptor-btn">
|
||||
{{- dict "Class" "fa-solid fa-unlock" | partial "plugin/icon.html" }} {{ T "single.enterBtn" -}}
|
||||
</button>
|
||||
</div>
|
||||
<div data-password="{{ md5 $password }}" data-content="{{ $content }}"></div>
|
||||
</fixit-encryptor>
|
||||
{{- .Page.Scratch.SetInMap "this" "encryptPartial" true -}}
|
||||
{{- /* Content Encryption */ -}}
|
||||
{{- dict "Content" $content "Password" $password "Message" $message "IsPartial" true | partial "plugin/fixit-encryptor.html" -}}
|
||||
{{- else -}}
|
||||
{{- .Inner -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
{{- $options = cond .IsNamedParams (.Get "alt") (.Get 1) | .Page.RenderString | dict "Alt" | merge $options -}}
|
||||
{{- $caption := cond .IsNamedParams (.Get "caption") (.Get 2) | .Page.RenderString -}}
|
||||
{{- $options = dict "Caption" $caption | merge $options -}}
|
||||
{{- $options = dict "Resources" .Page.Resources | merge $options -}}
|
||||
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- $options = dict "Title" (.Get "title") | merge $options -}}
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
|
||||
{{- $attrs := printf `style="width: %v; height: %v;"` $width $height -}}
|
||||
<div class="mapbox" data-options="{{ $options | jsonify }}" {{ $attrs | safeHTMLAttr }}></div>
|
||||
{{- /* EOF */ -}}
|
||||
{{- /* EOF */ -}}
|
||||
|
||||
@@ -25,6 +25,18 @@
|
||||
{{- with (.Get "group" | string) -}}
|
||||
{{- $wrapperAttrs = printf `%v data-group="%v"` $wrapperAttrs . -}}
|
||||
{{- end -}}
|
||||
{{- with .Get "speed" -}}
|
||||
{{- $wrapperAttrs = printf `%v data-speed="%v"` $wrapperAttrs . -}}
|
||||
{{- end -}}
|
||||
{{- with .Get "cursorSpeed" -}}
|
||||
{{- $wrapperAttrs = printf `%v data-cursor-speed="%v"` $wrapperAttrs . -}}
|
||||
{{- end -}}
|
||||
{{- with .Get "cursorChar" -}}
|
||||
{{- $wrapperAttrs = printf `%v data-cursor-char="%v"` $wrapperAttrs . -}}
|
||||
{{- end -}}
|
||||
{{- with .Get "duration" -}}
|
||||
{{- $wrapperAttrs = printf `%v data-duration="%v"` $wrapperAttrs . -}}
|
||||
{{- end -}}
|
||||
{{- with $loop -}}
|
||||
{{- $wrapperAttrs = printf `%v data-loop="true"` $wrapperAttrs -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
{{- $resource := resources.Get "images/version.template.svg" -}}
|
||||
{{- $resource = $resource | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color "isCJK" .Page.Params.IsCJKLanguage) | minify -}}
|
||||
{{- $alt := printf "FixIt %v | %v" $version $label -}}
|
||||
<a href="{{ $url }}" rel="external nofollow noopener noreferrer" target="_blank">
|
||||
<a href="{{ $url }}" rel="external nofollow noopener" target="_blank">
|
||||
{{- dict "Src" $resource.RelPermalink "Alt" $alt "Class" "version" | partial "plugin/image.html" -}}
|
||||
</a>
|
||||
{{- /* EOF */ -}}
|
||||
|
||||