Skip to content

Commit f6990a6

Browse files
authored
Merge pull request #43 from anthraxx/feat/hugo-book-upgrade
hugo book upgrade and improvements
2 parents 5f421cc + ff3026f commit f6990a6

File tree

8 files changed

+20
-144
lines changed

8 files changed

+20
-144
lines changed

website/assets/_custom.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.book-menu nav>ul:first-of-type>li:last-child::after {
2+
content: "";
3+
display: inline-block;
4+
margin: 0.5em 0;
5+
}
6+
7+
.book-menu nav>ul:last-of-type>li:last-child::before {
8+
content: "";
9+
display: inline-block;
10+
margin: 0.5em 0;
11+
}

website/config.toml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,9 @@ theme = "hugo-book"
55

66
[[menu.before]]
77
name = "⬅️ Back to top"
8-
url = "https://uapi-group.org/"
8+
url = "/.."
99
weight = 1
10-
[[menu.before]]
11-
name = ""
12-
weight = 2
1310

14-
[[menu.after]]
15-
name = ""
16-
weight = 10
1711
[[menu.after]]
1812
name = "Collaborate on Github"
1913
url = "https://github.com/uapi-group/docs"
@@ -27,8 +21,9 @@ theme = "hugo-book"
2721
BookSection = '*'
2822
BookRepo = 'https://github.com/uapi-group/docs'
2923
BookCommitPath = 'commit'
30-
BookEditPath = 'edit/main'
24+
BookEditLink = '{{ .Site.Params.BookRepo }}/edit/main/{{ .Path }}'
3125
BookIndexPage = 'README.md'
26+
BookTheme = 'auto'
3227

3328
[modules]
3429
[[module.mounts]]

website/layouts/404.html

Lines changed: 0 additions & 35 deletions
This file was deleted.

website/layouts/partials/docs/footer.html

Lines changed: 0 additions & 25 deletions
This file was deleted.

website/layouts/partials/docs/html-head.html

Lines changed: 0 additions & 43 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{- return (partial "docs/text/template" (dict "Template" .Site.Params.BookEditLink "Context" (dict
2+
"Site" .Site
3+
"Page" .Page
4+
"Path" (strings.TrimPrefix hugo.WorkingDir ( replace .Page.File.Path "_index.md" .Site.Params.BookIndexPage))
5+
)) | urls.JoinPath) -}}

website/layouts/partials/docs/menu-hugo.html

Lines changed: 0 additions & 32 deletions
This file was deleted.

website/themes/hugo-book

Submodule hugo-book updated 307 files

0 commit comments

Comments
 (0)