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
attributes:
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
id: what-happened
attributes:

View File

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

View File

@ -1,5 +1,5 @@
### 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
main: []
social:

View File

@ -2,6 +2,11 @@ toggleMenu: メニューを開く・閉じる
darkMode: ダークモード
list:
page: "{{ .Count }} ページ目"
section: セクション
subsection: サブセクション
article:
back: 前のページ
tableOfContents: 目次
@ -24,5 +29,5 @@ search:
resultTitle: "#PAGES_COUNT 件 #TIME_SECONDS 秒)"
footer:
builtWith: Built with {{ .Generator }}
builtWith: "{{ .Generator }} で構築されています。"
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>
{{ with $link.image }}
{{ $permalink := . }}
{{ with ($.Resources.GetMatch (printf "%s" (. | safeURL))) }}
{{ $permalink = .RelPermalink }}
{{ end }}
<div class="article-image">
<img src="{{ . }}" loading="lazy">
<img src="{{ $permalink }}" loading="lazy">
</div>
{{ end }}
</a>

View File

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

View File

@ -27,7 +27,7 @@
</header>
{{- with .Site.Menus.social -}}
<ol class="social-menu">
<ol class="menu-social">
{{ range . }}
<li>
<a
@ -54,7 +54,7 @@
<a href='{{ .URL }}' {{ if eq .Params.newTab true }}target="_blank"{{ end }}>
{{ $icon := default .Pre .Params.Icon }}
{{ 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 }}
{{ with $icon }}
{{ partial "helper/icon" . }}