Compare commits

...

4 Commits

Author SHA1 Message Date
Alex Shpak
9013a1f457 #352: move english content to content.en 2022-11-02 23:28:30 +01:00
Alex Shpak
6e1b44c4c4 #452: Put double comments on shortcodes 2022-11-02 23:09:40 +01:00
Mikey Lombardi (He/Him)
6090fddebd
(MAINT) Respect LinkTitle in page metadata (#483)
Prior to this commit, the partial for determining a page title used the
`Title` property of a page, if present, or humanized and titleized the
file name if not.

It did not use the `LinkTitle` property at all (defined in the
[front matter][01]). According to the [menu documentation][02]:

> The following order is used to determine an Identifier:
>
> `.Name > .LinkTitle > .Title`
>
> This means that `.Title` will be used unless `.LinkTitle is present,
> etc.

Similar, the documentation for [menu entry variables][03] states:

> The `name` key, if set for the menu entry, sets this value. If that
> key is not set, and if the menu entry is set in a page front-matter,
> this value defaults to the page's `.LinkTitle`.

Together, these imply that if `.LinkTitle` is specified, it should be
preferred over `.Title` for the generated nav menu.

[01]: https://gohugo.io/content-management/front-matter/
[02]: https://gohugo.io/content-management/menus/#nesting
[03]: https://gohugo.io/variables/menus/#menu-entry-variables
2022-10-05 10:01:03 +02:00
Dongliang Yin
317ccae23b
Remove left pagination spacing (#467) 2022-08-02 12:57:40 +02:00
33 changed files with 12 additions and 9 deletions

View File

@ -69,6 +69,7 @@ ul.pagination {
display: flex;
justify-content: center;
list-style-type: none;
padding-inline-start: 0px;
.page-item a {
padding: $padding-16;

View File

@ -23,7 +23,7 @@ enableGitInfo = true
[languages]
[languages.en]
languageName = 'English'
contentDir = 'content'
contentDir = 'content.en'
weight = 1
[languages.ru]

View File

@ -23,7 +23,7 @@ markup:
languages:
en:
languageName: English
contentDir: content
contentDir: content.en
weight: 1
ru:
languageName: Russian

View File

@ -6,9 +6,9 @@ KaTeX shortcode let you render math typesetting in markdown document. See [KaTeX
{{< columns >}}
```latex
{{</* katex [display] [class="text-center"] */>}}
{{</*/* katex [display] [class="text-center"] */*/>}}
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
{{</* /katex */>}}
{{</*/* /katex */*/>}}
```
<--->

View File

@ -13,7 +13,7 @@ create a `mermaid.json` file in your `assets` folder!
{{< columns >}}
```tpl
{{</* mermaid [class="text-center"]*/>}}
{{</*/* mermaid [class="text-center"]*/*/>}}
stateDiagram-v2
State1: The state with a note
note right of State1
@ -22,7 +22,7 @@ stateDiagram-v2
end note
State1 --> State2
note left of State2 : This is the note to the left.
{{</* /mermaid */>}}
{{</*/* /mermaid */*/>}}
```
<--->

View File

@ -1 +1 @@
{"Target":"book.min.82c5dbd23447cee0b4c2aa3ed08ce0961faa40e1fa370eee4f8c9f02e0d46b5f.css","MediaType":"text/css","Data":{"Integrity":"sha256-gsXb0jRHzuC0wqo+0Izglh+qQOH6Nw7uT4yfAuDUa18="}}
{"Target":"book.min.c58292d36b18b675680ab9baea2029204537b839ea72f258746ec0f32ce8d6c8.css","MediaType":"text/css","Data":{"Integrity":"sha256-xYKS02sYtnVoCrm66iApIEU3uDnqcvJYdG7A8yzo1sg="}}

View File

@ -4,7 +4,9 @@
-->
{{ $title := "" }}
{{ if .Title }}
{{ if .LinkTitle }}
{{ $title = .LinkTitle }}
{{ else if .Title }}
{{ $title = .Title }}
{{ else if and .IsSection .File }}
{{ $title = path.Base .File.Dir | humanize | title }}