1
0
mirror of https://github.com/alex-shpak/hugo-book.git synced 2025-03-13 14:24:03 +00:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Junyu Liu
4a4f98e584
Merge 01d9ea7f7a into 118997fa92 2023-12-05 09:21:21 +08:00
Alex Shpak
118997fa92 : Disable numbered plugin for non-article pages 2023-12-05 00:33:41 +01:00
iyear
01d9ea7f7a fix(search): searchDataURL must not use relative URL 2023-12-02 15:14:55 +08:00
6 changed files with 7 additions and 7 deletions

View File

@ -1,7 +1,7 @@
$startLevel: 1;
$endLevel: 6;
.book-page .markdown {
.book-page .markdown.book-article {
@for $currentLevel from $startLevel through $endLevel {
> h#{$currentLevel} {
counter-increment: h#{$currentLevel};
@ -19,7 +19,7 @@ $endLevel: 6;
}
}
.book-toc nav ul {
.book-toc nav#TableOfContents ul {
li {
counter-increment: item;

View File

@ -8,7 +8,7 @@
{{ range $index, $page := $pages }}
{{ if gt $index 0}},{{end}} {
"id": {{ $index }},
"href": "{{ $page.RelPermalink }}",
"href": "{{ $page.Permalink }}",
"title": {{ (partial "docs/title" $page) | jsonify }},
"section": {{ (partial "docs/title" $page.Parent) | jsonify }},
"content": {{ $page.Plain | jsonify }}

View File

@ -5,7 +5,7 @@
{{ $searchConfig := i18n "bookSearchConfig" | default "{}" }}
(function () {
const searchDataURL = '{{ $searchData.RelPermalink }}';
const searchDataURL = '{{ $searchData.Permalink }}';
const indexConfig = Object.assign({{ $searchConfig }}, {
doc: {
id: 'id',

View File

@ -73,7 +73,7 @@
{{ end }}
{{ define "main" }}
<article class="markdown">
<article class="markdown book-article">
{{- .Content -}}
</article>
{{ end }}

View File

@ -1,5 +1,5 @@
{{ define "main" }}
<article class="markdown">
<article class="markdown book-post">
<h1>
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
</h1>

View File

@ -1,5 +1,5 @@
{{ define "main" }}
<article class="markdown">
<article class="markdown book-post">
<h1>{{ .Title | title }}</h1>
{{ $taxonomies := index .Site.Taxonomies .Page.Type }}
{{ range $taxonomies }}