mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-31 18:52:40 +00:00
Compare commits
46 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fcb0f1efd5 | |||
| 59ee34b710 | |||
| 5518053a26 | |||
| 2a0821f531 | |||
| ad45d89098 | |||
| 261f7b66ef | |||
| fd15415b9a | |||
| ec0663668e | |||
| 712cf2a868 | |||
| 41014f7f5b | |||
| 85d91b8527 | |||
| 3a5d0dee65 | |||
| f98ca2197a | |||
| db77d49afb | |||
| 4df8fd023e | |||
| 8fa3538725 | |||
| 867984fda2 | |||
| 8d10880b35 | |||
| 894c512b1d | |||
| 64f954ccf7 | |||
| c08671dedf | |||
| 28759d5020 | |||
| 0c0fb03a8d | |||
| 39ccc51610 | |||
| 581466fd25 | |||
| 9471b94b09 | |||
| c974c905e5 | |||
| 3edabbef89 | |||
| f738e4a926 | |||
| 12cc5f7e60 | |||
| 39a48f35f0 | |||
| f7670a714b | |||
| cf71f1e289 | |||
| bd40c85586 | |||
| 19ceeb2e99 | |||
| 95436c11ac | |||
| b66fd37057 | |||
| 58cfa55e65 | |||
| 9c440df3d0 | |||
| 53f221b77a | |||
| 729c2c394a | |||
| 566a87c791 | |||
| e9edbba217 | |||
| 9e9bc9effd | |||
| b44555d403 | |||
| ed8cf316a5 |
@@ -1,14 +1,14 @@
|
||||
<!-- markdownlint-disable-file MD033 MD041 -->
|
||||

