forked from gitbot/hugo-book
Compare commits
32 Commits
soper-book
...
master
Author | SHA1 | Date |
---|---|---|
Alex Shpak | 8bb6d7ebec | |
Nikolay Raspopov | 6c3d1e942a | |
Jack Morgan | 9d4916fcc2 | |
xhdix | f2fb37b1ad | |
Alex Shpak | d6087bd32d | |
Alex Shpak | 15ef744c94 | |
Michael T Lombardi (He/Him) | 6aef8ef1c7 | |
Alex Shpak | a656d711bf | |
Alex Shpak | 0cde2e461d | |
Alex Shpak | 4c1de2b3de | |
Alex Shpak | 26de844a19 | |
Alex Shpak | 50147be131 | |
Alex Shpak | deb00bcad2 | |
逊狼 | 92d97049cf | |
Marco Guerrini | c4d69635af | |
xhdix | e939f40314 | |
xhdix | 0d2ed5586e | |
xhdix | 379e311d7e | |
Nikolay Raspopov | 4540d66e3b | |
Alex Shpak | fde10f1319 | |
Alex Shpak | f6e8d1b693 | |
Nikolay Raspopov | 345cb5d947 | |
Alex Shpak | 553d378db3 | |
Alex Shpak | 195138cad0 | |
Alex Shpak | 9b2e21f870 | |
Alex Shpak | d7c644f0e7 | |
Alex Shpak | 843144dd85 | |
Nikolay Raspopov | 4d936a55d8 | |
Alex Shpak | 6720168dd5 | |
Alex Shpak | 6a1932611c | |
Alex Shpak | e611f564bb | |
Alex Shpak | f4a26ff3da |
55
README.md
55
README.md
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
### Install as git submodule
|
||||||
Navigate to your hugo project root and run:
|
Navigate to your hugo project root and run:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -50,6 +51,30 @@ Then run hugo (or set `theme = "book"`/`theme: book` in configuration file)
|
||||||
hugo server --minify --theme book
|
hugo server --minify --theme book
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Install as hugo module
|
||||||
|
|
||||||
|
You can also add this theme as a Hugo module instead of a git submodule.
|
||||||
|
|
||||||
|
Start with initializing hugo modules, if not done yet:
|
||||||
|
```
|
||||||
|
hugo mod init github.com/repo/path
|
||||||
|
```
|
||||||
|
|
||||||
|
Navigate to your hugo project root and add [module] section to your `config.toml`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[module]
|
||||||
|
[[module.imports]]
|
||||||
|
path = 'github.com/alex-shpak/hugo-book'
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, to load/update the theme module and run hugo:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
hugo mod get -u
|
||||||
|
hugo server --minify
|
||||||
|
```
|
||||||
|
|
||||||
### Creating site from scratch
|
### Creating site from scratch
|
||||||
|
|
||||||
Below is an example on how to create a new site from scratch:
|
Below is an example on how to create a new site from scratch:
|
||||||
|
@ -72,7 +97,7 @@ hugo server --minify --theme book
|
||||||
By default, the theme will render pages from the `content/docs` section as a menu in a tree structure.
|
By default, the theme will render pages from the `content/docs` section as a menu in a tree structure.
|
||||||
You can set `title` and `weight` in the front matter of pages to adjust the order and titles in the menu.
|
You can set `title` and `weight` in the front matter of pages to adjust the order and titles in the menu.
|
||||||
|
|
||||||
### Leaf bundle menu
|
### Leaf bundle menu (Deprecated)
|
||||||
|
|
||||||
You can also use leaf bundle and the content of its `index.md` file as menu.
|
You can also use leaf bundle and the content of its `index.md` file as menu.
|
||||||
Given you have the following file structure:
|
Given you have the following file structure:
|
||||||
|
@ -163,7 +188,7 @@ disableKinds = ['taxonomy', 'taxonomyTerm']
|
||||||
# Set source repository location.
|
# Set source repository location.
|
||||||
# Used for 'Last Modified' and 'Edit this page' links.
|
# Used for 'Last Modified' and 'Edit this page' links.
|
||||||
BookRepo = 'https://github.com/alex-shpak/hugo-book'
|
BookRepo = 'https://github.com/alex-shpak/hugo-book'
|
||||||
|
|
||||||
# Specifies commit portion of the link to the page's last modified commit hash for 'doc' page
|
# Specifies commit portion of the link to the page's last modified commit hash for 'doc' page
|
||||||
# type.
|
# type.
|
||||||
# Required if 'BookRepo' param is set.
|
# Required if 'BookRepo' param is set.
|
||||||
|
@ -239,9 +264,11 @@ bookSearchExclude = true
|
||||||
|
|
||||||
### Partials
|
### Partials
|
||||||
|
|
||||||
There are few empty partials you can override in `layouts/partials/`
|
There are layout partials available for you to easily override components of the theme in `layouts/partials/`.
|
||||||
|
|
||||||
| Partial | Placement |
|
In addition to this, there are several empty partials you can override to easily add/inject code.
|
||||||
|
|
||||||
|
| Empty Partial | Placement |
|
||||||
| -------------------------------------------------- | ------------------------------------------- |
|
| -------------------------------------------------- | ------------------------------------------- |
|
||||||
| `layouts/partials/docs/inject/head.html` | Before closing `<head>` tag |
|
| `layouts/partials/docs/inject/head.html` | Before closing `<head>` tag |
|
||||||
| `layouts/partials/docs/inject/body.html` | Before closing `<body>` tag |
|
| `layouts/partials/docs/inject/body.html` | Before closing `<body>` tag |
|
||||||
|
@ -281,15 +308,21 @@ There are a few hugo templates inserted in `<head>`
|
||||||
- [Google Analytics](https://gohugo.io/templates/internal/#google-analytics)
|
- [Google Analytics](https://gohugo.io/templates/internal/#google-analytics)
|
||||||
- [Open Graph](https://gohugo.io/templates/internal/#open-graph)
|
- [Open Graph](https://gohugo.io/templates/internal/#open-graph)
|
||||||
|
|
||||||
|
To disable Open Graph inclusion you can create your own empty file `\layouts\_internal\opengraph.html`.
|
||||||
|
In fact almost empty not quite empty because an empty file looks like absent for HUGO. For example:
|
||||||
|
```
|
||||||
|
<!-- -->
|
||||||
|
```
|
||||||
|
|
||||||
## Shortcodes
|
## Shortcodes
|
||||||
|
|
||||||
- [Buttons](https://themes.gohugo.io/theme/hugo-book/docs/shortcodes/buttons/)
|
- [Buttons](https://hugo-book-demo.netlify.app/docs/shortcodes/buttons/)
|
||||||
- [Columns](https://themes.gohugo.io/theme/hugo-book/docs/shortcodes/columns/)
|
- [Columns](https://hugo-book-demo.netlify.app/docs/shortcodes/columns/)
|
||||||
- [Expand](https://themes.gohugo.io/theme/hugo-book/docs/shortcodes/expand/)
|
- [Details](https://hugo-book-demo.netlify.app/docs/shortcodes/details/)
|
||||||
- [Hints](https://themes.gohugo.io/theme/hugo-book/docs/shortcodes/hints/)
|
- [Hints](https://hugo-book-demo.netlify.app/docs/shortcodes/hints/)
|
||||||
- [KaTeX](https://themes.gohugo.io/theme/hugo-book/docs/shortcodes/katex/)
|
- [KaTeX](https://hugo-book-demo.netlify.app/docs/shortcodes/katex/)
|
||||||
- [Mermaid](https://themes.gohugo.io/theme/hugo-book/docs/shortcodes/mermaid/)
|
- [Mermaid](https://hugo-book-demo.netlify.app/docs/shortcodes/mermaid/)
|
||||||
- [Tabs](https://themes.gohugo.io/theme/hugo-book/docs/shortcodes/tabs/)
|
- [Tabs](https://hugo-book-demo.netlify.app/docs/shortcodes/tabs/)
|
||||||
|
|
||||||
By default, Goldmark trims unsafe outputs which might prevent some shortcodes from rendering. It is recommended to set `markup.goldmark.renderer.unsafe=true` if you encounter problems.
|
By default, Goldmark trims unsafe outputs which might prevent some shortcodes from rendering. It is recommended to set `markup.goldmark.renderer.unsafe=true` if you encounter problems.
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,6 @@ weight: 1
|
||||||
# bookToc: true
|
# bookToc: true
|
||||||
# bookHidden: false
|
# bookHidden: false
|
||||||
# bookCollapseSection: false
|
# bookCollapseSection: false
|
||||||
# bookComments: true
|
# bookComments: false
|
||||||
|
# bookSearchExclude: false
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
---
|
---
|
||||||
title: "{{ replace .Name "-" " " | title }}"
|
title: "{{ .Name | humanize | title }}"
|
||||||
date: {{ .Date }}
|
date: {{ .Date }}
|
||||||
|
# bookComments: false
|
||||||
|
# bookSearchExclude: false
|
||||||
---
|
---
|
||||||
|
|
|
@ -1,22 +1,12 @@
|
||||||
/* roboto-300italic - latin */
|
|
||||||
@font-face {
|
|
||||||
font-family: 'Roboto';
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: 300;
|
|
||||||
font-display: swap;
|
|
||||||
src: local('Roboto Light Italic'), local('Roboto-LightItalic'),
|
|
||||||
url('fonts/roboto-v19-latin-300italic.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
|
||||||
url('fonts/roboto-v19-latin-300italic.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
|
||||||
}
|
|
||||||
/* roboto-regular - latin */
|
/* roboto-regular - latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'Roboto';
|
font-family: 'Roboto';
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: local('Roboto'), local('Roboto-Regular'),
|
src: local(''),
|
||||||
url('fonts/roboto-v19-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
url('fonts/roboto-v27-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
||||||
url('fonts/roboto-v19-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('fonts/roboto-v27-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
/* roboto-700 - latin */
|
/* roboto-700 - latin */
|
||||||
@font-face {
|
@font-face {
|
||||||
|
@ -24,9 +14,9 @@
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: local('Roboto Bold'), local('Roboto-Bold'),
|
src: local(''),
|
||||||
url('fonts/roboto-v19-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
url('fonts/roboto-v27-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
||||||
url('fonts/roboto-v19-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('fonts/roboto-v27-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* roboto-mono-regular - latin */
|
/* roboto-mono-regular - latin */
|
||||||
|
@ -35,9 +25,9 @@
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: local('Roboto Mono'), local('RobotoMono-Regular'),
|
src: local(''),
|
||||||
url('fonts/roboto-mono-v6-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
url('fonts/roboto-mono-v13-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
||||||
url('fonts/roboto-mono-v6-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
url('fonts/roboto-mono-v13-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|
|
@ -86,11 +86,11 @@ ul.pagination {
|
||||||
|
|
||||||
.book-brand {
|
.book-brand {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
margin-bottom: $padding-16;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 1.5em;
|
height: 1.5em;
|
||||||
width: auto;
|
width: 1.5em;
|
||||||
vertical-align: middle;
|
|
||||||
margin-inline-end: $padding-8;
|
margin-inline-end: $padding-8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,13 +135,20 @@ ul.pagination {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.book-section-flat {
|
// for RTL support
|
||||||
margin-bottom: $padding-16 * 2;
|
body[dir="rtl"] .book-menu {
|
||||||
|
input.toggle + label::after {
|
||||||
&:not(:first-child) {
|
content: "◂";
|
||||||
margin-top: $padding-16 * 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.toggle:checked + label::after {
|
||||||
|
content: "▾";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.book-section-flat {
|
||||||
|
margin: $padding-16 * 2 0;
|
||||||
|
|
||||||
> a,
|
> a,
|
||||||
> span,
|
> span,
|
||||||
> label {
|
> label {
|
||||||
|
@ -170,6 +177,11 @@ ul.pagination {
|
||||||
label {
|
label {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.book-icon {
|
||||||
|
height: 1.5em;
|
||||||
|
width: 1.5em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.book-search {
|
.book-search {
|
||||||
|
@ -226,6 +238,7 @@ ul.pagination {
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 1em;
|
height: 1em;
|
||||||
|
width: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav > ul > li:first-child {
|
nav > ul > li:first-child {
|
||||||
|
@ -239,6 +252,7 @@ ul.pagination {
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 1em;
|
height: 1em;
|
||||||
|
width: 1em;
|
||||||
margin-inline-end: $padding-8;
|
margin-inline-end: $padding-8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -248,60 +262,17 @@ ul.pagination {
|
||||||
}
|
}
|
||||||
|
|
||||||
.book-languages {
|
.book-languages {
|
||||||
position: relative;
|
margin-block-end: $padding-16 * 2;
|
||||||
overflow: visible;
|
|
||||||
|
|
||||||
padding: $padding-16;
|
.book-icon {
|
||||||
margin: -$padding-16;
|
height: 1em;
|
||||||
|
width: 1em;
|
||||||
|
margin-inline-end: .5em;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
margin: 0;
|
padding-inline-start: 1.5em;
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
|
|
||||||
li {
|
|
||||||
white-space: nowrap;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:focus,
|
|
||||||
&:focus-within {
|
|
||||||
.book-languages-list {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.book-languages-list {
|
|
||||||
display: none;
|
|
||||||
|
|
||||||
position: absolute;
|
|
||||||
bottom: 100%;
|
|
||||||
left: 0;
|
|
||||||
padding: $padding-8 0;
|
|
||||||
|
|
||||||
background: var(--body-background);
|
|
||||||
box-shadow: 0 0 $padding-4 rgba(0, 0, 0, 0.1);
|
|
||||||
|
|
||||||
li img {
|
|
||||||
opacity: 0.25;
|
|
||||||
}
|
|
||||||
|
|
||||||
li.active img,
|
|
||||||
li:hover img {
|
|
||||||
opacity: initial;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: inherit;
|
|
||||||
padding: $padding-8 $padding-16;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.book-home {
|
|
||||||
padding: $padding-16;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Responsive styles
|
// Responsive styles
|
||||||
|
@ -374,8 +345,8 @@ ul.pagination {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//for RTL support
|
// for RTL support
|
||||||
body[dir="rtl"] #menu-control:checked + main {
|
body[dir="rtl"] #menu-control:checked ~ main {
|
||||||
.book-menu .book-menu-content {
|
.book-menu .book-menu-content {
|
||||||
transform: translateX(-$menu-width);
|
transform: translateX(-$menu-width);
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
|
|
||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
|
@ -138,7 +139,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
dd {
|
dd {
|
||||||
margin-inline-start: $padding-16;
|
margin-inline-start: 0;
|
||||||
margin-bottom: $padding-16;
|
margin-bottom: $padding-16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
(function () {
|
||||||
|
function select(element) {
|
||||||
|
const selection = window.getSelection();
|
||||||
|
|
||||||
|
const range = document.createRange();
|
||||||
|
range.selectNodeContents(element);
|
||||||
|
|
||||||
|
selection.removeAllRanges();
|
||||||
|
selection.addRange(range);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.querySelectorAll("pre code").forEach(code => {
|
||||||
|
code.addEventListener("click", function (event) {
|
||||||
|
select(code.parentElement);
|
||||||
|
|
||||||
|
if (navigator.clipboard) {
|
||||||
|
navigator.clipboard.writeText(code.parentElement.textContent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})();
|
|
@ -1,5 +1,5 @@
|
||||||
(function() {
|
(function() {
|
||||||
var menu = document.querySelector("aside.book-menu nav");
|
var menu = document.querySelector("aside .book-menu-content");
|
||||||
addEventListener("beforeunload", function(event) {
|
addEventListener("beforeunload", function(event) {
|
||||||
localStorage.setItem("menu.scrollTop", menu.scrollTop);
|
localStorage.setItem("menu.scrollTop", menu.scrollTop);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
const indexCfg = {{ with i18n "bookSearchConfig" }}
|
|
||||||
{{ . }};
|
|
||||||
{{ else }}
|
|
||||||
{};
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
indexCfg.doc = {
|
|
||||||
id: 'id',
|
|
||||||
field: ['title', 'content'],
|
|
||||||
store: ['title', 'href', 'section'],
|
|
||||||
};
|
|
||||||
|
|
||||||
const index = FlexSearch.create('balance', indexCfg);
|
|
||||||
window.bookSearchIndex = index;
|
|
||||||
|
|
||||||
{{- $pages := where .Site.Pages "Kind" "in" (slice "page" "section") -}}
|
|
||||||
{{- $pages = where $pages "Params.booksearchexclude" "!=" true -}}
|
|
||||||
{{- $pages = where $pages "Content" "not in" (slice nil "") -}}
|
|
||||||
|
|
||||||
{{ range $index, $page := $pages }}
|
|
||||||
index.add({
|
|
||||||
'id': {{ $index }},
|
|
||||||
'href': '{{ $page.RelPermalink }}',
|
|
||||||
'title': {{ (partial "docs/title" $page) | jsonify }},
|
|
||||||
'section': {{ (partial "docs/title" $page.Parent) | jsonify }},
|
|
||||||
'content': {{ $page.Plain | jsonify }}
|
|
||||||
});
|
|
||||||
{{- end -}}
|
|
||||||
})();
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
[
|
||||||
|
{{- $pages := where .Site.Pages "Kind" "in" (slice "page" "section") -}}
|
||||||
|
{{- $pages = where $pages "Params.booksearchexclude" "!=" true -}}
|
||||||
|
{{- $pages = where $pages "Content" "not in" (slice nil "") -}}
|
||||||
|
|
||||||
|
{{ range $index, $page := $pages }}
|
||||||
|
{{ if gt $index 0}},{{end}} {
|
||||||
|
"id": {{ $index }},
|
||||||
|
"href": "{{ $page.RelPermalink }}",
|
||||||
|
"title": {{ (partial "docs/title" $page) | jsonify }},
|
||||||
|
"section": {{ (partial "docs/title" $page.Parent) | jsonify }},
|
||||||
|
"content": {{ $page.Plain | jsonify }}
|
||||||
|
}
|
||||||
|
{{- end -}}
|
||||||
|
]
|
|
@ -1,9 +1,19 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
{{ $searchDataFile := printf "%s.search-data.js" .Language.Lang }}
|
{{ $searchDataFile := printf "%s.search-data.json" .Language.Lang }}
|
||||||
{{ $searchData := resources.Get "search-data.js" | resources.ExecuteAsTemplate $searchDataFile . | resources.Minify | resources.Fingerprint }}
|
{{ $searchData := resources.Get "search-data.json" | resources.ExecuteAsTemplate $searchDataFile . | resources.Minify | resources.Fingerprint }}
|
||||||
|
{{ $searchConfig := i18n "bookSearchConfig" | default "{}" }}
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
const searchDataURL = '{{ $searchData.RelPermalink }}';
|
||||||
|
const indexConfig = Object.assign({{ $searchConfig }}, {
|
||||||
|
doc: {
|
||||||
|
id: 'id',
|
||||||
|
field: ['title', 'content'],
|
||||||
|
store: ['title', 'href', 'section']
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const input = document.querySelector('#book-search-input');
|
const input = document.querySelector('#book-search-input');
|
||||||
const results = document.querySelector('#book-search-results');
|
const results = document.querySelector('#book-search-results');
|
||||||
|
|
||||||
|
@ -46,11 +56,14 @@
|
||||||
input.removeEventListener('focus', init); // init once
|
input.removeEventListener('focus', init); // init once
|
||||||
input.required = true;
|
input.required = true;
|
||||||
|
|
||||||
loadScript('{{ "flexsearch.min.js" | relURL }}');
|
fetch(searchDataURL)
|
||||||
loadScript('{{ $searchData.RelPermalink }}', function () {
|
.then(pages => pages.json())
|
||||||
input.required = false;
|
.then(pages => {
|
||||||
search();
|
window.bookSearchIndex = FlexSearch.create('balance', indexConfig);
|
||||||
});
|
window.bookSearchIndex.add(pages);
|
||||||
|
})
|
||||||
|
.then(() => input.required = false)
|
||||||
|
.then(search);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search() {
|
function search() {
|
||||||
|
@ -75,20 +88,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {String} src
|
|
||||||
* @param {Function} callback
|
|
||||||
*/
|
|
||||||
function loadScript(src, callback) {
|
|
||||||
const script = document.createElement('script');
|
|
||||||
script.defer = true;
|
|
||||||
script.async = false;
|
|
||||||
script.src = src;
|
|
||||||
script.onload = callback;
|
|
||||||
|
|
||||||
document.head.appendChild(script);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {String} content
|
* @param {String} content
|
||||||
* @returns {Node}
|
* @returns {Node}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Mermaid Chart
|
# Mermaid Chart
|
||||||
|
|
||||||
[Mermaid](https://mermaidjs.github.io/) is library for generating svg charts and diagrams from text.
|
[MermaidJS](https://mermaid-js.github.io/) is library for generating svg charts and diagrams from text.
|
||||||
|
|
||||||
{{< hint info >}}
|
{{< hint info >}}
|
||||||
**Override Mermaid Initialization Config**
|
**Override Mermaid Initialization Config**
|
||||||
|
@ -14,33 +14,28 @@ create a `mermaid.json` file in your `assets` folder!
|
||||||
{{< columns >}}
|
{{< columns >}}
|
||||||
```tpl
|
```tpl
|
||||||
{{</* mermaid [class="text-center"]*/>}}
|
{{</* mermaid [class="text-center"]*/>}}
|
||||||
sequenceDiagram
|
stateDiagram-v2
|
||||||
Alice->>Bob: Hello Bob, how are you?
|
State1: The state with a note
|
||||||
alt is sick
|
note right of State1
|
||||||
Bob->>Alice: Not so good :(
|
Important information! You can write
|
||||||
else is well
|
notes.
|
||||||
Bob->>Alice: Feeling fresh like a daisy
|
end note
|
||||||
end
|
State1 --> State2
|
||||||
opt Extra response
|
note left of State2 : This is the note to the left.
|
||||||
Bob->>Alice: Thanks for asking
|
|
||||||
end
|
|
||||||
{{</* /mermaid */>}}
|
{{</* /mermaid */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
<--->
|
<--->
|
||||||
|
|
||||||
{{< mermaid >}}
|
{{< mermaid >}}
|
||||||
sequenceDiagram
|
stateDiagram-v2
|
||||||
Alice->>Bob: Hello Bob, how are you?
|
State1: The state with a note
|
||||||
alt is sick
|
note right of State1
|
||||||
Bob->>Alice: Not so good :(
|
Important information! You can write
|
||||||
else is well
|
notes.
|
||||||
Bob->>Alice: Feeling fresh like a daisy
|
end note
|
||||||
end
|
State1 --> State2
|
||||||
opt Extra response
|
note left of State2 : This is the note to the left.
|
||||||
Bob->>Alice: Thanks for asking
|
|
||||||
end
|
|
||||||
{{< /mermaid >}}
|
{{< /mermaid >}}
|
||||||
|
|
||||||
{{< /columns >}}
|
{{< /columns >}}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
# First page
|
||||||
|
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
@ -1 +0,0 @@
|
||||||
# Page 1
|
|
|
@ -1 +0,0 @@
|
||||||
# Page 2
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Second Page
|
||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"Target":"book.min.5ac6c2989f0943405962be6800b442aef429ef26ade26545ecf0617a21d1197a.css","MediaType":"text/css","Data":{"Integrity":"sha256-WsbCmJ8JQ0BZYr5oALRCrvQp7yat4mVF7PBheiHRGXo="}}
|
{"Target":"book.min.46181bc93375ba932026e753b37c40e6ff8bb16a9ef770c78bcc663e4577b1ba.css","MediaType":"text/css","Data":{"Integrity":"sha256-RhgbyTN1upMgJudTs3xA5v+LsWqe93DHi8xmPkV3sbo="}}
|
|
@ -0,0 +1,20 @@
|
||||||
|
- id: Search
|
||||||
|
translation: جستجو
|
||||||
|
|
||||||
|
- id: Edit this page
|
||||||
|
translation: این صفحه را ویرایش کنید
|
||||||
|
|
||||||
|
- id: Last modified by
|
||||||
|
translation: آخرین بار ویرایش شده توسط
|
||||||
|
|
||||||
|
- id: Expand
|
||||||
|
translation: بسط دادن
|
||||||
|
|
||||||
|
- id: Categories
|
||||||
|
translation: دسته بندی ها
|
||||||
|
|
||||||
|
- id: Tags
|
||||||
|
translation: تگ ها
|
||||||
|
|
||||||
|
- id: bookSearchConfig
|
||||||
|
translation: '{ cache: true, encode: false, rtl: true, split: /\s+/, tokenize: "forward"}'
|
|
@ -0,0 +1,14 @@
|
||||||
|
- id: Search
|
||||||
|
translation: Cerca
|
||||||
|
|
||||||
|
- id: Edit this page
|
||||||
|
translation: Modifica questa pagina
|
||||||
|
|
||||||
|
- id: Last modified by
|
||||||
|
translation: Ultima modifica di
|
||||||
|
|
||||||
|
- id: Expand
|
||||||
|
translation: Espandi
|
||||||
|
|
||||||
|
- id: bookSearchConfig
|
||||||
|
translation: '{ cache: true }'
|
|
@ -29,7 +29,6 @@
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
{{ partial "docs/inject/body" . }}
|
{{ partial "docs/inject/body" . }}
|
||||||
{{ template "_internal/google_analytics_async.html" . }}
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ .Site.Language.Lang }}" dir="{{ .Site.Language.LanguageDirection | default "ltr" }}">
|
<html lang="{{ .Site.Language.Lang }}" dir="{{ .Site.Language.LanguageDirection | default "ltr" }}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
{{ hugo.Generator }}
|
|
||||||
{{ partial "docs/html-head" . }}
|
{{ partial "docs/html-head" . }}
|
||||||
{{ partial "docs/inject/head" . }}
|
{{ partial "docs/inject/head" . }}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body dir="{{ .Site.Language.LanguageDirection | default "ltr" }}">
|
<body dir="{{ .Site.Language.LanguageDirection | default "ltr" }}">
|
||||||
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
||||||
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
||||||
|
@ -47,7 +44,6 @@
|
||||||
|
|
||||||
{{ partial "docs/inject/body" . }}
|
{{ partial "docs/inject/body" . }}
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
{{ define "menu" }}
|
{{ define "menu" }}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<h2 class="book-brand">
|
<h2 class="book-brand">
|
||||||
<a href="{{ .Site.BaseURL | relLangURL }}">
|
<a class="flex align-center" href="{{ cond (not .Site.Home.File) .Sites.First.Home.RelPermalink .Site.Home.RelPermalink }}">
|
||||||
{{- with .Site.Params.BookLogo -}}
|
{{- with .Site.Params.BookLogo -}}
|
||||||
<img src="{{ . | relURL }}" alt="Logo" />
|
<img src="{{ . | relURL }}" alt="Logo" />
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
<div class="flex flex-wrap justify-between">
|
<div class="flex flex-wrap justify-between">
|
||||||
{{ if .Site.IsMultiLingual }}
|
|
||||||
{{ partial "docs/languages" . }}
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ if and .GitInfo .Site.Params.BookRepo }}
|
{{ if and .GitInfo .Site.Params.BookRepo }}
|
||||||
<div>
|
<div>
|
||||||
|
@ -22,4 +19,10 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{ $script := resources.Get "clipboard.js" | resources.Minify }}
|
||||||
|
{{ with $script.Content }}
|
||||||
|
<script>{{ . | safeJS }}</script>
|
||||||
|
{{ end }}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
{{ partial "docs/title" . }} | {{ .Site.Title -}}
|
|
@ -2,35 +2,37 @@
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="{{ default .Summary .Description }}">
|
<meta name="description" content="{{ default .Summary .Description }}">
|
||||||
<meta name="theme-color" content="#FFFFFF">
|
<meta name="theme-color" content="#FFFFFF">
|
||||||
|
<meta name="color-scheme" content="light dark">
|
||||||
|
|
||||||
{{- template "_internal/opengraph.html" . -}}
|
{{- template "_internal/opengraph.html" . -}}
|
||||||
|
|
||||||
<title>{{ partial "docs/title" . }} | {{ .Site.Title -}}</title>
|
<title>{{ partial "docs/html-head-title" . }}</title>
|
||||||
|
|
||||||
{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }}
|
{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }}
|
||||||
<link rel="manifest" href="{{ $manifest.RelPermalink }}">
|
<link rel="manifest" href="{{ $manifest.RelPermalink }}">
|
||||||
<link rel="icon" href="{{ "favicon.png" | relURL }}" type="image/x-icon">
|
<link rel="icon" href="{{ "favicon.png" | relURL }}" type="image/x-icon">
|
||||||
|
|
||||||
{{- range .Translations }}
|
{{- range .Translations }}
|
||||||
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ partial "docs/title" . }}">
|
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ partial "docs/title" . }}">
|
||||||
{{ end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<!-- Theme stylesheet, you can customize scss by creating `assets/custom.scss` in your website -->
|
<!-- Theme stylesheet, you can customize scss by creating `assets/custom.scss` in your website -->
|
||||||
{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
|
{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
|
||||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" integrity="{{ $styles.Data.Integrity }}">
|
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" {{ template "integrity" $styles }}>
|
||||||
|
|
||||||
{{- if default true .Site.Params.BookSearch }}
|
{{- if default true .Site.Params.BookSearch -}}
|
||||||
{{- $searchJSFile := printf "%s.search.js" .Language.Lang }}
|
{{- $searchJSFile := printf "%s.search.js" .Language.Lang }}
|
||||||
{{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }}
|
{{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }}
|
||||||
<script defer src="{{ $searchJS.RelPermalink }}" integrity="{{ $searchJS.Data.Integrity }}"></script>
|
<script defer src="{{ "flexsearch.min.js" | relURL }}"></script>
|
||||||
|
<script defer src="{{ $searchJS.RelPermalink }}" {{ template "integrity" $searchJS }}></script>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{- if .Site.Params.BookServiceWorker }}
|
{{- if .Site.Params.BookServiceWorker -}}
|
||||||
{{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }}
|
{{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }}
|
||||||
<script defer src="{{ $swJS.RelPermalink }}" integrity="{{ $swJS.Data.Integrity }}"></script>
|
<script defer src="{{ $swJS.RelPermalink }}" {{ template "integrity" $swJS }}></script>
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
{{- template "_internal/google_analytics_async.html" . -}}
|
{{- template "_internal/google_analytics.html" . -}}
|
||||||
|
|
||||||
<!-- RSS -->
|
<!-- RSS -->
|
||||||
{{- with .OutputFormats.Get "rss" -}}
|
{{- with .OutputFormats.Get "rss" -}}
|
||||||
|
@ -41,3 +43,9 @@
|
||||||
Made with Book Theme
|
Made with Book Theme
|
||||||
https://github.com/alex-shpak/hugo-book
|
https://github.com/alex-shpak/hugo-book
|
||||||
{{ "-->" | safeHTML }}
|
{{ "-->" | safeHTML }}
|
||||||
|
|
||||||
|
{{- define "integrity" -}}
|
||||||
|
{{- if (urls.Parse .Permalink).Host -}}
|
||||||
|
integrity="{{ .Data.Integrity }}" crossorigin="anonymous"
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{{ $bookTranslatedOnly := default false .Site.Params.BookTranslatedOnly }}
|
{{ $bookTranslatedOnly := default false .Site.Params.BookTranslatedOnly }}
|
||||||
{{ $translations := dict }}
|
{{ $translations := dict }}
|
||||||
{{ if (eq $bookTranslatedOnly false ) }}
|
{{ if (eq $bookTranslatedOnly false ) }}
|
||||||
{{ range .Site.Home.AllTranslations }}
|
{{ range .Site.Home.Translations }}
|
||||||
{{ $translations = merge $translations (dict .Language.Lang .) }}
|
{{ $translations = merge $translations (dict .Language.Lang .) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -10,22 +10,24 @@
|
||||||
{{ $translations = merge $translations (dict .Language.Lang .) }}
|
{{ $translations = merge $translations (dict .Language.Lang .) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="book-languages" tabindex="0" aria-haspopup="true">
|
<ul class="book-languages">
|
||||||
<ul>
|
<li>
|
||||||
<li class="flex align-center">
|
<input type="checkbox" id="languages" class="toggle" />
|
||||||
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
|
<label for="languages" class="flex justify-between">
|
||||||
{{ $.Site.Language.LanguageName }}
|
<a role="button" class="flex align-center">
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul class="book-languages-list">
|
|
||||||
{{ range .Site.Languages }}{{ with index $translations .Lang }}
|
|
||||||
<li class="{{ if (eq $.Site.Language .Language) }}active{{ end }}">
|
|
||||||
<a href="{{ .Permalink }}" class="flex align-center">
|
|
||||||
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
|
<img src="{{ "svg/translate.svg" | relURL }}" class="book-icon" alt="Languages" />
|
||||||
{{ .Language.LanguageName }}
|
{{ $.Site.Language.LanguageName }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</label>
|
||||||
{{ end }}{{ end }}
|
|
||||||
</ul>
|
<ul>
|
||||||
</div>
|
{{ range .Site.Languages }}{{ with index $translations .Lang }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ .Permalink }}">
|
||||||
|
{{ .Language.LanguageName }}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}{{ end }}
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{{ with .Site.GetPage .Site.Params.BookMenuBundle }}
|
{{ with .Site.GetPage .Site.Params.BookMenuBundle }}
|
||||||
{{- $href := printf "href=\"%s\"" $.RelPermalink -}}
|
{{- $href := printf "href=\"%s\"" $.RelPermalink -}}
|
||||||
{{- replace .Content $href (print $href "class=active") | safeHTML -}}
|
{{- replace .Content $href (print $href "class=active") | safeHTML -}}
|
||||||
|
{{- warnf "Bundle menu mode is deprecated and will be removed" -}}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
{{ if .Page.Params.bookCollapseSection }}
|
{{ if .Page.Params.bookCollapseSection }}
|
||||||
<input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} />
|
<input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} />
|
||||||
<label for="section-{{ md5 .Page }}" class="flex justify-between">
|
<label for="section-{{ md5 .Page }}" class="flex justify-between">
|
||||||
<a {{ if .Page.Content }}href="{{ .Page.Permalink }}"{{ end }} class="{{ if $current }}active{{ end }}">
|
<a {{ if .Page.Content }}href="{{ .Page.Permalink }}"{{ else }}role="button"{{ end }} class="{{ if $current }}active{{ end }}">
|
||||||
{{- partial "docs/title" .Page -}}
|
{{- partial "docs/title" .Page -}}
|
||||||
</a>
|
</a>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<nav>
|
<nav>
|
||||||
{{ partial "docs/brand" . }}
|
{{ partial "docs/brand" . }}
|
||||||
{{ partial "docs/search" . }}
|
{{ partial "docs/search" . }}
|
||||||
|
{{ if .Site.IsMultiLingual }}
|
||||||
|
{{ partial "docs/languages" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "docs/inject/menu-before" . }}
|
{{ partial "docs/inject/menu-before" . }}
|
||||||
{{ partial "docs/menu-hugo" .Site.Menus.before }}
|
{{ partial "docs/menu-hugo" .Site.Menus.before }}
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
{{ with .Get "relref" }}
|
{{ with .Get "relref" }}
|
||||||
{{ $ref = relref $ . }}
|
{{ $ref = relref $ . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||||
{{ $.Inner | markdownify }}
|
{{ .Inner | .Page.RenderString }}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="book-columns flex flex-wrap">
|
<div class="book-columns flex flex-wrap">
|
||||||
{{ range split .Inner "<--->" }}
|
{{ range split .Inner "<--->" }}
|
||||||
<div class="flex-even markdown-inner">
|
<div class="flex-even markdown-inner">
|
||||||
{{ . | markdownify }}
|
{{ . | $.Page.RenderString }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<details {{ if or (.Get "open") (in .Params "open") }}open{{ end }}>
|
<details {{ if or (.Get "open") (in .Params "open") }}open{{ end }}>
|
||||||
<summary>{{ cond .IsNamedParams (.Get "title") (.Get 0) }}</summary>
|
{{- $summary := cond .IsNamedParams (.Get "title") (.Get 0) -}}
|
||||||
|
<summary>{{ $summary | .Page.RenderString }}</summary>
|
||||||
<div class="markdown-inner">
|
<div class="markdown-inner">
|
||||||
{{ .Inner | markdownify }}
|
{{ .Inner | .Page.RenderString }}
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<blockquote class="book-hint {{ .Get 0 }}">
|
<blockquote class="book-hint {{ .Get 0 }}">
|
||||||
{{ .Inner | markdownify }}
|
{{ .Inner | .Page.RenderString }}
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<dt>
|
<dt>
|
||||||
<a href="{{ .RelPermalink }}">{{ partial "docs/title" . }}</a>
|
<a href="{{ .RelPermalink }}">{{ partial "docs/title" . }}</a>
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd class="markdown-inner">
|
||||||
{{ default .Summary .Description }}
|
{{ default .Summary .Description }}
|
||||||
</dd>
|
</dd>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{{- $tab.Name -}}
|
{{- $tab.Name -}}
|
||||||
</label>
|
</label>
|
||||||
<div class="book-tabs-content markdown-inner">
|
<div class="book-tabs-content markdown-inner">
|
||||||
{{- .Content | markdownify -}}
|
{{- .Content | $.Page.RenderString -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,7 @@ license = "MIT"
|
||||||
licenselink = "https://github.com/alex-shpak/hugo-book/blob/master/LICENSE"
|
licenselink = "https://github.com/alex-shpak/hugo-book/blob/master/LICENSE"
|
||||||
description = "Hugo documentation theme as simple as plain book"
|
description = "Hugo documentation theme as simple as plain book"
|
||||||
homepage = "https://github.com/alex-shpak/hugo-book"
|
homepage = "https://github.com/alex-shpak/hugo-book"
|
||||||
|
demosite = "https://hugo-book-demo.netlify.app"
|
||||||
tags = ["responsive", "clean", "documentation", "docs", "flexbox", "search", "mobile", "multilingual", "disqus"]
|
tags = ["responsive", "clean", "documentation", "docs", "flexbox", "search", "mobile", "multilingual", "disqus"]
|
||||||
features = []
|
features = []
|
||||||
min_version = "0.68"
|
min_version = "0.68"
|
||||||
|
|
Loading…
Reference in New Issue