Merge branch 'master' into canary

This commit is contained in:
Jimmy Cai 2024-03-27 17:03:10 +01:00
commit 5466ffb525
8 changed files with 21 additions and 8 deletions

View File

@ -4,7 +4,7 @@ body:
- type: markdown - type: markdown
attributes: attributes:
value: | value: |
Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/). Thanks for taking the time to fill out this bug report! Please provide as much information as possible and make sure you have checked the [documentation](https://stack.jimmycai.com/guide/).
- type: textarea - type: textarea
id: what-happened id: what-happened
attributes: attributes:

View File

@ -212,7 +212,7 @@
} }
} }
.social-menu { .menu-social {
list-style: none; list-style: none;
padding: 0; padding: 0;
margin: 0; margin: 0;

View File

@ -1,5 +1,5 @@
### Custom menu ### Custom menu
### See https://docs.stack.jimmycai.com/configuration/custom-menu.html ### See https://stack.jimmycai.com/config/menu
### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter ### To remove about, archive and search page menu item, remove `menu` field from their FrontMatter
main: [] main: []
social: social:

View File

@ -2,6 +2,11 @@ toggleMenu: メニューを開く・閉じる
darkMode: ダークモード darkMode: ダークモード
list:
page: "{{ .Count }} ページ目"
section: セクション
subsection: サブセクション
article: article:
back: 前のページ back: 前のページ
tableOfContents: 目次 tableOfContents: 目次
@ -24,5 +29,5 @@ search:
resultTitle: "#PAGES_COUNT 件 #TIME_SECONDS 秒)" resultTitle: "#PAGES_COUNT 件 #TIME_SECONDS 秒)"
footer: footer:
builtWith: Built with {{ .Generator }} builtWith: "{{ .Generator }} で構築されています。"
designedBy: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。 designedBy: テーマ {{ .Theme }} は {{ .DesignedBy }} によって設計されています。

View File

@ -0,0 +1,4 @@
<h{{ .Level }} id="{{ .Anchor }}">
<a href="#{{ .Anchor }}">#</a>
{{ .Text | safeHTML }}
</h{{ .Level }}>

View File

@ -16,8 +16,12 @@
</div> </div>
{{ with $link.image }} {{ with $link.image }}
{{ $permalink := . }}
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
{{ $permalink = .RelPermalink }}
{{ end }}
<div class="article-image"> <div class="article-image">
<img src="{{ . }}" loading="lazy"> <img src="{{ $permalink }}" loading="lazy">
</div> </div>
{{ end }} {{ end }}
</a> </a>

View File

@ -1,7 +1,7 @@
{{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}} {{- partial "helper/external" (dict "Context" . "Namespace" "KaTeX") -}}
<script> <script>
window.addEventListener("DOMContentLoaded", () => { window.addEventListener("DOMContentLoaded", () => {
renderMathInElement(document.querySelector(`.article-content`), { renderMathInElement(document.body, {
delimiters: [ delimiters: [
{ left: "$$", right: "$$", display: true }, { left: "$$", right: "$$", display: true },
{ left: "$", right: "$", display: false }, { left: "$", right: "$", display: false },

View File

@ -27,7 +27,7 @@
</header> </header>
{{- with .Site.Menus.social -}} {{- with .Site.Menus.social -}}
<ol class="social-menu"> <ol class="menu-social">
{{ range . }} {{ range . }}
<li> <li>
<a <a
@ -54,7 +54,7 @@
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}> <a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
{{ $icon := default .Pre .Params.Icon }} {{ $icon := default .Pre .Params.Icon }}
{{ if .Pre }} {{ if .Pre }}
{{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://docs.stack.jimmycai.com/configuration/custom-menu.html" .URL }} {{ warnf "Menu item [%s] is using [pre] field to set icon, please use [params.icon] instead.\nMore information: https://stack.jimmycai.com/config/menu" .URL }}
{{ end }} {{ end }}
{{ with $icon }} {{ with $icon }}
{{ partial "helper/icon" . }} {{ partial "helper/icon" . }}