|
||||
|
||||
<div align="center">English | <a href="README.zh-cn.md">简体中文</a></div>
|
||||
<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)
|
||||
|
||||
@@ -51,7 +51,11 @@ Click the following links to generate a new repository with template:
|
||||
[lruihao-blog]: https://github.com/Lruihao/hugo-blog
|
||||
[lruihao-blog:generate]: https://github.com/Lruihao/hugo-blog/generate
|
||||
|
||||
<!-- ## Why choose FixIt -->
|
||||
## Why choose FixIt
|
||||
|
||||
I don't know why 🤷
|
||||
|
||||
<!-- Too lazy to write... -->
|
||||
|
||||
## Features
|
||||
|
||||
@@ -172,7 +176,7 @@ Don't forget to leave a ⭐️ if you like this theme, thanks!
|
||||
|
||||
## Contributing
|
||||
|
||||
We welcome you to join the development of FixIt. Please see [contributing document](CONTRIBUTING.md). 🤗
|
||||
We welcome you to join the development of FixIt. Please see [contributing document](/CONTRIBUTING.md). 🤗
|
||||
|
||||
Also, we welcome Issue or PR to our [official-components](https://github.com/hugo-fixit).
|
||||
|
||||
@@ -233,7 +237,7 @@ Thanks to all the [contributors](https://github.com/hugo-fixit/FixIt/graphs/cont
|
||||
|
||||
## License
|
||||
|
||||
FixIt is licensed under the **MIT** license. Check the [LICENSE file](LICENSE) for details.
|
||||
FixIt is licensed under the **MIT** license. Check the [LICENSE file](/LICENSE) for details.
|
||||
|
||||
## Sponsor
|
||||
|
||||
|
||||
+9
-5
@@ -1,14 +1,14 @@
|
||||
<!-- markdownlint-disable-file MD033 MD041 -->
|
||||

|
||||
|
||||
<div align="center"><a href="README.md">English</a> | 简体中文</div>
|
||||
<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)
|
||||
|
||||
@@ -51,7 +51,11 @@
|
||||
[lruihao-blog]: https://github.com/Lruihao/hugo-blog
|
||||
[lruihao-blog:generate]: https://github.com/Lruihao/hugo-blog/generate
|
||||
|
||||
<!-- ## 为什么选择 FixIt -->
|
||||
## 为什么选择 FixIt
|
||||
|
||||
我也不知道为什么 🤷
|
||||
|
||||
<!-- 懒的写…… -->
|
||||
|
||||
## 特性
|
||||
|
||||
@@ -176,7 +180,7 @@ Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
|
||||
|
||||
## 参与贡献
|
||||
|
||||
我们欢迎你加入 FixIt 的开发,贡献出你的一份力量。请看开源 [贡献指南](CONTRIBUTING.md)。 🤗
|
||||
我们欢迎你加入 FixIt 的开发,贡献出你的一份力量。请看开源 [贡献指南](/CONTRIBUTING.md)。 🤗
|
||||
|
||||
你也可以随时向我们的 [官方插件](https://github.com/hugo-fixit) 提交 Issue 或 Pull Request。
|
||||
|
||||
@@ -237,7 +241,7 @@ Gitee 镜像仓库:<https://gitee.com/lruihao/FixIt>
|
||||
|
||||
## 许可协议
|
||||
|
||||
FixIt 根据 **MIT** 许可协议授权。更多信息请查看 [LICENSE 文件](LICENSE)。
|
||||
FixIt 根据 **MIT** 许可协议授权。更多信息请查看 [LICENSE 文件](/LICENSE)。
|
||||
|
||||
## 赞助支持
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
.breadcrumb-item {
|
||||
display: flex;
|
||||
|
||||
+.breadcrumb-item::before {
|
||||
content: "/";
|
||||
+ .breadcrumb-item::before {
|
||||
content: attr(data-separator);
|
||||
display: inline-block;
|
||||
padding-inline: 0.5rem;
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
@@ -98,6 +98,10 @@ header {
|
||||
}
|
||||
}
|
||||
|
||||
.menu-link[href="javascript:void(0);"] {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.menu-link i {
|
||||
@include transform(perspective(1rem));
|
||||
@include transition(transform 0.4s ease);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
:root {
|
||||
// Note: Custom variable values only support SassScript inside `#{}`.
|
||||
|
||||
// Theme colors varibles
|
||||
// Theme colors variables
|
||||
@each $color, $value in $theme-colors {
|
||||
--#{$prefix}#{$color}: #{$value};
|
||||
}
|
||||
@@ -22,6 +22,8 @@
|
||||
--#{$prefix}scrollbar-track-color: transparent;
|
||||
--#{$prefix}scrollbar-width: thin;
|
||||
--#{$prefix}scrollbar-width-legacy: 12px;
|
||||
|
||||
// TODO migrate SCSS variables to CSS variables
|
||||
}
|
||||
|
||||
// Dark theme
|
||||
|
||||
@@ -124,39 +124,13 @@
|
||||
}
|
||||
|
||||
.content {
|
||||
@include box(vertical);
|
||||
-webkit-line-clamp: 3;
|
||||
margin-top: 0.3rem;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@include overflow-wrap(break-word);
|
||||
color: $global-font-secondary-color;
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
p {
|
||||
font-size: 1rem;
|
||||
line-height: 1.5;
|
||||
display: inline;
|
||||
|
||||
&::after {
|
||||
content: '\A';
|
||||
white-space: pre;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
|
||||
@include link(false, true);
|
||||
|
||||
b,
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
}
|
||||
|
||||
.single-subtitle {
|
||||
margin: 0.5rem 0;
|
||||
margin-block: 0 0.5rem;
|
||||
font-size: 1.2rem;
|
||||
font-weight: normal;
|
||||
line-height: 100%;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.post-meta {
|
||||
@@ -230,6 +230,38 @@
|
||||
|
||||
ul {
|
||||
list-style-type: disc;
|
||||
|
||||
// Task lists
|
||||
li[data-task] {
|
||||
list-style: none;
|
||||
margin-left: -1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
// Task lists
|
||||
li[data-task] {
|
||||
color: var(--#{$prefix}task-color);
|
||||
.checkbox-icon {
|
||||
margin-right: 0.25em;
|
||||
color: var(--#{$prefix}checkbox-color);
|
||||
}
|
||||
}
|
||||
li[data-task='x'],
|
||||
li[data-task='-'] {
|
||||
--#{$prefix}task-color: var(--#{$prefix}secondary);
|
||||
text-decoration: line-through;
|
||||
}
|
||||
li[data-task='x'] {
|
||||
--#{$prefix}checkbox-color: var(--#{$prefix}primary);
|
||||
}
|
||||
li[data-task='/'] {
|
||||
--#{$prefix}task-color: var(--#{$prefix}success);
|
||||
}
|
||||
li[data-task='!'] {
|
||||
--#{$prefix}checkbox-color: var(--#{$prefix}danger);
|
||||
}
|
||||
li[data-task='?'] {
|
||||
--#{$prefix}checkbox-color: var(--#{$prefix}warning);
|
||||
}
|
||||
|
||||
dl {
|
||||
@@ -257,6 +289,20 @@
|
||||
}
|
||||
}
|
||||
|
||||
mark {
|
||||
padding: 0.14em 0.28em;
|
||||
background-color: var(--#{$prefix}mark-background-color, mark);
|
||||
color: var(--#{$prefix}mark-color, marktext);
|
||||
@include border-radius($global-border-radius);
|
||||
|
||||
@each $color, $value in $theme-colors {
|
||||
&.mark-#{$color} {
|
||||
--#{$prefix}mark-color: #fff;
|
||||
--#{$prefix}mark-background-color: var(--#{$prefix}#{$color});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-wrapper {
|
||||
overflow-x: auto;
|
||||
--#{$prefix}scrollbar-thumb-color: #{$table-background-color};
|
||||
@@ -422,6 +468,16 @@
|
||||
margin-block: 1em;
|
||||
padding-left: 1rem;
|
||||
}
|
||||
|
||||
hr {
|
||||
background-color: var(--#{$prefix}hr-background-color);
|
||||
height: 1px;
|
||||
margin-block: 1em;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
a:not(.footnote-backref) {
|
||||
color: inherit;
|
||||
@@ -443,14 +499,6 @@
|
||||
margin-block: 0;
|
||||
}
|
||||
|
||||
.footnotes {
|
||||
hr {
|
||||
background-color: var(--#{$prefix}hr-background-color);
|
||||
height: 1px;
|
||||
margin-block: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
kbd {
|
||||
display: inline-block;
|
||||
padding: 0 0.25rem;
|
||||
|
||||
@@ -1,40 +1,46 @@
|
||||
.details {
|
||||
.details-summary {
|
||||
> .details-summary {
|
||||
@include border-radius($global-border-radius);
|
||||
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
i.details-icon {
|
||||
color: $global-font-secondary-color;
|
||||
@include transition(transform 0.2s ease);
|
||||
i.details-icon {
|
||||
color: $global-font-secondary-color;
|
||||
@include transition(transform 0.2s ease);
|
||||
|
||||
[data-theme='dark'] & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
[data-theme='dark'] & {
|
||||
color: $global-font-secondary-color-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.details-content {
|
||||
> .details-content {
|
||||
max-height: 0;
|
||||
overflow-y: hidden;
|
||||
@include details-transition-open;
|
||||
}
|
||||
|
||||
&.open {
|
||||
.details-summary {
|
||||
> .details-summary {
|
||||
@include border-radius($global-border-radius $global-border-radius 0 0);
|
||||
|
||||
i.details-icon {
|
||||
@include transform(rotate(90deg));
|
||||
}
|
||||
}
|
||||
|
||||
i.details-icon {
|
||||
@include transform(rotate(90deg));
|
||||
}
|
||||
|
||||
.details-content {
|
||||
> .details-content {
|
||||
max-height: 100%;
|
||||
@include border-radius(0 0 $global-border-radius $global-border-radius);
|
||||
@include details-transition-close;
|
||||
}
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
> .details-summary {
|
||||
cursor: default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,55 @@
|
||||
// Color map of admonition [$type $color $background-color, ... ]
|
||||
$admonition-color-map:
|
||||
'note' #448aff rgba(68, 138, 255, 0.1),
|
||||
'abstract' #00b0ff rgba(0, 176, 255, 0.1),
|
||||
'info' #00b8d4 rgba(0, 184, 212, 0.1),
|
||||
'tip' #00bfa5 rgba(0, 191, 165, 0.1),
|
||||
'success' #00c853 rgba(0, 200, 83, 0.1),
|
||||
'question' #64dd17 rgba(100, 221, 23, 0.1),
|
||||
'warning' #ff9100 rgba(255, 145, 0, 0.1),
|
||||
'failure' #ff5252 rgba(255, 82, 82, 0.1),
|
||||
'danger' #ff1744 rgba(255, 23, 68, 0.1),
|
||||
'bug' #f50057 rgba(245, 0, 87, 0.1),
|
||||
'example' #651fff rgba(101, 31, 255, 0.1),
|
||||
'quote' #9e9e9e rgba(159, 159, 159, 0.1)
|
||||
!default;
|
||||
// Color map of admonitions
|
||||
$admonition-color-map: (
|
||||
note: (
|
||||
color: #448aff,
|
||||
bg-color: rgba(68, 138, 255, 0.1),
|
||||
),
|
||||
abstract: (
|
||||
color: #00b0ff,
|
||||
bg-color: rgba(0, 176, 255, 0.1),
|
||||
),
|
||||
info: (
|
||||
color: #00b8d4,
|
||||
bg-color: rgba(0, 184, 212, 0.1),
|
||||
),
|
||||
todo: (
|
||||
color: #5e9aff,
|
||||
bg-color: rgba(94, 154, 255, 0.1),
|
||||
),
|
||||
tip: (
|
||||
color: #00bfa5,
|
||||
bg-color: rgba(0, 191, 165, 0.1),
|
||||
),
|
||||
success: (
|
||||
color: #00c853,
|
||||
bg-color: rgba(0, 200, 83, 0.1),
|
||||
),
|
||||
question: (
|
||||
color: #ffbd67,
|
||||
bg-color: rgba(255, 190, 0, 0.1),
|
||||
),
|
||||
warning: (
|
||||
color: #ff9100,
|
||||
bg-color: rgba(255, 145, 0, 0.1),
|
||||
),
|
||||
failure: (
|
||||
color: #ff5252,
|
||||
bg-color: rgba(255, 82, 82, 0.1),
|
||||
),
|
||||
danger: (
|
||||
color: #ff1744,
|
||||
bg-color: rgba(255, 23, 68, 0.1),
|
||||
),
|
||||
bug: (
|
||||
color: #f50057,
|
||||
bg-color: rgba(245, 0, 87, 0.1),
|
||||
),
|
||||
example: (
|
||||
color: #651fff,
|
||||
bg-color: rgba(101, 31, 255, 0.1),
|
||||
),
|
||||
quote: (
|
||||
color: #9e9e9e,
|
||||
bg-color: rgba(159, 159, 159, 0.1),
|
||||
),
|
||||
) !default;
|
||||
|
||||
@@ -1,16 +1,46 @@
|
||||
// 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;
|
||||
// Color map of basic alerts
|
||||
$alert-color-map: (
|
||||
note: (
|
||||
border-color: #0969da,
|
||||
color: #0969da,
|
||||
),
|
||||
tip: (
|
||||
border-color: #1a7f37,
|
||||
color: #1a7f37,
|
||||
),
|
||||
important: (
|
||||
border-color: #8250df,
|
||||
color: #8250df,
|
||||
),
|
||||
warning: (
|
||||
border-color: #bf8700,
|
||||
color: #9a6700,
|
||||
),
|
||||
caution: (
|
||||
border-color: #cf222e,
|
||||
color: #d1242f,
|
||||
),
|
||||
) !default;
|
||||
|
||||
$alert-color-map-dark:
|
||||
'note' #316dca #478be6,
|
||||
'tip' #347d39 #57ab5a,
|
||||
'important' #8256d0 #986ee2,
|
||||
'warning' #966600 #c69026,
|
||||
'caution' #c93c37 #e5534b,
|
||||
!default;
|
||||
$alert-color-map-dark: (
|
||||
note: (
|
||||
border-color: #316dca,
|
||||
color: #478be6,
|
||||
),
|
||||
tip: (
|
||||
border-color: #347d39,
|
||||
color: #57ab5a,
|
||||
),
|
||||
important: (
|
||||
border-color: #8256d0,
|
||||
color: #986ee2,
|
||||
),
|
||||
warning: (
|
||||
border-color: #966600,
|
||||
color: #c69026,
|
||||
),
|
||||
caution: (
|
||||
border-color: #c93c37,
|
||||
color: #e5534b,
|
||||
),
|
||||
) !default;
|
||||
|
||||
@@ -26,18 +26,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
@each $type, $border-color, $color in $alert-color-map {
|
||||
@each $type, $item in $alert-color-map {
|
||||
&.alert-#{$type} {
|
||||
--#{$prefix}alert-border-color: #{$border-color};
|
||||
--#{$prefix}alert-color: #{$color};
|
||||
--#{$prefix}alert-border-color: #{map-get($item, border-color)};
|
||||
--#{$prefix}alert-color: #{map-get($item, color)};
|
||||
}
|
||||
}
|
||||
|
||||
[data-theme='dark'] & {
|
||||
@each $type, $border-color, $color in $alert-color-map-dark {
|
||||
@each $type, $item in $alert-color-map-dark {
|
||||
&.alert-#{$type} {
|
||||
--#{$prefix}alert-border-color: #{$border-color};
|
||||
--#{$prefix}alert-color: #{$color};
|
||||
--#{$prefix}alert-border-color: #{map-get($item, border-color)};
|
||||
--#{$prefix}alert-color: #{map-get($item, color)};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,19 @@
|
||||
|
||||
.admonition-content {
|
||||
padding: 0.5rem 0;
|
||||
|
||||
// for extended alert syntax
|
||||
> p {
|
||||
margin: 0;
|
||||
}
|
||||
// title-only alert
|
||||
&:empty {
|
||||
display: none;
|
||||
}
|
||||
// BUG of Hugo https://github.com/gohugoio/hugo/issues/12913
|
||||
&:has(> p:only-child:empty) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
i.icon {
|
||||
@@ -30,43 +43,35 @@
|
||||
top: 0.6rem;
|
||||
right: 0.3rem;
|
||||
}
|
||||
|
||||
background-color: var(--#{$prefix}admonition-bg-color);
|
||||
border-left-color: var(--#{$prefix}admonition-color);
|
||||
|
||||
@each $type, $color, $background-color in $admonition-color-map {
|
||||
@if $type == 'note' {
|
||||
background-color: $background-color;
|
||||
border-left-color: $color;
|
||||
> .admonition-title {
|
||||
border-bottom-color: var(--#{$prefix}admonition-bg-color);
|
||||
background-color: var(--#{$prefix}admonition-bg-color-collapsed);
|
||||
|
||||
.admonition-title {
|
||||
border-bottom-color: $background-color;
|
||||
background-color: opacify($background-color, 0.15);
|
||||
}
|
||||
|
||||
&.open .admonition-title {
|
||||
background-color: $background-color;
|
||||
}
|
||||
|
||||
i.icon {
|
||||
color: $color;
|
||||
}
|
||||
i.icon {
|
||||
color: var(--#{$prefix}admonition-color);
|
||||
}
|
||||
|
||||
@else {
|
||||
}
|
||||
|
||||
&.open > .admonition-title {
|
||||
background-color: var(--#{$prefix}admonition-bg-color);
|
||||
}
|
||||
|
||||
// default admonition type is note
|
||||
--#{$prefix}admonition-color: #{map-get(map-get($admonition-color-map, note), color)};
|
||||
--#{$prefix}admonition-bg-color: #{map-get(map-get($admonition-color-map, note), bg-color)};
|
||||
--#{$prefix}admonition-bg-color-collapsed: #{opacify(map-get(map-get($admonition-color-map, note), bg-color), 0.15)};
|
||||
|
||||
// set color for each admonition type
|
||||
@each $type, $item in $admonition-color-map {
|
||||
@if $type != 'note' {
|
||||
&.#{$type} {
|
||||
background-color: $background-color;
|
||||
border-left-color: $color;
|
||||
|
||||
.admonition-title {
|
||||
border-bottom-color: $background-color;
|
||||
background-color: opacify($background-color, 0.15);
|
||||
}
|
||||
|
||||
&.open .admonition-title {
|
||||
background-color: $background-color;
|
||||
}
|
||||
|
||||
i.icon {
|
||||
color: $color;
|
||||
}
|
||||
--#{$prefix}admonition-color: #{map-get($item, color)};
|
||||
--#{$prefix}admonition-bg-color: #{map-get($item, bg-color)};
|
||||
--#{$prefix}admonition-bg-color-collapsed: #{opacify(map-get($item, bg-color), 0.15)};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-4
@@ -334,7 +334,7 @@ class FixIt {
|
||||
}
|
||||
|
||||
initDetails(target = document) {
|
||||
this.util.forEach(target.getElementsByClassName('details'), ($details) => {
|
||||
this.util.forEach(target.querySelectorAll('.details:not(.disabled)'), ($details) => {
|
||||
const $summary = $details.querySelector('.details-summary');
|
||||
$summary.addEventListener('click', () => {
|
||||
$details.classList.toggle('open');
|
||||
@@ -464,7 +464,7 @@ class FixIt {
|
||||
}
|
||||
$copy.title = this.config.code.copyTitle;
|
||||
$copy.addEventListener('click', () => {
|
||||
navigator.clipboard.writeText(code).then(() => {
|
||||
this.util.copyText(code).then(() => {
|
||||
this.util.animateCSS($code, 'animate__flash');
|
||||
}, () => {
|
||||
console.error('Clipboard write failed!', 'Your browser does not support clipboard API!');
|
||||
@@ -601,11 +601,11 @@ class FixIt {
|
||||
}
|
||||
|
||||
initMermaid() {
|
||||
if (!window.mermaid?.initialize) {
|
||||
if (!this.config.mermaid) {
|
||||
return;
|
||||
}
|
||||
const _initializeAndRun = () => {
|
||||
const themes = window.mermaid.themes ?? ['default', 'dark'];
|
||||
const themes = this.config.mermaid.themes ?? ['default', 'dark'];
|
||||
window.mermaid.initialize({
|
||||
securityLevel: 'loose',
|
||||
startOnLoad: false,
|
||||
@@ -999,6 +999,8 @@ class FixIt {
|
||||
}
|
||||
const selector = this.config.pangu.selector;
|
||||
if (selector) {
|
||||
// to avoid extra spaces for extended Markdown syntax fraction in Chinese
|
||||
pangu.ignoredTags = /^(script|code|pre|textarea|sup|sub)$/i;
|
||||
if (selector.startsWith('#')) {
|
||||
pangu.spacingElementById(selector.slice(1));
|
||||
} else if (selector.startsWith('.')) {
|
||||
|
||||
@@ -86,4 +86,29 @@ export default class Util {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* copy text to clipboard
|
||||
* @param {String} text text to copy
|
||||
* @returns {Promise} promise
|
||||
*/
|
||||
copyText(text) {
|
||||
if (navigator.clipboard) {
|
||||
this.copyText = (text) => navigator.clipboard.writeText(text);
|
||||
return this.copyText(text);
|
||||
}
|
||||
this.copyText = (text) => new Promise((resolve, reject) => {
|
||||
const input = document.createElement('input');
|
||||
input.value = text;
|
||||
document.body.appendChild(input);
|
||||
input.select();
|
||||
if (document.execCommand('copy')) {
|
||||
document.body.removeChild(input);
|
||||
resolve();
|
||||
} else {
|
||||
reject();
|
||||
}
|
||||
});
|
||||
return this.copyText(text);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ enableEmoji = true
|
||||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = true
|
||||
min = "0.132.0"
|
||||
min = "0.134.1"
|
||||
|
||||
# -------------------------------------------------------------------------------------
|
||||
# Markup related configuration in Hugo
|
||||
@@ -197,6 +197,7 @@ enableEmoji = true
|
||||
|
||||
[sitemap]
|
||||
changefreq = "weekly"
|
||||
disable = false
|
||||
filename = "sitemap.xml"
|
||||
priority = 0.5
|
||||
|
||||
@@ -329,6 +330,8 @@ enableEmoji = true
|
||||
enablePWA = false
|
||||
# FixIt 0.2.14 | NEW whether to add external Icon for external links automatically
|
||||
externalIcon = false
|
||||
# FixIt 0.3.13 | NEW whether to capitalize titles
|
||||
capitalizeTitles = true
|
||||
# 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
|
||||
@@ -337,6 +340,8 @@ enableEmoji = true
|
||||
# FixIt 0.3.0 | NEW whether to add site subtitle to the title of index page
|
||||
# remember to set up your site subtitle by `params.header.subtitle.name`
|
||||
indexWithSubtitle = false
|
||||
# FixIt 0.3.13 | NEW whether to show summary in plain text
|
||||
summaryPlainify = false
|
||||
# FixIt 0.2.14 | NEW FixIt will, by default, inject a theme meta tag in the HTML head on the home page only.
|
||||
# You can turn it off, but we would really appreciate if you don’t, as this is a good way to watch FixIt's popularity on the rise.
|
||||
disableThemeInject = false
|
||||
@@ -439,6 +444,9 @@ enableEmoji = true
|
||||
enable = false
|
||||
sticky = false
|
||||
showHome = false
|
||||
# FixIt 0.3.13 | NEW
|
||||
separator = "/"
|
||||
capitalize = true
|
||||
|
||||
# FixIt 0.3.10 | NEW Post navigation config
|
||||
[params.navigation]
|
||||
@@ -501,13 +509,6 @@ enableEmoji = true
|
||||
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]
|
||||
enable = false
|
||||
rss = false
|
||||
days = 30
|
||||
maxCount = 10
|
||||
|
||||
# Term list (category or tag) page config
|
||||
[params.list]
|
||||
@@ -522,6 +523,14 @@ enableEmoji = true
|
||||
# whether to show the full text content in feed.
|
||||
fullText = false
|
||||
|
||||
# FixIt 0.3.13 | NEW recently updated pages config for archives, section and term list
|
||||
[params.recentlyUpdated]
|
||||
archives = true
|
||||
section = true
|
||||
list = true
|
||||
days = 30
|
||||
maxCount = 10
|
||||
|
||||
# FixIt 0.2.17 | NEW TagCloud config for tags page
|
||||
[params.tagcloud]
|
||||
enable = false
|
||||
@@ -674,6 +683,25 @@ enableEmoji = true
|
||||
# For values, see https://mermaid.js.org/config/theming.html#available-themes
|
||||
themes = ["default", "dark"]
|
||||
|
||||
# FixIt 0.3.13 | NEW Admonitions custom config
|
||||
# See https://fixit.lruihao.cn/documentation/content-management/shortcodes/extended/admonition/#custom-admonitions
|
||||
# syntax: <type> = <icon>
|
||||
[params.admonition]
|
||||
# ban = "fa-solid fa-ban"
|
||||
|
||||
# FixIt 0.3.14 | NEW Task lists custom config
|
||||
# See https://fixit.lruihao.cn/documentation/content-management/advanced/#custom-task-lists
|
||||
# syntax: <sign> = <icon>
|
||||
[params.taskList]
|
||||
# tip = "fa-regular fa-lightbulb"
|
||||
|
||||
# FixIt 0.3.15 | NEW version shortcode config
|
||||
[params.repoVersion]
|
||||
# url prefix for the release tag
|
||||
url = "https://github.com/hugo-fixit/FixIt/releases/tag/v"
|
||||
# project name
|
||||
name = "FixIt"
|
||||
|
||||
# FixIt 0.2.12 | NEW PanguJS config
|
||||
[params.pangu]
|
||||
# For Chinese writing
|
||||
@@ -819,6 +847,10 @@ enableEmoji = true
|
||||
limit = 10
|
||||
# whether to show the full text content in feed.
|
||||
fullText = true
|
||||
# Site Challenge for Follow: https://follow.is/
|
||||
[params.feed.follow]
|
||||
feedId = ""
|
||||
userId = ""
|
||||
|
||||
# FixIt 0.3.12 | NEW Custom partials config
|
||||
# Custom partials must be stored in the /layouts/partials/ directory.
|
||||
|
||||
@@ -182,11 +182,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Notiz"
|
||||
abstract = "Kurzfassung"
|
||||
info = "Info"
|
||||
todo = "Aufgabe"
|
||||
tip = "Tipp"
|
||||
success = "Erfolg"
|
||||
question = "Frage"
|
||||
|
||||
@@ -181,11 +181,24 @@ warning = "Warning"
|
||||
caution = "Caution"
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = "Unchecked"
|
||||
"x" = "Checked"
|
||||
"/" = "In Progress"
|
||||
"-" = "Cancelled"
|
||||
"<" = "Scheduled"
|
||||
">" = "Rescheduled"
|
||||
"!" = "Important"
|
||||
"?" = "Question"
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Note"
|
||||
abstract = "Abstract"
|
||||
info = "Info"
|
||||
todo = "Todo"
|
||||
tip = "Tip"
|
||||
success = "Success"
|
||||
question = "Question"
|
||||
|
||||
@@ -182,11 +182,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Nota"
|
||||
abstract = "Resumen"
|
||||
info = "Información"
|
||||
todo = "Por hacer"
|
||||
tip = "Consejo"
|
||||
success = "Éxito"
|
||||
question = "Pregunta"
|
||||
|
||||
@@ -181,11 +181,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Remarque"
|
||||
abstract = "Résumé"
|
||||
info = "Info"
|
||||
todo = "À faire"
|
||||
tip = "Astuce"
|
||||
success = "Succès"
|
||||
question = "Question"
|
||||
|
||||
@@ -182,11 +182,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "ध्यान दें"
|
||||
abstract = "सारांश"
|
||||
info = "जानकारी"
|
||||
todo = "करने के लिए"
|
||||
tip = "टिप"
|
||||
success = "सफलता"
|
||||
question = "प्रश्न"
|
||||
|
||||
@@ -182,11 +182,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Note"
|
||||
abstract = "Sommario"
|
||||
info = "Info"
|
||||
todo = "Da fare"
|
||||
tip = "Suggerimenti"
|
||||
success = "Successo"
|
||||
question = "Domande"
|
||||
|
||||
@@ -182,11 +182,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Notka"
|
||||
abstract = "Streszczenie"
|
||||
info = "Info"
|
||||
todo = "Do zrobienia"
|
||||
tip = "Wskazówka"
|
||||
success = "Sukces"
|
||||
question = "Pytanie"
|
||||
|
||||
@@ -182,11 +182,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Nota"
|
||||
abstract = "Abstrato"
|
||||
info = "Info"
|
||||
todo = "A fazer"
|
||||
tip = "Dica"
|
||||
success = "Sucesso"
|
||||
question = "Pergunta"
|
||||
|
||||
@@ -182,11 +182,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Notă"
|
||||
abstract = "Rezumat"
|
||||
info = "Info"
|
||||
todo = "De făcut"
|
||||
tip = "Sfat"
|
||||
success = "Succes"
|
||||
question = "Întrebare"
|
||||
|
||||
@@ -182,11 +182,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Замечание"
|
||||
abstract = "Краткое описание"
|
||||
info = "Инфо"
|
||||
todo = "Сделать"
|
||||
tip = "Совет"
|
||||
success = "Удачто"
|
||||
question = "Вопрос"
|
||||
|
||||
@@ -182,11 +182,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Напомена"
|
||||
abstract = "Сажетак"
|
||||
info = "Инфо"
|
||||
todo = "То-до"
|
||||
tip = "Савет"
|
||||
success = "Успех"
|
||||
question = "Питање"
|
||||
|
||||
@@ -181,11 +181,24 @@ warning = ""
|
||||
caution = ""
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = ""
|
||||
"x" = ""
|
||||
"/" = ""
|
||||
"-" = ""
|
||||
"<" = ""
|
||||
">" = ""
|
||||
"!" = ""
|
||||
"?" = ""
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "Ghi chú"
|
||||
abstract = "Tóm tắt"
|
||||
info = "Thông tin"
|
||||
todo = "Cần làm"
|
||||
tip = "Mẹo"
|
||||
success = "Thành công"
|
||||
question = "Câu hỏi"
|
||||
|
||||
@@ -177,11 +177,24 @@ warning = "警告"
|
||||
caution = "小心"
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = "未完成"
|
||||
"x" = "已完成"
|
||||
"/" = "进行中"
|
||||
"-" = "已取消"
|
||||
"<" = "已计划"
|
||||
">" = "已重新计划"
|
||||
"!" = "重要"
|
||||
"?" = "问题"
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "注意"
|
||||
abstract = "摘要"
|
||||
info = "信息"
|
||||
todo = "待办"
|
||||
tip = "技巧"
|
||||
success = "成功"
|
||||
question = "问题"
|
||||
|
||||
@@ -177,11 +177,24 @@ warning = "警告"
|
||||
caution = "小心"
|
||||
# === GitHub Alert ===
|
||||
|
||||
# === Task lists ===
|
||||
[taskList]
|
||||
" " = "未完成"
|
||||
"x" = "已完成"
|
||||
"/" = "進行中"
|
||||
"-" = "已取消"
|
||||
"<" = "已計劃"
|
||||
">" = "已重新計劃"
|
||||
"!" = "重要"
|
||||
"?" = "問題"
|
||||
# === Task lists ===
|
||||
|
||||
# === shortcodes/admonition.html ===
|
||||
[admonition]
|
||||
note = "注意"
|
||||
abstract = "摘要"
|
||||
info = "資訊"
|
||||
todo = "待辦"
|
||||
tip = "提示"
|
||||
success = "成功"
|
||||
question = "問題"
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- $basicTypes := slice "note" "tip" "important" "warning" "caution" -}}
|
||||
|
||||
{{- if .AlertTitle | or .AlertSign | or (.AlertType | in $basicTypes | not) -}}
|
||||
{{- /* The extended syntax is compatible with Obsidian and FixIt admonition shortcode. */ -}}
|
||||
{{- /* === Dirty hack === */ -}}
|
||||
{{- /* BUG of Hugo https://github.com/gohugoio/hugo/issues/12913 */ -}}
|
||||
{{- $title := replaceRE "</([a-zA-Z]+)$" "</$1>" .AlertTitle -}}
|
||||
{{- /* === Dirty hack === */ -}}
|
||||
{{- $openMap := dict "+" true "-" false -}}
|
||||
{{- $open := index $openMap .AlertSign | default true -}}
|
||||
{{- $foldable := ne .AlertSign "" -}}
|
||||
{{- dict
|
||||
"Type" .AlertType
|
||||
"Title" $title
|
||||
"Open" $open
|
||||
"Text" .Text
|
||||
"Foldable" $foldable
|
||||
| partial "plugin/admonition.html"
|
||||
-}}
|
||||
{{- else -}}
|
||||
{{- /* The basic syntax is compatible with GitHub, Obsidian, and Typora. */ -}}
|
||||
{{- dict
|
||||
"Type" .AlertType
|
||||
"Text" .Text
|
||||
"Attributes" .Attributes
|
||||
| partial "plugin/alert.html"
|
||||
-}}
|
||||
{{- end -}}
|
||||
@@ -1,11 +0,0 @@
|
||||
{{- $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,27 +1,45 @@
|
||||
{{- /* Read the config and format */ -}}
|
||||
{{- $params := .Page.Params | merge site.Params.page -}}
|
||||
{{- $ordered := $params.toc.ordered | and $params.heading.number.enable -}}
|
||||
{{- $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}" -}}
|
||||
{{- $h4Format := $params.heading.number.format.h4 | default "{h2}.{h3}.{h4} {title}" -}}
|
||||
{{- $h5Format := $params.heading.number.format.h5 | default "{h2}.{h3}.{h4}.{h5} {title}" -}}
|
||||
{{- $h6Format := $params.heading.number.format.h6 | default "{h2}.{h3}.{h4}.{h5}.{h6} {title}" -}}
|
||||
{{- /* Toc data patch */ -}}
|
||||
{{- $toc := $params.toc -}}
|
||||
{{- if not (reflect.IsMap $toc) -}}
|
||||
{{- $toc = dict "enable" $toc | merge site.Params.page.toc -}}
|
||||
{{- end -}}
|
||||
{{- $headingConfig := $params.heading -}}
|
||||
{{- /* Only enable in main section pages */ -}}
|
||||
{{- $onlyMainSection := cond $headingConfig.number.onlyMainSection (eq .Page.Type "posts") true -}}
|
||||
{{- $ordered := $toc.ordered | and $headingConfig.number.enable | and $onlyMainSection -}}
|
||||
{{- $h1Format := $headingConfig.number.format.h1 | default "{title}" -}}
|
||||
{{- $h2Format := $headingConfig.number.format.h2 | default "{h2} {title}" -}}
|
||||
{{- $h3Format := $headingConfig.number.format.h3 | default "{h2}.{h3} {title}" -}}
|
||||
{{- $h4Format := $headingConfig.number.format.h4 | default "{h2}.{h3}.{h4} {title}" -}}
|
||||
{{- $h5Format := $headingConfig.number.format.h5 | default "{h2}.{h3}.{h4}.{h5} {title}" -}}
|
||||
{{- $h6Format := $headingConfig.number.format.h6 | default "{h2}.{h3}.{h4}.{h5}.{h6} {title}" -}}
|
||||
{{- $level := .Level -}}
|
||||
{{- $maxMarkupLevel := 2 -}}
|
||||
|
||||
{{- /* Disable ordered headings on home page */ -}}
|
||||
{{- if eq hugo.Context.MarkupScope "home" -}}
|
||||
{{- $ordered = false -}}
|
||||
{{- /* Decrease the level to match the correct HTML level */ -}}
|
||||
{{- $level = add $level 1 -}}
|
||||
{{- $maxMarkupLevel = 3 -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if $ordered -}}
|
||||
{{- /* Set the count for child level to 0 */ -}}
|
||||
{{- .Page.Scratch.SetInMap "heading-counter" (string (add .Level 1)) 0 -}}
|
||||
{{- .Page.Scratch.SetInMap "heading-counter" (string (add $level 1)) 0 -}}
|
||||
{{- end -}}
|
||||
|
||||
<h{{ .Level }} id="{{ .Anchor | safeURL }}" class="heading-element">
|
||||
{{- /* Force decrease the markup level to avoid multiple h1 */ -}}
|
||||
{{- $markupLevel := cond (gt $maxMarkupLevel $level) $maxMarkupLevel $level -}}
|
||||
<h{{ $markupLevel }} id="{{ .Anchor | safeURL }}" class="heading-element">
|
||||
{{- $title := .Text -}}
|
||||
{{- /* Only enable in main section pages */ -}}
|
||||
{{- $onlyMainSection := cond $params.heading.number.onlyMainSection (eq .Page.Type "posts") true -}}
|
||||
{{- if $ordered | and $onlyMainSection -}}
|
||||
{{- if $ordered -}}
|
||||
{{- /* Add 1 to the current level */ -}}
|
||||
{{- $headingMap := .Page.Scratch.Get "heading-counter" -}}
|
||||
{{- $count := (string .Level) | index $headingMap | int | add 1 -}}
|
||||
{{- .Page.Scratch.SetInMap "heading-counter" (string .Level) $count -}}
|
||||
{{- $count := (string $level) | index $headingMap | int | add 1 -}}
|
||||
{{- .Page.Scratch.SetInMap "heading-counter" (string $level) $count -}}
|
||||
|
||||
{{- /* Get the counters for all levels */ -}}
|
||||
{{- $h1 := "1" | index $headingMap | int | string -}}
|
||||
@@ -33,17 +51,17 @@
|
||||
|
||||
{{- /* Apply the level based on the format */ -}}
|
||||
{{- $title = "" -}}
|
||||
{{- if .Level | eq 1 -}}
|
||||
{{- if $level | eq 1 -}}
|
||||
{{- $title = $h1Format -}}
|
||||
{{- else if .Level | eq 2 -}}
|
||||
{{- else if $level | eq 2 -}}
|
||||
{{- $title = $h2Format -}}
|
||||
{{- else if .Level | eq 3 -}}
|
||||
{{- else if $level | eq 3 -}}
|
||||
{{- $title = $h3Format -}}
|
||||
{{- else if .Level | eq 4 -}}
|
||||
{{- else if $level | eq 4 -}}
|
||||
{{- $title = $h4Format -}}
|
||||
{{- else if .Level | eq 5 -}}
|
||||
{{- else if $level | eq 5 -}}
|
||||
{{- $title = $h5Format -}}
|
||||
{{- else if .Level | eq 6 -}}
|
||||
{{- else if $level | eq 6 -}}
|
||||
{{- $title = $h6Format -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -55,12 +73,12 @@
|
||||
{{- $title = replace $title "{h6}" $h6 -}}
|
||||
{{- $title = replace $title "{title}" .Text -}}
|
||||
{{- end -}}
|
||||
{{- if $params.heading.capitalize -}}
|
||||
{{- if $headingConfig.capitalize -}}
|
||||
{{- $title = replace $title .PlainText (title .PlainText) -}}
|
||||
{{- end -}}
|
||||
<span>{{ $title | safeHTML }}</span>
|
||||
<a href="#{{ .Anchor | safeURL }}" class="heading-mark">
|
||||
<svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>
|
||||
</a>
|
||||
</h{{ .Level }}>
|
||||
</h{{ $markupLevel }}>
|
||||
{{- /* EOF */ -}}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- /* TODO refactor */ -}}
|
||||
{{- $params := .Page.Params | merge site.Params.page -}}
|
||||
{{- if .Title | and .Text -}}
|
||||
{{- $linked := ne $params.lightgallery false -}}
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
{{- else -}}
|
||||
{{- $pages = .Paginate $pages -}}
|
||||
{{- end -}}
|
||||
{{- partial "recently-updated.html" . -}}
|
||||
{{- range $pages.PageGroups -}}
|
||||
<h2 class="group-title">
|
||||
{{- dict "Class" "fa-regular fa-calendar fa-fw me-1" | partial "plugin/icon.html" -}}
|
||||
@@ -52,7 +53,7 @@
|
||||
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
|
||||
{{- end -}}
|
||||
{{- /* Use the original title after archiving the articles */ -}}
|
||||
{{- title .Title -}}
|
||||
{{- cond (.Param "capitalizeTitles") (title .Title) .Title -}}
|
||||
</a>
|
||||
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Date.Format }}'>
|
||||
{{- .Date | dateFormat ($.Site.Params.archives.dateFormat | default "01-02") -}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- define "title" -}}
|
||||
{{- title .Title -}}
|
||||
{{- cond (.Param "capitalizeTitles") (title .Title) .Title -}}
|
||||
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
<article class="page single special">
|
||||
<div class="header">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="single-title animate__animated animate__pulse animate__faster">{{- title .Title -}}</h1>
|
||||
<h1 class="single-title animate__animated animate__pulse animate__faster">{{- cond (.Param "capitalizeTitles") (title .Title) .Title -}}</h1>
|
||||
|
||||
{{- /* Subtitle */ -}}
|
||||
{{- with $params.subtitle -}}<p class="single-subtitle animate__animated animate__fadeIn">{{ . }}</p>{{- end -}}
|
||||
{{- with $params.subtitle -}}<p class="single-subtitle animate__animated animate__fadeIn">{{ . | $.RenderString }}</p>{{- end -}}
|
||||
</div>
|
||||
|
||||
{{- /* Content */ -}}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
{{- $author := .Store.Get "author" -}}
|
||||
# {{ title .Title }}
|
||||
# {{ cond (.Param "capitalizeTitles") (title .Title) .Title }}
|
||||
|
||||
{{ if $params.password -}}
|
||||
_**{{ T "single.encryptedAbstract" }}**_
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<span title="{{ $title }}" class="icon-repost">{{- $icon | partial "plugin/icon.html" -}}</span>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<a href="{{ .RelPermalink }}">{{ title .Title }}</a>
|
||||
<a href="{{ .RelPermalink }}">{{ cond (.Param "capitalizeTitles") (title .Title) .Title }}</a>
|
||||
</h2>
|
||||
|
||||
{{- /* Meta */ -}}
|
||||
@@ -49,8 +49,14 @@
|
||||
|
||||
{{- /* Summary content */ -}}
|
||||
<div class="content">
|
||||
{{- with .Summary -}}
|
||||
{{- dict "Content" . "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
|
||||
{{- if .Summary -}}
|
||||
{{- $plainify := (.Param "summaryPlainify") | default false -}}
|
||||
{{- with .Markup "home" -}}
|
||||
{{- with .Render -}}
|
||||
{{- $summary := dict "Content" .Summary.Text "Ruby" $params.ruby "Fraction" $params.fraction "Fontawesome" $params.fontawesome | partial "function/content.html" | safeHTML -}}
|
||||
{{- cond $plainify ($summary | plainify) $summary -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- .Description | safeHTML -}}
|
||||
{{- end -}}
|
||||
@@ -70,3 +76,4 @@
|
||||
{{- end -}}
|
||||
</div>
|
||||
</article>
|
||||
{{- /* EOF */ -}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{- define "title" -}}
|
||||
{{- title .Title -}}
|
||||
{{- cond (.Param "capitalizeTitles") (title .Title) .Title -}}
|
||||
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
<article class="page single special friends">
|
||||
<div class="header">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="single-title animate__animated animate__pulse animate__faster">{{- title .Title -}}</h1>
|
||||
<h1 class="single-title animate__animated animate__pulse animate__faster">{{- cond (.Param "capitalizeTitles") (title .Title) .Title -}}</h1>
|
||||
{{- /* Subtitle */ -}}
|
||||
{{- with $params.subtitle -}}<p class="single-subtitle animate__animated animate__fadeIn">{{ . }}</p>{{- end -}}
|
||||
{{- with $params.subtitle -}}<p class="single-subtitle animate__animated animate__fadeIn">{{ . | $.RenderString }}</p>{{- end -}}
|
||||
</div>
|
||||
|
||||
{{- /* Friend links */ -}}
|
||||
|
||||
@@ -115,10 +115,13 @@
|
||||
|
||||
{{- /* mermaid */ -}}
|
||||
{{- if .Store.Get "hasMermaid" -}}
|
||||
{{- $config = dict "themes" .Site.Params.mermaid.themes | dict "mermaid" | merge $config -}}
|
||||
<script type="module">
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
|
||||
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11.3.0/dist/mermaid.esm.min.mjs';
|
||||
// Style conflict with ZenUML
|
||||
// import zenuml from 'https://cdn.jsdelivr.net/npm/@mermaid-js/mermaid-zenuml@0.2.0/dist/mermaid-zenuml.esm.min.mjs'
|
||||
// await mermaid.registerExternalDiagrams([zenuml]);
|
||||
window.mermaid = mermaid;
|
||||
window.mermaid.themes = {{ .Site.Params.mermaid.themes }};
|
||||
</script>
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{{- if (gt (len .Ancestors.Reverse) 1) | and (eq .Site.Params.breadcrumb.enable true) -}}
|
||||
{{- $separator := .Site.Params.breadcrumb.separator | default "/" -}}
|
||||
<nav aria-label="breadcrumb" class="breadcrumb-container{{ if .Site.Params.breadcrumb.sticky }} sticky{{ end }}">
|
||||
<ol class="breadcrumb">
|
||||
{{- range .Ancestors.Reverse -}}
|
||||
@@ -7,12 +8,13 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- $title := "" -}}
|
||||
{{- $capitalizeTitles := .Param "capitalizeTitles" -}}
|
||||
{{- with .Description -}}
|
||||
{{- $title = . -}}
|
||||
{{- else -}}
|
||||
{{- $title = title .LinkTitle -}}
|
||||
{{- $title = cond $capitalizeTitles (title .LinkTitle) .LinkTitle -}}
|
||||
{{- if .IsPage | and .Summary -}}
|
||||
{{- $title = .Summary -}}
|
||||
{{- $title = .Summary | plainify -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -20,13 +22,16 @@
|
||||
{{- if .IsHome -}}
|
||||
{{- $innerText = T "single.home" -}}
|
||||
{{- else -}}
|
||||
{{- $innerText = ((T (add .TranslationKey ".breadcrumbTitle")) | default (lower .LinkTitle | T) | default .LinkTitle) | title -}}
|
||||
{{- $innerText = (T (add .TranslationKey ".breadcrumbTitle")) | default (lower .LinkTitle | T) | default .LinkTitle -}}
|
||||
{{- $innerText = cond ((.Param "breadcrumb.capitalize") | and $capitalizeTitles) (title $innerText) $innerText -}}
|
||||
{{- end -}}
|
||||
|
||||
<li class="breadcrumb-item"><a href="{{ .RelPermalink }}" title="{{ $title }}">{{ $innerText }}</a></li>
|
||||
<li class="breadcrumb-item" data-separator="{{ $separator }}"><a href="{{ .RelPermalink }}" title="{{ $title }}">{{ $innerText }}</a></li>
|
||||
{{- end -}}
|
||||
|
||||
<li class="breadcrumb-item active" aria-current="page">{{ (T (add .TranslationKey ".breadcrumbTitle")) | default (lower .LinkTitle | T) | default .LinkTitle | title }}</li>
|
||||
{{- $currentText := (T (add .TranslationKey ".breadcrumbTitle")) | default (lower .LinkTitle | T) | default .LinkTitle -}}
|
||||
{{- $currentText = cond ((.Param "breadcrumb.capitalize") | and (.Param "capitalizeTitles")) (title $currentText) $currentText -}}
|
||||
<li class="breadcrumb-item active" data-separator="{{ $separator }}" aria-current="page">{{ $currentText }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
{{- end -}}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
{{- 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">
|
||||
@@ -14,6 +13,12 @@
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>{{ .Site.Params.description | default .Site.Title }}</description>
|
||||
{{- if and (.Site.Params.feed.follow.feedId) (.Site.Params.feed.follow.userId) }}
|
||||
<follow_challenge>
|
||||
<feedId>{{ .Site.Params.feed.follow.feedId }}</feedId>
|
||||
<userId>{{ .Site.Params.feed.follow.userId }}</userId>
|
||||
</follow_challenge>
|
||||
{{- end }}
|
||||
<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 }}
|
||||
@@ -54,14 +59,12 @@
|
||||
{{- 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 -}}
|
||||
{{- $content | transform.XMLEscape | safeHTML -}}
|
||||
</description>
|
||||
{{- else }}
|
||||
<description>{{ (.Summary | default .Description | default .Title) | transform.XMLEscape | safeHTML }}</description>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{{- /* Checkbox unchecked */ -}}
|
||||
{{- $old := `<input disabled="" type="checkbox">` -}}
|
||||
{{- $new := dict "Class" "fa-regular fa-square fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- $content := replace . $old $new -}}
|
||||
|
||||
{{- /* Checkbox checked */ -}}
|
||||
{{- $old = `<input checked="" disabled="" type="checkbox">` -}}
|
||||
{{- $new := dict "Class" "fa-regular fa-check-square fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- return replace $content $old $new -}}
|
||||
@@ -14,8 +14,8 @@
|
||||
{{- $content = partial "function/fontawesome.html" $content -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $content = partial "function/checkbox.html" $content -}}
|
||||
|
||||
{{- $content = partial "function/task-lists.html" $content -}}
|
||||
{{- $content = partial "function/marked-text.html" $content -}}
|
||||
{{- $content = partial "function/escape.html" $content -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{{- /*
|
||||
Marked texts rendering
|
||||
This is an experimental syntax highlighting for the marked texts.
|
||||
Embed types: default, primary, secondary, success, warning, danger
|
||||
*/ -}}
|
||||
|
||||
{{- $content := replaceRE `<mark>(.+?)</mark>\[(.+?)\]` `<mark class="mark-$2">$1</mark>` . -}}
|
||||
{{- $content = replaceRE `<mark>(.+?)</mark>` `<mark class="mark-default">$1</mark>` $content -}}
|
||||
|
||||
{{- return $content -}}
|
||||
@@ -0,0 +1,55 @@
|
||||
{{- /* Task lists rendering */ -}}
|
||||
{{- /* If Hugo supports the list rendering hook, refactor this snippet. */ -}}
|
||||
|
||||
{{- $iconMap := dict
|
||||
" " "fa-regular fa-square"
|
||||
"x" "fa-solid fa-check-square"
|
||||
"/" "fa-regular fa-square"
|
||||
"-" "fa-solid fa-square-xmark"
|
||||
"<" "fa-regular fa-calendar-plus"
|
||||
">" "fa-regular fa-calendar-minus"
|
||||
"!" "fa-solid fa-circle-exclamation"
|
||||
"\\?" "fa-regular fa-circle-question"
|
||||
-}}
|
||||
{{- /* Custom Task lists */ -}}
|
||||
{{- $iconMap = site.Params.taskList | merge $iconMap -}}
|
||||
|
||||
{{- /* Get the extended signs */ -}}
|
||||
{{- $extendedSigns := slice -}}
|
||||
{{- range $sign, $icon := $iconMap -}}
|
||||
{{- $extendedSigns = $extendedSigns | append $sign -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /*
|
||||
The basic syntax is compatible with GitHub, Obsidian, and Typora.
|
||||
The basic format is as follows:
|
||||
- [ ] Unchecked
|
||||
- [x] Checked
|
||||
*/ -}}
|
||||
{{- $icon := dict "Class" (add "checkbox-icon fa-fw " (index $iconMap " ")) | partial "plugin/icon.html" -}}
|
||||
{{- $label := T (printf "taskList.%v" " ") -}}
|
||||
{{- $content := replaceRE `<li>(\n<p>)*<input disabled="" type="checkbox"> (.+?)(</p>\n)*</li>` (printf `<li data-task=" " title=%q>$1%s$2$3</li>` $label $icon) . -}}
|
||||
{{- $label := T (printf "taskList.%v" "x") -}}
|
||||
{{- $icon := dict "Class" (add "checkbox-icon fa-fw " (index $iconMap "x")) | partial "plugin/icon.html" -}}
|
||||
{{- $content = replaceRE `<li>(\n<p>)*<input checked="" disabled="" type="checkbox"> (.+?)(</p>\n)*</li>` (printf `<li data-task="x" title=%q>$1%s$2$3</li>` $label $icon) $content -}}
|
||||
|
||||
{{- /*
|
||||
The extended syntax is compatible with Obsidian.
|
||||
The extended format is as follows:
|
||||
- [-] Cancelled
|
||||
- [/] In Progress
|
||||
- [<] Scheduled
|
||||
- [>] Rescheduled
|
||||
- [!] Important
|
||||
- [?] Question
|
||||
*/ -}}
|
||||
{{- range $extendedSigns -}}
|
||||
{{- $class := index $iconMap . | default "fa-solid fa-check-square" -}}
|
||||
{{- $icon := dict "Class" (add "checkbox-icon fa-fw " $class) | partial "plugin/icon.html" -}}
|
||||
{{- $sign := htmlEscape . -}}
|
||||
{{- $originSign := replace . "\\" "" -}}
|
||||
{{- $label := (T (printf "taskList.%v" $originSign)) | default (T (printf "taskList.%v" " ")) -}}
|
||||
{{- $content = replaceRE (printf `<li>(\n<p>)*\[%s\] (.+?)(</p>\n)*</li>` $sign) (printf `<li data-task=%q title=%q>$1%s$2$3</li>` $originSign $label $icon) $content -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- return $content -}}
|
||||
@@ -1,7 +1,7 @@
|
||||
{{- $author := partial "function/get-author-map.html" .Params.author -}}
|
||||
|
||||
<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 }}">
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage | and .Summary }}{{ .Summary | plainify }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
|
||||
{{- $keywords := .Keywords -}}
|
||||
{{- if not $keywords -}}
|
||||
|
||||
@@ -38,17 +38,19 @@
|
||||
<nav>
|
||||
<ul class="menu">
|
||||
{{- range .Site.Menus.main -}}
|
||||
{{- $url := .URL | relLangURL -}}
|
||||
{{- $url := .URL -}}
|
||||
{{- with $url -}}
|
||||
{{- $url = . | relLangURL -}}
|
||||
{{- end -}}
|
||||
{{- with .Page -}}
|
||||
{{- $url = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- if (ne .Params.Draft true) | or $buildDrafts | and (ne .Params.Type "mobile") -}}
|
||||
<li class="menu-item{{ if $.IsMenuCurrent `main` . | or ($.HasMenuCurrent `main` .) | or (eq $.RelPermalink $url) }} active{{ end }}{{ with .Params.Class }} {{ . }}{{ end }}{{ if .HasChildren }} has-children{{ end }}">
|
||||
<a
|
||||
class="menu-link"
|
||||
href="{{ $url }}"
|
||||
{{ with .Title }}title="{{ . }}"{{ end }}
|
||||
{{ if (urls.Parse $url).Host }}rel="noopener noreferrer" target="_blank"{{ end }}
|
||||
<a class="menu-link"
|
||||
{{- with $url }} href="{{ $url }}"{{ else }} href="javascript:void(0);"{{ end }}
|
||||
{{- with .Title }} title="{{ . }}"{{ end }}
|
||||
{{- if (urls.Parse $url).Host }} rel="noopener noreferrer" target="_blank"{{ end -}}
|
||||
>
|
||||
{{- with .Pre -}}{{- . | safeHTML }} {{ end }}
|
||||
{{- with .Params.Icon -}}{{ dict "Class" (printf "%v fa-fw fa-sm" .) | partial "plugin/icon.html" }} {{ end }}
|
||||
@@ -59,7 +61,10 @@
|
||||
{{ dict "Class" "dropdown-icon fa-solid fa-chevron-down" | partial "plugin/icon.html" }}
|
||||
<ul class="sub-menu">
|
||||
{{- range $k, $v := .Children -}}
|
||||
{{- $url := $v.URL | relLangURL -}}
|
||||
{{- $url := $v.URL -}}
|
||||
{{- with $url -}}
|
||||
{{- $url = . | relLangURL -}}
|
||||
{{- end -}}
|
||||
{{- with $v.Page -}}
|
||||
{{- $url = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
@@ -67,14 +72,11 @@
|
||||
{{- if $k | and $v.Params.Divided -}}
|
||||
<li class="menu-item-divider" aria-hidden="true"></li>
|
||||
{{- end -}}
|
||||
<li
|
||||
class="menu-item{{ if $.IsMenuCurrent `main` $v | or ($.HasMenuCurrent `main` $v) | or (eq $.RelPermalink $url) }} active{{ end }}{{ with $v.Params.Class }} {{ . }}{{ end }}"
|
||||
>
|
||||
<a
|
||||
class="menu-link"
|
||||
href="{{ $url }}"
|
||||
{{ with $v.Title }}title="{{ . }}"{{ end }}
|
||||
{{ if (urls.Parse $url).Host }}rel="noopener noreferrer" target="_blank"{{ end }}
|
||||
<li class="menu-item{{ if $.IsMenuCurrent `main` $v | or ($.HasMenuCurrent `main` $v) | or (eq $.RelPermalink $url) }} active{{ end }}{{ with $v.Params.Class }} {{ . }}{{ end }}">
|
||||
<a class="menu-link"
|
||||
{{- with $url }} href="{{ $url }}"{{ else }} href="javascript:void(0);"{{ end }}
|
||||
{{- with $v.Title }} title="{{ . }}"{{ end }}
|
||||
{{- if (urls.Parse $url).Host }} rel="noopener noreferrer" target="_blank"{{ end -}}
|
||||
>
|
||||
{{- with $v.Pre -}}{{- . | safeHTML }} {{ end }}
|
||||
{{- with $v.Params.Icon -}}{{ dict "Class" (printf "%v fa-fw fa-sm" .) | partial "plugin/icon.html" }} {{ end }}
|
||||
@@ -128,17 +130,13 @@
|
||||
{{- end -}}
|
||||
{{- else if .IsTranslated -}}
|
||||
{{- range .AllTranslations -}}
|
||||
{{- if ne .Lang $.Lang -}}
|
||||
<li class="menu-item">
|
||||
<a href="{{ .RelPermalink }}" class="menu-link" title="{{ .Language.LanguageName }}">
|
||||
{{- .Language.LanguageName -}}
|
||||
</a>
|
||||
</li>
|
||||
{{- else -}}
|
||||
<li class="menu-item">
|
||||
<span class="menu-link text-secondary" title="{{ .Language.LanguageName }}">{{ .Language.LanguageName }}</span>
|
||||
</li>
|
||||
{{- end -}}
|
||||
<li class="menu-item">
|
||||
{{- if ne .Lang $.Lang -}}
|
||||
<a href="{{ .RelPermalink }}" class="menu-link" title="{{ .Language.LanguageName }}">{{ .Language.LanguageName }}</a>
|
||||
{{- else -}}
|
||||
<span class="text-secondary" title="{{ .Language.LanguageName }}">{{ .Language.LanguageName }}</span>
|
||||
{{- end -}}
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
<li class="menu-item">{{- T "header.noMoretTranslations" -}}</li>
|
||||
@@ -213,21 +211,21 @@
|
||||
{{- end -}}
|
||||
{{- $currentPage := . -}}
|
||||
{{- range .Site.Menus.main -}}
|
||||
{{- $url := .URL | relLangURL -}}
|
||||
{{- $url := .URL -}}
|
||||
{{- with $url -}}
|
||||
{{- $url = . | relLangURL -}}
|
||||
{{- end -}}
|
||||
{{- with .Page -}}
|
||||
{{- $url = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- if (ne .Params.Draft true) | or $buildDrafts | and (ne .Params.Type "desktop") -}}
|
||||
<li
|
||||
class="menu-item{{ if $.IsMenuCurrent `main` . | or ($.HasMenuCurrent `main` .) | or (eq $.RelPermalink $url) }} active{{ end }}{{ with .Params.Class }} {{ . }}{{ end }}"
|
||||
>
|
||||
<li class="menu-item{{ if $.IsMenuCurrent `main` . | or ($.HasMenuCurrent `main` .) | or (eq $.RelPermalink $url) }} active{{ end }}{{ with .Params.Class }} {{ . }}{{ end }}">
|
||||
{{- if .HasChildren -}}
|
||||
<span class="nested-item">
|
||||
<a
|
||||
class="menu-link"
|
||||
href="{{ $url }}"
|
||||
{{ with .Title }}title="{{ . }}"{{ end }}
|
||||
{{ if (urls.Parse $url).Host }}rel="noopener noreferrer" target="_blank"{{ end }}
|
||||
<a class="menu-link"
|
||||
{{- with $url }} href="{{ $url }}"{{ else }} href="javascript:void(0);"{{ end }}
|
||||
{{- with .Title }} title="{{ . }}"{{ end }}
|
||||
{{- if (urls.Parse $url).Host }} rel="noopener noreferrer" target="_blank"{{ end -}}
|
||||
>
|
||||
{{- with .Pre -}}{{- . | safeHTML }} {{ end }}
|
||||
{{- with .Params.Icon -}}{{ dict "Class" (printf "%v fa-fw fa-sm" .) | partial "plugin/icon.html" }} {{ end }}
|
||||
@@ -238,7 +236,10 @@
|
||||
</span>
|
||||
<ul class="sub-menu">
|
||||
{{- range $k, $v := .Children -}}
|
||||
{{- $url := $v.URL | relLangURL -}}
|
||||
{{- $url := $v.URL -}}
|
||||
{{- with $url -}}
|
||||
{{- $url = . | relLangURL -}}
|
||||
{{- end -}}
|
||||
{{- with $v.Page -}}
|
||||
{{- $url = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
@@ -246,14 +247,11 @@
|
||||
{{- if $k | and $v.Params.Divided -}}
|
||||
<li class="menu-item menu-item-divider" aria-hidden="true"></li>
|
||||
{{- end -}}
|
||||
<li
|
||||
class="menu-item{{ if $.IsMenuCurrent `main` $v | or ($.HasMenuCurrent `main` $v) | or (eq $.RelPermalink $url) }} active{{ end }}{{ with $v.Params.Class }} {{ . }}{{ end }}"
|
||||
>
|
||||
<a
|
||||
class="menu-link"
|
||||
href="{{ $url }}"
|
||||
{{ with $v.Title }}title="{{ . }}"{{ end }}
|
||||
{{ if (urls.Parse $url).Host }}rel="noopener noreferrer" target="_blank"{{ end }}
|
||||
<li class="menu-item{{ if $.IsMenuCurrent `main` $v | or ($.HasMenuCurrent `main` $v) | or (eq $.RelPermalink $url) }} active{{ end }}{{ with $v.Params.Class }} {{ . }}{{ end }}">
|
||||
<a class="menu-link"
|
||||
{{- with $url }} href="{{ $url }}"{{ else }} href="javascript:void(0);"{{ end }}
|
||||
{{- with $v.Title }} title="{{ . }}"{{ end }}
|
||||
{{- if (urls.Parse $url).Host }}rel="noopener noreferrer" target="_blank"{{ end -}}
|
||||
>
|
||||
{{- with $v.Pre -}}{{- . | safeHTML }} {{ end }}
|
||||
{{- with $v.Params.Icon -}}{{ dict "Class" (printf "%v fa-fw fa-sm" .) | partial "plugin/icon.html" }} {{ end }}
|
||||
@@ -265,11 +263,10 @@
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{- else -}}
|
||||
<a
|
||||
class="menu-link"
|
||||
href="{{ $url }}"
|
||||
{{ with .Title }}title="{{ . }}"{{ end }}
|
||||
{{ if (urls.Parse $url).Host }}rel="noopener noreferrer" target="_blank"{{ end }}
|
||||
<a class="menu-link"
|
||||
{{- with $url }} href="{{ $url }}"{{ else }} href="javascript:void(0);"{{ end }}
|
||||
{{- with .Title }} title="{{ . }}"{{ end }}
|
||||
{{- if (urls.Parse $url).Host }} rel="noopener noreferrer" target="_blank"{{ end -}}
|
||||
>
|
||||
{{- with .Pre -}}{{- . | safeHTML }} {{ end }}
|
||||
{{- with .Params.Icon -}}{{ dict "Class" (printf "%v fa-fw fa-sm" .) | partial "plugin/icon.html" }} {{ end }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- .Scratch.Set "version" "v0.3.12" -}}
|
||||
{{- .Scratch.Set "version" "v0.3.15" -}}
|
||||
{{- .Scratch.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
|
||||
{{- /* Toc data patch */ -}}
|
||||
{{- $toc := $params.toc -}}
|
||||
{{- if eq $toc true -}}
|
||||
{{- $toc = dict "enable" true | merge .Site.Params.page.toc -}}
|
||||
{{- else if eq $toc false -}}
|
||||
{{- $toc = dict "enable" false | merge .Site.Params.page.toc -}}
|
||||
{{- if not (reflect.IsMap $toc) -}}
|
||||
{{- $toc = dict "enable" $toc | merge .Site.Params.page.toc -}}
|
||||
{{- end -}}
|
||||
{{- .Scratch.Set "toc" $toc -}}
|
||||
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
|
||||
{{- /*
|
||||
* The extended syntax of alert is compatible with Obsidian and FixIt admonition shortcode.
|
||||
* @param {String} .Text the content of the admonition box
|
||||
* @param {String} [.Type] the type of the admonition box
|
||||
* @param {String} [.Title] the title of the admonition box
|
||||
* @param {Boolean} [.Open] whether the admonition box is open, default is true
|
||||
* @param {Boolean} [.Foldable] whether the admonition box is foldable, default is true
|
||||
* For custom admonitions, see https://fixit.lruihao.cn/documentation/content-management/shortcodes/extended/admonition/#customize-admonitions
|
||||
*/ -}}
|
||||
|
||||
{{- $iconMap := dict
|
||||
"note" "fa-solid fa-pencil-alt"
|
||||
"abstract" "fa-solid fa-clipboard-list"
|
||||
"info" "fa-solid fa-circle-info"
|
||||
"todo" "fa-solid fa-list-check"
|
||||
"tip" "fa-regular fa-lightbulb"
|
||||
"success" "fa-solid fa-check"
|
||||
"question" "fa-regular fa-circle-question"
|
||||
"warning" "fa-solid fa-exclamation-triangle"
|
||||
"failure" "fa-solid fa-xmark"
|
||||
"danger" "fa-solid fa-bolt"
|
||||
"bug" "fa-solid fa-bug"
|
||||
"example" "fa-solid fa-list-ul"
|
||||
"quote" "fa-solid fa-quote-right"
|
||||
-}}
|
||||
{{- /* Custom admonitions */ -}}
|
||||
{{- $iconMap = site.Params.admonition | merge $iconMap -}}
|
||||
{{- $aliasMap := dict
|
||||
"summary" "abstract"
|
||||
"tldr" "abstract"
|
||||
"hint" "tip"
|
||||
"important" "tip"
|
||||
"check" "success"
|
||||
"done" "success"
|
||||
"help" "question"
|
||||
"faq" "question"
|
||||
"caution" "warning"
|
||||
"attention" "warning"
|
||||
"fail" "failure"
|
||||
"missing" "failure"
|
||||
"error" "danger"
|
||||
"cite" "quote"
|
||||
-}}
|
||||
{{- $type := .Type | lower -}}
|
||||
{{- $type = index $aliasMap $type | default $type | default "note" -}}
|
||||
{{- $icon := index $iconMap $type | default "fa-solid fa-pencil-alt" -}}
|
||||
{{- $title := .Title | default (T (printf "admonition.%v" $type)) | default (title $type) -}}
|
||||
{{- $foldable := ne .Foldable false -}}
|
||||
|
||||
<div class="details admonition {{ $type }}{{ if .Open | ne false }} open{{ end }}{{ if not $foldable }} disabled{{ end }}">
|
||||
<div class="details-summary admonition-title">
|
||||
{{- dict "Class" (add "icon fa-fw " $icon) | partial "plugin/icon.html" -}}
|
||||
{{- $title | safeHTML -}}
|
||||
{{- if $foldable -}}
|
||||
{{- dict "Class" "details-icon fa-solid fa-angle-right fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- end -}}
|
||||
</div>
|
||||
<div class="details-content">
|
||||
<div class="admonition-content">
|
||||
{{- .Text | safeHTML -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- /* EOF */ -}}
|
||||
@@ -1,17 +1,17 @@
|
||||
{{- /*
|
||||
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" -}}
|
||||
* The basic syntax of alert is compatible with GitHub, Obsidian, and Typora.
|
||||
* @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"
|
||||
{{- $iconMap := dict
|
||||
"note" "images/icons/alerts/info.svg"
|
||||
"tip" "images/icons/alerts/light-bulb.svg"
|
||||
"important" "images/icons/alerts/report.svg"
|
||||
"warning" "images/icons/alerts/alert.svg"
|
||||
"caution" "images/icons/alerts/stop.svg"
|
||||
-}}
|
||||
|
||||
{{- $attrs := "" }}
|
||||
@@ -27,7 +27,7 @@
|
||||
{{- $attrs = trim $attrs " " -}}
|
||||
|
||||
<div {{ $attrs | safeHTMLAttr }}>
|
||||
{{- $icon := index $icons .Type -}}
|
||||
{{- $icon := index $iconMap .Type -}}
|
||||
<p class="alert-title">
|
||||
{{- dict "Src" $icon | partial "plugin/icon.html" }}
|
||||
{{- or (T (printf "alert.%v" .Type)) (title .Type) -}}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{{- $src = printf "%v/%v.svg" $prefix . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ if not $src }}
|
||||
{{- if not $src -}}
|
||||
{{- errorf "Icon src is missing" -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
{{- $onerror := "" -}}
|
||||
{{- $cacheRemoteImages := $params.cacheRemoteImages -}}
|
||||
{{- $suffixList := slice ".jpeg" ".jpg" ".png" ".gif" ".bmp" ".tif" ".tiff" ".webp" -}}
|
||||
{{- $responsive := .Responsive -}}
|
||||
|
||||
{{- if hasPrefix .Src "data:image" -}}
|
||||
{{- $responsive = false -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* handle for default size image */ -}}
|
||||
{{- $src := .Src -}}
|
||||
@@ -17,7 +22,7 @@
|
||||
{{- $src = .RelPermalink -}}
|
||||
{{- end -}}
|
||||
{{- /* only available for image resources that are raster images */ -}}
|
||||
{{- if (eq .ResourceType "image") | and $suffixValid | and $.Responsive -}}
|
||||
{{- if (eq .ResourceType "image") | and $suffixValid | and $responsive -}}
|
||||
{{- $style = printf "--width: %vpx;--aspect-ratio: %v / %v;" .Width .Width .Height | safeHTMLAttr -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -26,7 +31,7 @@
|
||||
{{- $srcMedium := $src -}}
|
||||
{{- $srcLarge := .SrcLarge | default $src -}}
|
||||
|
||||
{{- if .Responsive }}
|
||||
{{- if $responsive }}
|
||||
{{- /* handle for small size image */ -}}
|
||||
{{- $suffixValidSmall := dict "Path" $srcSmall "Suffixes" $suffixList | partial "function/suffix-validation.html" -}}
|
||||
{{- with dict "Path" .SrcSmall "Resources" .Resources "CacheRemoteImages" $cacheRemoteImages.enable | partial "function/resource.html" -}}
|
||||
@@ -89,7 +94,7 @@
|
||||
<a class="lightgallery" href="{{ $srcLarge | safeURL }}" data-thumbnail="{{ $srcSmall | safeURL }}"{{ with $caption }} data-sub-html="<h2>{{ . }}</h2>{{ with $.Title }}<p>{{ . }}</p>{{ end }}"{{ end }}{{ with .Rel }} rel="{{ . }}"{{ end }}>
|
||||
{{- end -}}
|
||||
<img loading="{{ $loading }}" src="{{ $src | safeURL }}" alt="{{ $alt }}"
|
||||
{{- if .Responsive }} srcset="{{ $srcSmall | safeURL }}, {{ $srcMedium | safeURL }} 1.5x, {{ $srcLarge | safeURL }} 2x"{{- end -}}
|
||||
{{- if $responsive }} srcset="{{ $srcSmall | safeURL }}, {{ $srcMedium | safeURL }} 1.5x, {{ $srcLarge | safeURL }} 2x"{{- end -}}
|
||||
{{- if eq $loading "lazy" }} data-title="{{ .Title | default $alt }}"
|
||||
{{- else }} title="{{ .Title | default $alt }}"{{- end -}}
|
||||
{{- with .Width }} width="{{ . }}"{{- end -}}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
{{- end -}}
|
||||
{{- if
|
||||
(.ExternalIcon | default false)
|
||||
| and $external | and (eq (hasPrefix .Content `<img` ) false)
|
||||
| and $external | and (eq (hasPrefix .Content `<img`) false)
|
||||
| and (eq ((strings.HasSuffix .Content `</i>`) | or (strings.HasSuffix .Content `):`)) false)
|
||||
-}}
|
||||
{{- if .Download -}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{- $share := (partial "function/params.html").share | default dict -}}
|
||||
|
||||
{{- if $share.enable -}}
|
||||
{{- $title := title .Title -}}
|
||||
{{- $title := cond (.Param "capitalizeTitles") (title .Title) .Title -}}
|
||||
{{- /* 001: Twitter */ -}}
|
||||
{{- if $share.Twitter -}}
|
||||
<a href="javascript:void(0);" title="{{ T `shareOn` }} X" data-sharer="twitter" data-url="{{ .Permalink }}" data-title="{{ $title }}"{{ with .Site.Params.Social.Twitter }} data-via="{{ . }}"{{ end }}{{ with .Params.tags }} data-hashtags="{{ delimit . `,` }}"{{ end }}>
|
||||
|
||||
@@ -1,11 +1,25 @@
|
||||
{{- /* Recently updated pages */ -}}
|
||||
{{- /* TODO refactor to support archives, section, taxonomy and term. */ -}}
|
||||
{{- if and .Site.Params.section.recentlyUpdated.enable (eq $.Paginator.PageNumber 1) -}}
|
||||
{{- /* Recently updated pages for archives, section and term list */ -}}
|
||||
{{- $kindMap := dict
|
||||
"home" "archives"
|
||||
"section" "section"
|
||||
"term" "list"
|
||||
-}}
|
||||
{{- $recentlyUpdatedConfig := .Site.Params.recentlyUpdated -}}
|
||||
{{- $scope := index $kindMap .Kind -}}
|
||||
{{- $scopeEnable := index $recentlyUpdatedConfig $scope | default false -}}
|
||||
{{- if $scopeEnable | and (eq $.Paginator.PageNumber 1) -}}
|
||||
{{- $hasTitle := false }}
|
||||
{{- $postCount := 0 -}}
|
||||
{{- $maxPostCount := .Site.Params.section.recentlyUpdated.maxCount | default 10 -}}
|
||||
{{- $days := .Site.Params.section.recentlyUpdated.days | default 30 -}}
|
||||
{{- range first $maxPostCount (where .Data.Pages.ByLastmod.Reverse "Section" "!=" "") -}}
|
||||
{{- $maxPostCount := $recentlyUpdatedConfig.maxCount | default 10 -}}
|
||||
{{- $days := $recentlyUpdatedConfig.days | default 30 -}}
|
||||
{{- $dateformat := (index .Site.Params $scope).dateformat | default "01-02" -}}
|
||||
{{- $scopePages := .Pages -}}
|
||||
{{- if eq $scope "archives" -}}
|
||||
{{- $scopePages = .Scratch.Get "mainSectionPages" -}}
|
||||
{{- end -}}
|
||||
{{- $scopePages = where $scopePages.ByLastmod.Reverse "Section" "!=" "" -}}
|
||||
{{- /* {{- $scopePages = where $scopePages "File.IsContentAdapter" "ne" true -}} */ -}}
|
||||
{{- range first $maxPostCount $scopePages -}}
|
||||
{{- if gt (add .Lastmod.Unix (mul 86900 $days)) now.Unix -}}
|
||||
{{- if ne .Lastmod.Unix .Date.Unix }}
|
||||
{{- $postCount = add $postCount 1 -}}
|
||||
@@ -22,10 +36,14 @@
|
||||
{{- if eq $repost.enable true -}}
|
||||
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
|
||||
{{- end -}}
|
||||
{{- title .LinkTitle -}}
|
||||
{{- if eq $scope "archives" -}}
|
||||
{{- cond (.Param "capitalizeTitles") (title .Title) .Title -}}
|
||||
{{- else -}}
|
||||
{{- cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}}
|
||||
{{- end -}}
|
||||
</a>
|
||||
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Lastmod.Format }}'>
|
||||
{{- with .Lastmod | dateFormat (.Site.Params.section.dateformat | default "01-02") -}}
|
||||
{{- with .Lastmod | dateFormat $dateformat -}}
|
||||
{{- dict "Date" . | T "single.updatedOnDate" -}}
|
||||
{{- end -}}
|
||||
</span>
|
||||
|
||||
@@ -18,19 +18,23 @@
|
||||
<div class="details-content collection-content">
|
||||
<nav>
|
||||
<ul class="collection-list">
|
||||
{{- range $key, $value := $pages -}}
|
||||
{{- $title := title $value.LinkTitle -}}
|
||||
{{- if $value.LinkTitle | eq $.LinkTitle -}}
|
||||
{{- $currentKey = $key -}}
|
||||
<li class="collection-item"><span class="active" title="{{ $title }}">{{ $title }}</span></li>
|
||||
{{- else }}
|
||||
<li class="collection-item"><a href="{{ $value.RelPermalink }}" title="{{ $title }}">{{ $title }}</a></li>
|
||||
{{- end }}
|
||||
{{- range $key, $page := $pages -}}
|
||||
{{- $capitalizeTitles := $page.Param "capitalizeTitles" -}}
|
||||
{{- $title := cond $capitalizeTitles (title $page.LinkTitle) $page.LinkTitle -}}
|
||||
<li class="collection-item">
|
||||
{{- if $.Eq $page -}}
|
||||
{{- $currentKey = $key -}}
|
||||
<span class="active" title="{{ $title }}">{{ $title }}</span>
|
||||
{{- else -}}
|
||||
<a href="{{ $page.RelPermalink }}" title="{{ $title }}">{{ $title }}</a>
|
||||
{{- end -}}
|
||||
</li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
<div class="collection-nav-simple">
|
||||
{{- with $pages.Next $ -}}
|
||||
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="prev" title="{{ title .LinkTitle }}">
|
||||
{{- $capitalizeTitles := .Param "capitalizeTitles" -}}
|
||||
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="prev" title="{{ cond $capitalizeTitles (title .LinkTitle) .LinkTitle }}">
|
||||
{{- dict "Class" "fa-solid fa-angle-left fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- else -}}
|
||||
@@ -38,7 +42,8 @@
|
||||
{{- end -}}
|
||||
<span class="text-secondary">{{ add $currentKey 1 }}/{{ $pages.Len }}</span>
|
||||
{{- with $pages.Prev $ -}}
|
||||
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="next" title="{{ title .LinkTitle }}">
|
||||
{{- $capitalizeTitles := .Param "capitalizeTitles" -}}
|
||||
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="next" title="{{ cond $capitalizeTitles (title .LinkTitle) .LinkTitle }}">
|
||||
{{- dict "Class" "fa-solid fa-angle-right fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- else -}}
|
||||
|
||||
@@ -18,14 +18,16 @@
|
||||
{{/* TODO JS 实现 reverse 翻转顺序 */}}
|
||||
{{- $pages := (where .Pages "Params.Weight" "!=" nil) | append (where .Pages "Params.Weight" "eq" nil).ByDate -}}
|
||||
{{- with $pages.Next $ -}}
|
||||
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="prev" title="{{ title .LinkTitle }}">
|
||||
{{- $capitalizeTitles := .Param "capitalizeTitles" -}}
|
||||
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="prev" title="{{ cond $capitalizeTitles (title .LinkTitle) .LinkTitle }}">
|
||||
{{- dict "Class" "fa-solid fa-angle-left fa-fw" | partial "plugin/icon.html" -}}
|
||||
<span>{{- title .LinkTitle -}}</span>
|
||||
<span>{{- cond $capitalizeTitles (title .LinkTitle) .LinkTitle -}}</span>
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{- with $pages.Prev $ -}}
|
||||
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="next" title="{{ title .LinkTitle }}">
|
||||
<span>{{- title .LinkTitle -}}</span>
|
||||
{{- $capitalizeTitles := .Param "capitalizeTitles" -}}
|
||||
<a href="{{ .RelPermalink }}" class="collection-nav-item" rel="next" title="{{ cond $capitalizeTitles (title .LinkTitle) .LinkTitle }}">
|
||||
<span>{{- cond $capitalizeTitles (title .LinkTitle) .LinkTitle -}}</span>
|
||||
{{- dict "Class" "fa-solid fa-angle-right fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
@@ -54,13 +54,14 @@
|
||||
{{- end -}}
|
||||
{{- if $params.LinkToSource | and $gitRepo -}}
|
||||
{{- $link := replace $blobURL "{path}" $.File.Path -}}
|
||||
{{- $sourceURL = add $link "?plain=1" -}}
|
||||
{{- $sourceURL = $params.sourceURL | default (add $link "?plain=1") -}}
|
||||
{{- $options := dict "Class" "link-to-source" "Destination" $sourceURL "Title" (T "single.viewSource") "Content" (T "single.viewSource") "externalIcon" false -}}
|
||||
{{- $linkOptions = $linkOptions | append $options -}}
|
||||
{{- end -}}
|
||||
{{- if $params.LinkToEdit | and $gitRepo -}}
|
||||
{{- $link := replace $editURL "{path}" $.File.Path -}}
|
||||
{{- $options := dict "Class" "link-to-edit" "Destination" $link "Title" (T "single.editThisPage") "Content" (T "single.editThisPage") "externalIcon" false -}}
|
||||
{{- $editURL = $params.editURL | default $link -}}
|
||||
{{- $options := dict "Class" "link-to-edit" "Destination" $editURL "Title" (T "single.editThisPage") "Content" (T "single.editThisPage") "externalIcon" false -}}
|
||||
{{- $linkOptions = $linkOptions | append $options -}}
|
||||
{{- end -}}
|
||||
{{- if $params.LinkToReport | and $gitRepo -}}
|
||||
@@ -114,14 +115,16 @@
|
||||
{{- $next = $pages.Prev . -}}
|
||||
{{- end -}}
|
||||
{{- with $prev -}}
|
||||
<a href="{{ .RelPermalink }}" class="post-nav-item" rel="prev" title="{{ title .LinkTitle }}">
|
||||
{{- $capitalizeTitles := .Param "capitalizeTitles" -}}
|
||||
<a href="{{ .RelPermalink }}" class="post-nav-item" rel="prev" title="{{ cond $capitalizeTitles (title .LinkTitle) .LinkTitle }}">
|
||||
{{- dict "Class" "fa-solid fa-angle-left fa-fw" | partial "plugin/icon.html" -}}
|
||||
{{- title .LinkTitle -}}
|
||||
{{- cond $capitalizeTitles (title .LinkTitle) .LinkTitle -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
{{ with $next }}
|
||||
<a href="{{ .RelPermalink }}" class="post-nav-item" rel="next" title="{{ title .LinkTitle }}">
|
||||
{{- title .LinkTitle -}}
|
||||
{{- $capitalizeTitles := .Param "capitalizeTitles" -}}
|
||||
<a href="{{ .RelPermalink }}" class="post-nav-item" rel="next" title="{{ cond $capitalizeTitles (title .LinkTitle) .LinkTitle }}">
|
||||
{{- cond $capitalizeTitles (title .LinkTitle) .LinkTitle -}}
|
||||
{{- dict "Class" "fa-solid fa-angle-right fa-fw" | partial "plugin/icon.html" -}}
|
||||
</a>
|
||||
{{- end -}}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<h2 id="see-also">{{ T "single.relatedContent" }}</h2>
|
||||
<ul>
|
||||
{{- range $i, $p := . -}}
|
||||
{{- $title := title .LinkTitle -}}
|
||||
{{- $title := cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}" title="{{ $title }}">{{ $title }}</a>
|
||||
{{- with .HeadingsFiltered -}}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
{{- define "title" -}}
|
||||
{{- title .Title -}}
|
||||
{{- cond (.Param "capitalizeTitles") (title .Title) .Title -}}
|
||||
{{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "content" -}}
|
||||
{{- $title := title .Title -}}
|
||||
{{- $title := cond (.Param "capitalizeTitles") (title .Title) .Title -}}
|
||||
{{- $params := partial "function/params.html" -}}
|
||||
{{- $toc := .Scratch.Get "toc" -}}
|
||||
{{- $showToc := $toc.enable | and (gt (len .Fragments.Headings) 0) -}}
|
||||
{{- $tableOfContents := .Fragments.ToHTML ($toc.startlevel | int) ($toc.endlevel | int) ($toc.ordered | default false) -}}
|
||||
{{- $showToc := $toc.enable | and (ne $tableOfContents `<nav id="TableOfContents"></nav>`) -}}
|
||||
|
||||
<aside class="aside-collection animate__animated animate__fadeIn animate__faster" aria-label="{{ T "collections" }}">
|
||||
{{- /* Collection List */ -}}
|
||||
@@ -20,7 +21,7 @@
|
||||
{{- block "custom-aside" . }}{{ end -}}
|
||||
</aside>
|
||||
|
||||
<article class="page single">
|
||||
<article class="page single"{{ with .Params.fromAdapters }} data-adapters="{{ . }}"{{ end }}>
|
||||
<div class="header">
|
||||
{{- /* Title */ -}}
|
||||
<h1 class="single-title animate__animated animate__flipInX">
|
||||
@@ -40,7 +41,7 @@
|
||||
</h1>
|
||||
|
||||
{{- /* Subtitle */ -}}
|
||||
{{- with $params.subtitle -}}<p class="single-subtitle animate__animated animate__fadeIn">{{ . }}</p>{{- end -}}
|
||||
{{- with $params.subtitle -}}<p class="single-subtitle animate__animated animate__fadeIn">{{ . | $.RenderString }}</p>{{- end -}}
|
||||
</div>
|
||||
|
||||
{{- /* Meta */ -}}
|
||||
@@ -147,8 +148,7 @@
|
||||
|
||||
{{- /* Static TOC */ -}}
|
||||
{{- if $showToc -}}
|
||||
{{- $tableOfContents := .Fragments.ToHTML ($toc.startLevel | int) ($toc.endLevel | int) ($toc.ordered | default false) -}}
|
||||
<div class="details toc{{ with $params.password }} encrypted-hidden{{ end }}" id="toc-static" data-kept="{{ if $toc.keepStatic }}true{{ else }}false{{ end }}">
|
||||
<div class="details toc{{ with $params.password }} encrypted-hidden{{ end }}" id="toc-static" data-kept="{{ if $toc.keepstatic }}true{{ else }}false{{ end }}">
|
||||
<div class="details-summary toc-title">
|
||||
<span>{{ T "single.contents" }}</span>
|
||||
<span>{{ dict "Class" "details-icon fa-solid fa-angle-right" | partial "plugin/icon.html" }}</span>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
{{- if eq $repost.enable true -}}
|
||||
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
|
||||
{{- end -}}
|
||||
{{- title .LinkTitle -}}
|
||||
{{- cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}}
|
||||
</a>
|
||||
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Date.Format }}'>
|
||||
{{- .Date | dateFormat ($.Site.Params.section.dateFormat | default "01-02") -}}
|
||||
|
||||
@@ -1,41 +1,12 @@
|
||||
{{- $type := cond .IsNamedParams (.Get "type") (.Get 0) -}}
|
||||
{{- $title := cond .IsNamedParams (.Get "title") (.Get 1) | .Page.RenderString -}}
|
||||
{{- $open := cond .IsNamedParams (.Get "open") (.Get 2) -}}
|
||||
{{- $inner := .Inner | .Page.RenderString -}}
|
||||
|
||||
{{- $iconMap := dict "note" "fa-solid fa-pencil-alt fa-fw" -}}
|
||||
{{- $iconMap = dict "abstract" "fa-solid fa-list-ul fa-fw" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "info" "fa-solid fa-info-circle fa-fw" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "tip" "fa-solid fa-lightbulb fa-fw" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "success" "fa-solid fa-check-circle fa-fw" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "question" "fa-solid fa-question-circle fa-fw" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "warning" "fa-solid fa-exclamation-triangle fa-fw" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "failure" "fa-solid fa-times-circle fa-fw" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "danger" "fa-solid fa-skull-crossbones fa-fw" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "bug" "fa-solid fa-bug fa-fw" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "example" "fa-solid fa-list-ol fa-fw" | merge $iconMap -}}
|
||||
{{- $iconMap = dict "quote" "fa-solid fa-quote-right fa-fw" | merge $iconMap -}}
|
||||
{{- $iconDetails := "fa-solid fa-angle-right fa-fw" -}}
|
||||
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- $type := .Get "type" | default "note" -}}
|
||||
<div class="details admonition {{ $type }}{{ if .Get `open` | ne false }} open{{ end }}">
|
||||
<div class="details-summary admonition-title">
|
||||
<i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}" aria-hidden="true"></i>{{ .Get "title" | .Page.RenderString | default (T (printf "admonition.%v" $type)) }}<i class="details-icon {{ $iconDetails }}" aria-hidden="true"></i>
|
||||
</div>
|
||||
<div class="details-content">
|
||||
<div class="admonition-content">
|
||||
{{- $inner -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- else -}}
|
||||
{{- $type := .Get 0 | default "note" -}}
|
||||
<div class="details admonition {{ $type }}{{ if .Get 2 | ne false }} open{{ end }}">
|
||||
<div class="details-summary admonition-title">
|
||||
<i class="icon {{ index $iconMap $type | default (index $iconMap "note") }}" aria-hidden="true"></i>{{ .Get 1 | .Page.RenderString | default (T (printf "admonition.%v" $type)) }}<i class="details-icon {{ $iconDetails }}" aria-hidden="true"></i>
|
||||
</div>
|
||||
<div class="details-content">
|
||||
<div class="admonition-content">
|
||||
{{- $inner -}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{- dict
|
||||
"Type" $type
|
||||
"Title" $title
|
||||
"Open" $open
|
||||
"Text" $inner
|
||||
| partial "plugin/admonition.html"
|
||||
-}}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
{{- $rvc := .Page.Param "repoVersion" -}}
|
||||
{{- $version := .Get 0 -}}
|
||||
{{- $url := printf "https://github.com/hugo-fixit/FixIt/releases/tag/v%v" $version -}}
|
||||
{{- $type := .Get 1 | default "new" | lower -}}
|
||||
{{- $url := printf "%v%v" (.Get 2 | default $rvc.url) $version -}}
|
||||
{{- $label := T (printf "version.%v" $type) -}}
|
||||
{{- $color := cond (eq $type "changed") "ff9101" "00b1ff" | cond (eq $type "deleted") "ff5252" -}}
|
||||
{{- $pathTemplate := cond hugo.IsMultilingual (printf "images/version/%%v-%%v.%v.svg" .Page.Language.Lang) "images/version/%v-%v.svg" -}}
|
||||
{{- $path := printf $pathTemplate $version $type -}}
|
||||
{{- $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" target="_blank">
|
||||
{{- $alt := printf "%v %v | %v" (.Get 3 | default $rvc.name) $version $label -}}
|
||||
<a href="{{ $url }}" rel="external" target="_blank">
|
||||
{{- dict "Src" $resource.RelPermalink "Alt" $alt "Class" "version" | partial "plugin/image.html" -}}
|
||||
</a>
|
||||
{{- /* EOF */ -}}
|
||||
|
||||
+11
-46
@@ -1,47 +1,12 @@
|
||||
<urlset
|
||||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml"
|
||||
>
|
||||
{{- range (where .Data.Pages "Section" "!=" "gallery") -}}
|
||||
<url>
|
||||
<loc>
|
||||
{{- .Permalink -}}
|
||||
</loc>
|
||||
{{- if not .Lastmod.IsZero -}}
|
||||
<lastmod>
|
||||
{{- .Lastmod.Format "2006-01-02T15:04:05-07:00" -}}
|
||||
</lastmod>
|
||||
{{- end -}}
|
||||
{{- with .Sitemap.ChangeFreq -}}
|
||||
<changefreq>
|
||||
{{- . -}}
|
||||
</changefreq>
|
||||
{{- end -}}
|
||||
|
||||
{{- if ge .Sitemap.Priority 0.0 -}}
|
||||
{{- $weeks := div (sub now.Unix .Lastmod.Unix) 604800 -}}
|
||||
{{- $priority := sub 1 (div $weeks 10.0 ) -}}
|
||||
{{- if ge .Sitemap.Priority $priority -}}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>
|
||||
{{- else -}}
|
||||
<priority>{{ $priority }}</priority>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if .IsTranslated -}}
|
||||
{{- range .Translations -}}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>
|
||||
{{- end -}}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ .Lang }}"
|
||||
href="{{ .Permalink }}"
|
||||
/>
|
||||
{{- end -}}
|
||||
</url>
|
||||
{{- end -}}
|
||||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{- range where .Pages "Sitemap.Disable" "ne" true -}}{{ if .Permalink }}
|
||||
<url>
|
||||
<loc>{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
|
||||
<lastmod>{{ safeHTML (.Lastmod.Format "2006-01-02T15:04:05-07:00") }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
|
||||
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
|
||||
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}{{ if .IsTranslated }}{{ range .Translations }}
|
||||
<xhtml:link rel="alternate" hreflang="{{ .Language.LanguageCode }}" href="{{ .Permalink }}"/>{{ end }}
|
||||
<xhtml:link rel="alternate" hreflang="{{ .Language.LanguageCode }}" href="{{ .Permalink }}"/>{{ end }}
|
||||
</url>{{ end }}{{ end }}
|
||||
</urlset>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
{{- else -}}
|
||||
{{- $pages = .Paginate $pages -}}
|
||||
{{- end -}}
|
||||
{{- partial "recently-updated.html" . -}}
|
||||
{{- range $pages.PageGroups -}}
|
||||
<h2 class="group-title">
|
||||
{{- dict "Class" "fa-regular fa-calendar fa-fw me-1" | partial "plugin/icon.html" -}}
|
||||
@@ -46,7 +47,7 @@
|
||||
{{- if eq $repost.enable true -}}
|
||||
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
|
||||
{{- end -}}
|
||||
{{- title .LinkTitle -}}
|
||||
{{- cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}}
|
||||
</a>
|
||||
<span class="archive-item-date" title='{{ "2006-01-02 15:04:05" | .Date.Format }}'>
|
||||
{{- .Date | dateFormat ($.Site.Params.list.dateFormat | default "01-02") -}}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
{{- if eq $repost.enable true -}}
|
||||
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
|
||||
{{- end -}}
|
||||
{{- title .LinkTitle -}}
|
||||
{{- cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}}
|
||||
</a>
|
||||
</article>
|
||||
{{- end -}}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
{{- if eq $repost.enable true -}}
|
||||
{{- dict "Class" "fa-solid fa-share fa-fw text-success me-1" | partial "plugin/icon.html" -}}
|
||||
{{- end -}}
|
||||
{{- title .LinkTitle -}}
|
||||
{{- cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}}
|
||||
</a>
|
||||
</article>
|
||||
{{- end -}}
|
||||
|
||||
Generated
+9
-9
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"name": "fixit-src",
|
||||
"version": "0.3.12",
|
||||
"version": "0.3.15",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "fixit-src",
|
||||
"version": "0.3.12",
|
||||
"version": "0.3.15",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@hugo-fixit/fixit-releaser": "^1.0.1",
|
||||
"husky": "^9.1.5"
|
||||
"husky": "^9.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/@hugo-fixit/fixit-releaser": {
|
||||
@@ -75,9 +75,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/husky": {
|
||||
"version": "9.1.5",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.5.tgz",
|
||||
"integrity": "sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==",
|
||||
"version": "9.1.6",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz",
|
||||
"integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"husky": "bin.js"
|
||||
@@ -242,9 +242,9 @@
|
||||
}
|
||||
},
|
||||
"husky": {
|
||||
"version": "9.1.5",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.5.tgz",
|
||||
"integrity": "sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==",
|
||||
"version": "9.1.6",
|
||||
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz",
|
||||
"integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==",
|
||||
"dev": true
|
||||
},
|
||||
"minimist": {
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fixit-src",
|
||||
"version": "0.3.12",
|
||||
"version": "0.3.15",
|
||||
"private": true,
|
||||
"description": "FixIt theme source files",
|
||||
"keywords": [
|
||||
@@ -31,6 +31,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hugo-fixit/fixit-releaser": "^1.0.1",
|
||||
"husky": "^9.1.5"
|
||||
"husky": "^9.1.6"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ licenselink = "https://github.com/hugo-fixit/FixIt/blob/master/LICENSE"
|
||||
description = "A Clean, Elegant but Advanced Hugo Theme for Hugo."
|
||||
homepage = "https://github.com/hugo-fixit/FixIt"
|
||||
demosite = "https://fixit.lruihao.cn"
|
||||
min_version = "0.132.0"
|
||||
min_version = "0.134.1"
|
||||
|
||||
tags = [
|
||||
"blog",
|
||||
|
||||
Reference in New Issue
Block a user