forked from gitbot/hugo-book
Compare commits
119 Commits
feature/pr
...
soper-book
Author | SHA1 | Date | |
---|---|---|---|
4e32047010 | |||
|
2acd86a6c2 | ||
|
0c86b5d29d | ||
|
b8b6ee67b6 | ||
|
9405c4c3d7 | ||
|
5cff108b34 | ||
|
b6a819ccc8 | ||
|
35dd2a7748 | ||
|
115a94122e | ||
|
8aa692f195 | ||
|
44fa55ddde | ||
|
95bef1b75f | ||
|
6c86dcfdc6 | ||
|
645c868cec | ||
|
fb701f6f7f | ||
|
4ebdff516a | ||
|
fbb94a56b2 | ||
|
60f4c03b8b | ||
|
f889e52566 | ||
72d4ac25fc | |||
0adfcd41b8 | |||
|
7c78a39c53 | ||
|
e4c062890b | ||
|
2b7a0e87c3 | ||
|
f8a0e8976b | ||
|
1bda9fb34d | ||
|
21e7727a0e | ||
|
a5fdf88017 | ||
|
15c85acfcd | ||
|
d008a21049 | ||
|
9cc0b0225d | ||
|
925dbd3b9f | ||
|
69886cc74b | ||
|
e585c86a81 | ||
|
3f56e60b6d | ||
|
a424a062ca | ||
|
31662538df | ||
|
2f64607bc9 | ||
|
35bf672b70 | ||
|
2b7b9c3c79 | ||
|
657807f879 | ||
|
b655b0b7b7 | ||
|
55c4c45c74 | ||
|
3f6dec2482 | ||
|
e6d4fbc186 | ||
|
94edf47a12 | ||
|
8d56f3fe84 | ||
|
460d44479b | ||
|
b25c58878c | ||
|
e54cf3e6d1 | ||
|
3588e36948 | ||
|
c19a0a60ff | ||
|
8e66fc7613 | ||
|
7c26d9b8b7 | ||
|
e104a11f42 | ||
|
90eab4a917 | ||
|
ecbe879801 | ||
|
eff55ecd56 | ||
|
1c78b920b0 | ||
|
1c42a96572 | ||
|
f8a0fc4e24 | ||
|
0baec34596 | ||
|
2dffe0bc7a | ||
|
da22a41f60 | ||
|
a8b156250b | ||
|
a111041867 | ||
|
01645fc56d | ||
|
cba1eb611a | ||
|
5e15ddb4f4 | ||
|
2d7ce27f77 | ||
|
118997fa92 | ||
|
14e14f60ae | ||
|
3f1bcccbfb | ||
|
e7155b473a | ||
|
16f6203f90 | ||
|
1cebd589f6 | ||
|
36a7e32815 | ||
|
d86d5e70c7 | ||
|
26fee5551f | ||
|
12de4671e3 | ||
|
9c8210d99b | ||
|
036e037a63 | ||
|
61bb57f32e | ||
|
d5b75f4fb3 | ||
|
3d2bfec186 | ||
|
412f140762 | ||
|
1318a717ed | ||
|
9013a1f457 | ||
|
6e1b44c4c4 | ||
|
6090fddebd | ||
|
317ccae23b | ||
17757a3edb | |||
|
c024538604 | ||
de09019ca9 | |||
|
4ef38f3bbf | ||
|
1852b16d93 | ||
|
c2014a08a5 | ||
|
faede5e749 | ||
|
98d19b8e95 | ||
|
5581ec0845 | ||
|
3a65df3a76 | ||
|
fb0863a27a | ||
|
2f60f0919f | ||
|
2e693816ae | ||
|
c47eb7388a | ||
6627b0e417 | |||
46ff40d1f4 | |||
69cc6e203c | |||
57c7d0ad65 | |||
|
8bb6d7ebec | ||
|
6c3d1e942a | ||
|
9d4916fcc2 | ||
|
f2fb37b1ad | ||
|
d6087bd32d | ||
|
15ef744c94 | ||
|
6aef8ef1c7 | ||
|
a656d711bf | ||
|
0cde2e461d | ||
|
4c1de2b3de |
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@ -9,12 +9,15 @@ jobs:
|
||||
matrix:
|
||||
hugo-version:
|
||||
- 'latest'
|
||||
- '0.68.0'
|
||||
- '0.134.2'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true # Fetch Hugo themes (true OR recursive)
|
||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||
|
||||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2
|
||||
uses: peaceiris/actions-hugo@v3
|
||||
with:
|
||||
hugo-version: ${{ matrix.hugo-version }}
|
||||
extended: true
|
||||
@ -22,3 +25,10 @@ jobs:
|
||||
- name: Run Hugo
|
||||
working-directory: exampleSite
|
||||
run: hugo --themesDir ../..
|
||||
|
||||
# - name: Deploy
|
||||
# uses: peaceiris/actions-gh-pages@v3
|
||||
# with:
|
||||
# github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# publish_dir: ./public
|
||||
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,5 @@
|
||||
public/
|
||||
exampleSite/public/
|
||||
.DS_Store
|
||||
.hugo_build.lock
|
||||
resources/
|
||||
|
110
README.md
110
README.md
@ -1,12 +1,12 @@
|
||||
# Hugo Book Theme
|
||||
|
||||
[](https://gohugo.io)
|
||||
[](https://gohugo.io)
|
||||
[](LICENSE)
|
||||

|
||||
|
||||
### [Hugo](https://gohugo.io) documentation theme as simple as plain book
|
||||
|
||||

|
||||

|
||||
|
||||
- [Features](#features)
|
||||
- [Requirements](#requirements)
|
||||
@ -33,21 +33,46 @@
|
||||
|
||||
## Requirements
|
||||
|
||||
- Hugo 0.68 or higher
|
||||
- Hugo extended version, read more [here](https://gohugo.io/news/0.48-relnotes/)
|
||||
- Hugo 0.134 or higher
|
||||
- Hugo extended version, [Installation Instructions](https://gohugo.io/installation/)
|
||||
|
||||
## Installation
|
||||
|
||||
### Install as git submodule
|
||||
Navigate to your hugo project root and run:
|
||||
|
||||
```
|
||||
git submodule add https://github.com/alex-shpak/hugo-book themes/book
|
||||
git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book
|
||||
```
|
||||
|
||||
Then run hugo (or set `theme = "book"`/`theme: book` in configuration file)
|
||||
Then run hugo (or set `theme = "hugo-book"`/`theme: hugo-book` in configuration file)
|
||||
|
||||
```
|
||||
hugo server --minify --theme book
|
||||
hugo server --minify --theme hugo-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 `hugo.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
|
||||
@ -57,54 +82,18 @@ Below is an example on how to create a new site from scratch:
|
||||
```sh
|
||||
hugo new site mydocs; cd mydocs
|
||||
git init
|
||||
git submodule add https://github.com/alex-shpak/hugo-book themes/book
|
||||
cp -R themes/book/exampleSite/content .
|
||||
git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book
|
||||
cp -R themes/hugo-book/exampleSite/content.en/* ./content
|
||||
```
|
||||
|
||||
```sh
|
||||
hugo server --minify --theme book
|
||||
hugo server --minify --theme hugo-book
|
||||
```
|
||||
|
||||
## Menu
|
||||
|
||||
### File tree menu (default)
|
||||
|
||||
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.
|
||||
|
||||
### Leaf bundle menu
|
||||
|
||||
You can also use leaf bundle and the content of its `index.md` file as menu.
|
||||
Given you have the following file structure:
|
||||
|
||||
```
|
||||
├── content
|
||||
│ ├── docs
|
||||
│ │ ├── page-one.md
|
||||
│ │ └── page-two.md
|
||||
│ └── posts
|
||||
│ ├── post-one.md
|
||||
│ └── post-two.md
|
||||
```
|
||||
|
||||
Create a file `content/menu/index.md` with the content:
|
||||
|
||||
```md
|
||||
+++
|
||||
headless = true
|
||||
+++
|
||||
|
||||
- [Book Example]({{< relref "/docs/" >}})
|
||||
- [Page One]({{< relref "/docs/page-one" >}})
|
||||
- [Page Two]({{< relref "/docs/page-two" >}})
|
||||
- [Blog]({{< relref "/posts" >}})
|
||||
```
|
||||
|
||||
And Enable it by setting `BookMenuBundle: /menu` in Site configuration.
|
||||
|
||||
- [Example menu](https://github.com/alex-shpak/hugo-book/blob/master/exampleSite/content/menu/index.md)
|
||||
- [Example config file](https://github.com/alex-shpak/hugo-book/blob/master/exampleSite/config.yaml)
|
||||
- [Leaf bundles](https://gohugo.io/content-management/page-bundles/)
|
||||
You can set `title` and `weight` in the front matter of pages to adjust the order and titles in the menu, as well as other parameters to hide or alter urls in the menu. You can choose which folder to use for generating menu with `BookSection` configuration parameter.
|
||||
|
||||
## Blog
|
||||
|
||||
@ -115,8 +104,8 @@ A blog is not the primary usecase of this theme, so it has only minimal features
|
||||
|
||||
### Site Configuration
|
||||
|
||||
There are a few configuration options that you can add to your `config.toml` file.
|
||||
You can also see the `yaml` example [here](https://github.com/alex-shpak/hugo-book/blob/master/exampleSite/config.yaml).
|
||||
There are a few configuration options that you can add to your `hugo.toml` file.
|
||||
You can also see the `yaml` example [here](https://github.com/alex-shpak/hugo-book/blob/master/exampleSite/hugo.yaml).
|
||||
|
||||
```toml
|
||||
# (Optional) Set Google Analytics if you use it to track your website.
|
||||
@ -152,10 +141,6 @@ disableKinds = ['taxonomy', 'taxonomyTerm']
|
||||
# /static/logo.png then the path would be 'logo.png'
|
||||
BookLogo = 'logo.png'
|
||||
|
||||
# (Optional, default none) Set leaf bundle to render as side menu
|
||||
# When not specified file structure and weights will be used
|
||||
BookMenuBundle = '/menu'
|
||||
|
||||
# (Optional, default docs) Specify section of content to render as menu
|
||||
# You can also set value to "*" to render all sections to menu
|
||||
BookSection = 'docs'
|
||||
@ -215,16 +200,16 @@ You can specify additional params in the front matter of individual pages:
|
||||
# Set type to 'docs' if you want to render page outside of configured section or if you render section other than 'docs'
|
||||
type = 'docs'
|
||||
|
||||
# Set page weight to re-arrange items in file-tree menu (if BookMenuBundle not set)
|
||||
# Set page weight to re-arrange items in file-tree menu.
|
||||
weight = 10
|
||||
|
||||
# (Optional) Set to 'true' to mark page as flat section in file-tree menu (if BookMenuBundle not set)
|
||||
# (Optional) Set to 'true' to mark page as flat section in file-tree menu.
|
||||
bookFlatSection = false
|
||||
|
||||
# (Optional) Set to hide nested sections or pages at that level. Works only with file-tree menu mode
|
||||
bookCollapseSection = true
|
||||
|
||||
# (Optional) Set true to hide page or section from side menu (if BookMenuBundle not set)
|
||||
# (Optional) Set true to hide page or section from side menu.
|
||||
bookHidden = false
|
||||
|
||||
# (Optional) Set 'false' to hide ToC from page
|
||||
@ -235,13 +220,18 @@ bookComments = true
|
||||
|
||||
# (Optional) Set to 'false' to exclude page from search index.
|
||||
bookSearchExclude = true
|
||||
|
||||
# (Optional) Set explicit href attribute for this page in a menu.
|
||||
bookHref = ''
|
||||
```
|
||||
|
||||
### 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/body.html` | Before closing `<body>` tag |
|
||||
@ -265,7 +255,7 @@ There are few empty partials you can override in `layouts/partials/`
|
||||
|
||||
### Plugins
|
||||
|
||||
There are a few features implemented as plugable `scss` styles. Usually these are features that don't make it to the core but can still be useful.
|
||||
There are a few features implemented as pluggable `scss` styles. Usually these are features that don't make it to the core but can still be useful.
|
||||
|
||||
| Plugin | Description |
|
||||
| --------------------------------- | ----------------------------------------------------------- |
|
||||
@ -308,7 +298,7 @@ If you are using `config.yaml` or `config.json`, consult the [configuration mark
|
||||
|
||||
## Versioning
|
||||
|
||||
This theme follows a simple incremental versioning. e.g. `v1`, `v2` and so on. There might be breaking changes between versions.
|
||||
This theme follows a simple incremental versioning. e.g. `v1.0.0`, `v2.0.0` and so on. Releases will happen on breaking changes.
|
||||
|
||||
If you want lower maintenance, use one of the released versions. If you want to live on the bleeding edge of changes, you can use the `master` branch and update your website when needed.
|
||||
|
||||
|
@ -7,4 +7,5 @@ weight: 1
|
||||
# bookCollapseSection: false
|
||||
# bookComments: false
|
||||
# bookSearchExclude: false
|
||||
draft: true
|
||||
---
|
||||
|
11
archetypes/misc.md
Normal file
11
archetypes/misc.md
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
title: "{{ .Name | humanize | title }}"
|
||||
weight: 1
|
||||
# bookFlatSection: false
|
||||
# bookToc: true
|
||||
# bookHidden: false
|
||||
# bookCollapseSection: false
|
||||
# bookComments: false
|
||||
# bookSearchExclude: false
|
||||
draft: true
|
||||
---
|
@ -3,4 +3,7 @@ title: "{{ .Name | humanize | title }}"
|
||||
date: {{ .Date }}
|
||||
# bookComments: false
|
||||
# bookSearchExclude: false
|
||||
tags: []
|
||||
categories: []
|
||||
draft: true
|
||||
---
|
||||
|
@ -1,3 +1,7 @@
|
||||
/* You can add custom styles here. */
|
||||
|
||||
// @import "plugins/numbered";
|
||||
|
||||
//Uncomment the following if local fonts will not load
|
||||
//@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
|
||||
//@import url('https://fonts.googleapis.com/css2?family=Ubuntu+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');
|
@ -16,7 +16,6 @@ $body-font-weight: normal !default;
|
||||
$body-min-width: 20rem !default;
|
||||
$container-max-width: 80rem !default;
|
||||
|
||||
$header-height: 3.5rem !default;
|
||||
$menu-width: 16rem !default;
|
||||
$toc-width: 16rem !default;
|
||||
|
||||
@ -48,9 +47,9 @@ $hint-colors: (
|
||||
}
|
||||
|
||||
@mixin theme-dark {
|
||||
--gray-100: rgba(255, 255, 255, 0.1);
|
||||
--gray-200: rgba(255, 255, 255, 0.2);
|
||||
--gray-500: rgba(255, 255, 255, 0.5);
|
||||
--gray-100: #494e54;
|
||||
--gray-200: #5c6165;
|
||||
--gray-500: #999d9f;
|
||||
|
||||
--color-link: #84b2ff;
|
||||
--color-visited-link: #b88dff;
|
||||
|
@ -1,39 +1,110 @@
|
||||
/* roboto-regular - latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: local(''),
|
||||
url('fonts/roboto-v27-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
||||
url('fonts/roboto-v27-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||
font-display: fallback;
|
||||
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* roboto-700 - latin */
|
||||
|
||||
@font-face {
|
||||
font-family: 'Roboto';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: local(''),
|
||||
url('fonts/roboto-v27-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
||||
url('fonts/roboto-v27-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||
font-display: fallback;
|
||||
src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
/* roboto-mono-regular - latin */
|
||||
@font-face {
|
||||
font-family: 'Roboto Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: local(''),
|
||||
url('fonts/roboto-mono-v13-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
||||
url('fonts/roboto-mono-v13-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
||||
font-display: fallback;
|
||||
src: url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_ROW4AJi8SJQt.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
/* UBUNTU; LOADED BY SOPER */
|
||||
/* Regular */
|
||||
@font-face {
|
||||
font-family: 'Ubuntu';
|
||||
src: url('fonts/Ubuntu-Bold.woff2') format('woff2'),
|
||||
url('fonts/Ubuntu-Bold.woff') format('woff');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Ubuntu';
|
||||
src: url('fonts/Ubuntu-Italic.woff2') format('woff2'),
|
||||
url('fonts/Ubuntu-Italic.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Ubuntu';
|
||||
src: url('fonts/Ubuntu-BoldItalic.woff2') format('woff2'),
|
||||
url('fonts/Ubuntu-BoldItalic.woff') format('woff');
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Ubuntu';
|
||||
src: url('fonts/Ubuntu.woff2') format('woff2'),
|
||||
url('fonts/Ubuntu.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
/* Mono */
|
||||
@font-face {
|
||||
font-family: 'Ubuntu Mono';
|
||||
src: url('fonts/UbuntuMono-Bold.woff2') format('woff2'),
|
||||
url('fonts/UbuntuMono-Bold.woff') format('woff');
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Ubuntu Mono';
|
||||
src: url('fonts/UbuntuMono-BoldItalic.woff2') format('woff2'),
|
||||
url('fonts/UbuntuMono-BoldItalic.woff') format('woff');
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Ubuntu Mono';
|
||||
src: url('fonts/UbuntuMono-Regular.woff2') format('woff2'),
|
||||
url('fonts/UbuntuMono-Regular.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Ubuntu Mono';
|
||||
src: url('fonts/UbuntuMono-Italic.woff2') format('woff2'),
|
||||
url('fonts/UbuntuMono-Italic.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-family: 'Ubuntu', 'Roboto', sans-serif;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: 'Roboto Mono', monospace;
|
||||
font-family: 'Ubuntu Mono', 'Roboto Mono', monospace;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ html {
|
||||
font-size: $font-size-base;
|
||||
scroll-behavior: smooth;
|
||||
touch-action: manipulation;
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
|
||||
body {
|
||||
@ -9,7 +10,7 @@ body {
|
||||
color: var(--body-font-color);
|
||||
background: var(--body-background);
|
||||
|
||||
letter-spacing: 0.33px;
|
||||
// letter-spacing: 0.33px;
|
||||
font-weight: $body-font-weight;
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
@ -69,6 +70,7 @@ ul.pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
list-style-type: none;
|
||||
padding-inline-start: 0px;
|
||||
|
||||
.page-item a {
|
||||
padding: $padding-16;
|
||||
@ -84,6 +86,12 @@ ul.pagination {
|
||||
filter: var(--icon-filter);
|
||||
}
|
||||
|
||||
a .book-icon {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
margin-inline-end: .5em;
|
||||
}
|
||||
|
||||
.book-brand {
|
||||
margin-top: 0;
|
||||
margin-bottom: $padding-16;
|
||||
@ -167,7 +175,17 @@ body[dir="rtl"] .book-menu {
|
||||
}
|
||||
|
||||
.book-post {
|
||||
margin-bottom: $padding-16 * 3;
|
||||
margin-bottom: $padding-16 * 2;
|
||||
|
||||
.book-post-date img {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
margin-inline-end: .5em;
|
||||
}
|
||||
|
||||
.book-post-content > :first-child {
|
||||
margin-top: $padding-16;
|
||||
}
|
||||
}
|
||||
|
||||
.book-header {
|
||||
@ -178,6 +196,12 @@ body[dir="rtl"] .book-menu {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin: 0 $padding-16;
|
||||
}
|
||||
|
||||
img.book-icon {
|
||||
height: 1.5em;
|
||||
width: 1.5em;
|
||||
@ -249,12 +273,6 @@ body[dir="rtl"] .book-menu {
|
||||
.book-footer {
|
||||
padding-top: $padding-16;
|
||||
font-size: $font-size-14;
|
||||
|
||||
img {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
margin-inline-end: $padding-8;
|
||||
}
|
||||
}
|
||||
|
||||
.book-comments {
|
||||
@ -264,12 +282,6 @@ body[dir="rtl"] .book-menu {
|
||||
.book-languages {
|
||||
margin-block-end: $padding-16 * 2;
|
||||
|
||||
.book-icon {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
margin-inline-end: .5em;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding-inline-start: 1.5em;
|
||||
}
|
||||
@ -295,7 +307,6 @@ body[dir="rtl"] .book-menu {
|
||||
.book-menu {
|
||||
visibility: hidden;
|
||||
margin-inline-start: -$menu-width;
|
||||
font-size: $font-size-base;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
@ -65,9 +65,12 @@
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
code {
|
||||
direction: ltr;
|
||||
unicode-bidi: embed;
|
||||
padding: 0 $padding-4;
|
||||
background: var(--gray-200);
|
||||
border-radius: $border-radius;
|
||||
@ -75,6 +78,8 @@
|
||||
}
|
||||
|
||||
pre {
|
||||
direction: ltr;
|
||||
unicode-bidi: embed;
|
||||
padding: $padding-16;
|
||||
background: var(--gray-100);
|
||||
border-radius: $border-radius;
|
||||
@ -86,6 +91,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: $padding-16 0;
|
||||
padding: $padding-8 $padding-16 $padding-8 ($padding-16 - $padding-4); //to keep total left space 16dp
|
||||
@ -129,6 +138,7 @@
|
||||
ul,
|
||||
ol {
|
||||
padding-inline-start: $padding-16 * 2;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
dl {
|
||||
@ -144,7 +154,17 @@
|
||||
}
|
||||
|
||||
// Special case for highlighted code with line numbers
|
||||
.highlight table tr {
|
||||
.highlight {
|
||||
direction: ltr;
|
||||
unicode-bidi: embed;
|
||||
border-radius: $border-radius;
|
||||
overflow: hidden;
|
||||
|
||||
table tr {
|
||||
td pre code > span {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
td:nth-child(1) pre {
|
||||
margin: 0;
|
||||
padding-inline-end: 0;
|
||||
@ -154,6 +174,7 @@
|
||||
padding-inline-start: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
details {
|
||||
padding: $padding-16;
|
||||
|
@ -71,7 +71,7 @@
|
||||
|
||||
> div {
|
||||
margin: $padding-16 0;
|
||||
min-width: $body-min-width / 2;
|
||||
min-width: $body-min-width * 0.66;
|
||||
padding: 0 $padding-16;
|
||||
}
|
||||
}
|
||||
|
@ -50,6 +50,10 @@
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.text-small {
|
||||
font-size: .875em;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
@ -11,6 +11,9 @@
|
||||
|
||||
document.querySelectorAll("pre code").forEach(code => {
|
||||
code.addEventListener("click", function (event) {
|
||||
if (window.getSelection().toString()) {
|
||||
return;
|
||||
}
|
||||
select(code.parentElement);
|
||||
|
||||
if (navigator.clipboard) {
|
||||
|
@ -1,14 +1,14 @@
|
||||
{
|
||||
"name": "{{ .Site.Title }}",
|
||||
"short_name": "{{ .Site.Title }}",
|
||||
"start_url": "{{ "/" | relURL }}",
|
||||
"scope": "{{ "/" | relURL }}",
|
||||
"start_url": "{{ "./" | relURL }}",
|
||||
"scope": "{{ "./" | relURL }}",
|
||||
"display": "standalone",
|
||||
"background_color": "#000000",
|
||||
"theme_color": "#000000",
|
||||
"icons": [
|
||||
{
|
||||
"src": "{{ "/favicon.svg" | relURL }}",
|
||||
"src": "{{ "./favicon.svg" | relURL }}",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
]
|
||||
|
@ -1,9 +1,9 @@
|
||||
$startLevel: 1;
|
||||
$endLevel: 6;
|
||||
|
||||
.book-page .markdown {
|
||||
.book-page .markdown.book-article {
|
||||
@for $currentLevel from $startLevel through $endLevel {
|
||||
> h#{$currentLevel} {
|
||||
h#{$currentLevel} {
|
||||
counter-increment: h#{$currentLevel};
|
||||
counter-reset: h#{$currentLevel + 1};
|
||||
|
||||
@ -19,14 +19,12 @@ $endLevel: 6;
|
||||
}
|
||||
}
|
||||
|
||||
.book-toc nav ul {
|
||||
.book-toc nav#TableOfContents ul {
|
||||
counter-reset: item;
|
||||
|
||||
li {
|
||||
counter-increment: item;
|
||||
|
||||
&:first-child {
|
||||
counter-reset: item;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: counters(item, ".") ". ";
|
||||
float: left;
|
||||
|
@ -1,7 +1,9 @@
|
||||
[
|
||||
{{- $pages := where .Site.Pages "Kind" "in" (slice "page" "section") -}}
|
||||
{{- $pages = where $pages "Params.booksearchexclude" "!=" true -}}
|
||||
{{- $pages = where $pages "Content" "not in" (slice nil "") -}}
|
||||
{{- $pages = where $pages "Params.bookSearchExclude" "!=" true -}}
|
||||
{{/* Remove until we know why it does not work, see https://github.com/alex-shpak/hugo-book/issues/528 */}}
|
||||
{{/*- $pages = where $pages "Content" "not in" (slice nil "") -*/}}
|
||||
{{- $pages = where $pages "Content" "!=" "" -}}
|
||||
|
||||
{{ range $index, $page := $pages }}
|
||||
{{ if gt $index 0}},{{end}} {
|
||||
|
@ -7,11 +7,21 @@
|
||||
(function () {
|
||||
const searchDataURL = '{{ $searchData.RelPermalink }}';
|
||||
const indexConfig = Object.assign({{ $searchConfig }}, {
|
||||
doc: {
|
||||
id: 'id',
|
||||
field: ['title', 'content'],
|
||||
store: ['title', 'href', 'section']
|
||||
includeScore: true,
|
||||
useExtendedSearch: true,
|
||||
fieldNormWeight: 1.5,
|
||||
threshold: 0.2,
|
||||
ignoreLocation: true,
|
||||
keys: [
|
||||
{
|
||||
name: 'title',
|
||||
weight: 0.7
|
||||
},
|
||||
{
|
||||
name: 'content',
|
||||
weight: 0.3
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
const input = document.querySelector('#book-search-input');
|
||||
@ -30,6 +40,10 @@
|
||||
* @param {Event} event
|
||||
*/
|
||||
function focusSearchFieldOnKeyPress(event) {
|
||||
if (event.target.value !== undefined) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (input === document.activeElement) {
|
||||
return;
|
||||
}
|
||||
@ -59,8 +73,7 @@
|
||||
fetch(searchDataURL)
|
||||
.then(pages => pages.json())
|
||||
.then(pages => {
|
||||
window.bookSearchIndex = FlexSearch.create('balance', indexConfig);
|
||||
window.bookSearchIndex.add(pages);
|
||||
window.bookSearchIndex = new Fuse(pages, indexConfig);
|
||||
})
|
||||
.then(() => input.required = false)
|
||||
.then(search);
|
||||
@ -75,14 +88,14 @@
|
||||
return;
|
||||
}
|
||||
|
||||
const searchHits = window.bookSearchIndex.search(input.value, 10);
|
||||
const searchHits = window.bookSearchIndex.search(input.value).slice(0,10);
|
||||
searchHits.forEach(function (page) {
|
||||
const li = element('<li><a href></a><small></small></li>');
|
||||
const a = li.querySelector('a'), small = li.querySelector('small');
|
||||
|
||||
a.href = page.href;
|
||||
a.textContent = page.title;
|
||||
small.textContent = page.section;
|
||||
a.href = page.item.href;
|
||||
a.textContent = page.item.title;
|
||||
small.textContent = page.item.section;
|
||||
|
||||
results.appendChild(li);
|
||||
});
|
||||
|
@ -2,6 +2,6 @@
|
||||
if (navigator.serviceWorker) {
|
||||
navigator.serviceWorker.register(
|
||||
"{{ $swJS.RelPermalink }}",
|
||||
{ scope: "{{ "/" | relURL }}" }
|
||||
{ scope: "{{ "./" | relURL }}" }
|
||||
);
|
||||
}
|
||||
|
@ -1,79 +0,0 @@
|
||||
---
|
||||
title: ভূমিকা
|
||||
type: docs
|
||||
---
|
||||
|
||||
# বাংলা ভাষায় শুরু করুন
|
||||
|
||||
{{< columns >}}
|
||||
## অস্ট্রিস চিপসে ফুর্তিভা
|
||||
|
||||
Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut
|
||||
olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis,
|
||||
modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies
|
||||
|
||||
<--->
|
||||
|
||||
## সুইস কোটা ভোটে
|
||||
|
||||
Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat:
|
||||
miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod
|
||||
nunc! Fragosis suae dextra geruntur functus vulgata.
|
||||
{{< /columns >}}
|
||||
|
||||
|
||||
## টেম্পোরার নিশি
|
||||
|
||||
Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei,
|
||||
tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis
|
||||
sequens!
|
||||
|
||||
var panel = ram_design;
|
||||
if (backup + system) {
|
||||
file.readPoint = network_native;
|
||||
sidebar_engine_device(cell_tftp_raster,
|
||||
dual_login_paper.adf_vci.application_reader_design(
|
||||
graphicsNvramCdma, lpi_footer_snmp, integer_model));
|
||||
}
|
||||
public_keyboard_docking += error.controller_gibibyte_plug.ip(4,
|
||||
asciiPetaflops, software(supercomputer_compatible_status + 4));
|
||||
dynamic_disk.indexModeLaptop = bufferTftpReality;
|
||||
var export_vlog_sequence = trinitron_flowchart + supercomputer_cluster_rj(
|
||||
-1, toolbar_powerpoint_query, -2 / multiprocessing_impression);
|
||||
|
||||
## Locis suis novi cum suoque decidit eadem
|
||||
|
||||
Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab? Venit spes
|
||||
versus finis sermonibus patefecit murum nec est sine oculis. _Ille_ inmota
|
||||
macies domoque caelestia cadit tantummodo scelus procul, corde!
|
||||
|
||||
1. Dolentem capi parte rostro alvum habentem pudor
|
||||
2. Fulgentia sanguine paret
|
||||
3. E punior consurgit lentus
|
||||
4. Vox hasta eras micantes
|
||||
|
||||
## Facibus pharetrae indetonsusque indulsit sic incurrite foliis
|
||||
|
||||
Nefandam et prisci palmas! Blandita cutis flectitur montis macies, te _nati_
|
||||
Latiis; turbaque inferias. Virginis tibi peracta avidusque facies caper nec, e
|
||||
at ademptae, mira.
|
||||
|
||||
direct *= font(inputScareware(sliHome), crossplatform.byte(
|
||||
ppl_encryption.excel_e_rte(integratedModelModifier), timeVirtual,
|
||||
floating_speakers.media_printer(us, yahoo, primaryPhp)));
|
||||
friendly_metal_flatbed(cd, isoPrimaryStorage(reader), dmaMirrored);
|
||||
if (parse_flash_cron.metalGif(1, adServiceDevice, utility)) {
|
||||
adf -= operation_cdma_samba;
|
||||
imapGif.switch += torrent;
|
||||
} else {
|
||||
pmu.disk_captcha = digital_ppp_pci + recursionTransistor(5, dram);
|
||||
ajax_service += grayscalePythonLock;
|
||||
google_scroll_capacity = ftp + engine_dslam_sidebar / tape - 1;
|
||||
}
|
||||
drive_rw = zipTftp;
|
||||
var suffix = software_router_extension.dimm_ddr(-5,
|
||||
kernel_digital_minisite);
|
||||
|
||||
Vocavit toto; alas **mitis** maestus in liquidarum ab legi finitimosque dominam
|
||||
tibi subitus; Orionis vertitur nota. Currere alti etiam seroque cernitis
|
||||
innumeris miraturus amplectique collo sustinet quemque! Litora ante turba?
|
@ -5,7 +5,7 @@ type: docs
|
||||
|
||||
# Acerbo datus maxime
|
||||
|
||||
{{< columns >}}
|
||||
{{% columns %}}
|
||||
## Astris ipse furtiva
|
||||
|
||||
Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut
|
||||
@ -19,7 +19,7 @@ modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies
|
||||
Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat:
|
||||
miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod
|
||||
nunc! Fragosis suae dextra geruntur functus vulgata.
|
||||
{{< /columns >}}
|
||||
{{% /columns %}}
|
||||
|
||||
|
||||
## Tempora nisi nunc
|
80
exampleSite/content.en/docs/shortcodes/columns.md
Normal file
80
exampleSite/content.en/docs/shortcodes/columns.md
Normal file
@ -0,0 +1,80 @@
|
||||
# Columns
|
||||
|
||||
Columns help organize shorter pieces of content horizontally for readability.
|
||||
|
||||
## Example
|
||||
|
||||
```html
|
||||
{{%/* columns [ratio="1:1"] [class="..."] */%}} <!-- begin columns block -->
|
||||
# Left Content
|
||||
Lorem markdownum insigne...
|
||||
|
||||
<---> <!-- magic separator, between columns -->
|
||||
|
||||
# Mid Content
|
||||
Lorem markdownum insigne...
|
||||
|
||||
<---> <!-- magic separator, between columns -->
|
||||
|
||||
# Right Content
|
||||
Lorem markdownum insigne...
|
||||
{{%/* /columns */%}}
|
||||
```
|
||||
|
||||
{{% columns %}}
|
||||
### Left Content
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||
Miseratus fonte Ditis conubia.
|
||||
|
||||
<--->
|
||||
|
||||
### Mid Content
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter!
|
||||
|
||||
<--->
|
||||
|
||||
### Right Content
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||
Miseratus fonte Ditis conubia.
|
||||
{{% /columns %}}
|
||||
|
||||
## Settings size ratio for columns
|
||||
|
||||
```html
|
||||
{{%/* columns ratio="1:2" */%}} <!-- begin columns block -->
|
||||
|
||||
## x1 Column
|
||||
Lorem markdownum insigne...
|
||||
|
||||
<---> <!-- magic separator, between columns -->
|
||||
|
||||
## x2 Column
|
||||
Lorem markdownum insigne...
|
||||
|
||||
{{%/* /columns */%}}
|
||||
```
|
||||
|
||||
{{% columns ratio="1:2" %}}
|
||||
### x1 Column
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||
Miseratus fonte Ditis conubia.
|
||||
|
||||
<--->
|
||||
|
||||
### x2 Column
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter!
|
||||
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||
Miseratus fonte Ditis conubia.
|
||||
|
||||
{{% /columns %}}
|
@ -4,19 +4,19 @@ Details shortcode is a helper for `details` html5 element. It is going to replac
|
||||
|
||||
## Example
|
||||
```tpl
|
||||
{{</* details "Title" [open] */>}}
|
||||
{{%/* details "Title" [open] */%}}
|
||||
## Markdown content
|
||||
Lorem markdownum insigne...
|
||||
{{</* /details */>}}
|
||||
{{%/* /details */%}}
|
||||
```
|
||||
```tpl
|
||||
{{</* details title="Title" open=true */>}}
|
||||
{{%/* details title="Title" open=true */%}}
|
||||
## Markdown content
|
||||
Lorem markdownum insigne...
|
||||
{{</* /details */>}}
|
||||
{{%/* /details */%}}
|
||||
```
|
||||
|
||||
{{< details "Title" open >}}
|
||||
{{% details "Title" open %}}
|
||||
## Markdown content
|
||||
Lorem markdownum insigne...
|
||||
{{< /details >}}
|
||||
{{% /details %}}
|
@ -4,29 +4,29 @@ Hint shortcode can be used as hint/alerts/notification block.
|
||||
There are 3 colors to choose: `info`, `warning` and `danger`.
|
||||
|
||||
```tpl
|
||||
{{</* hint [info|warning|danger] */>}}
|
||||
{{%/* hint [info|warning|danger] */%}}
|
||||
**Markdown content**
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
{{</* /hint */>}}
|
||||
{{%/* /hint */%}}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
{{< hint info >}}
|
||||
{{% hint info %}}
|
||||
**Markdown content**
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
{{< hint warning >}}
|
||||
{{% hint warning %}}
|
||||
**Markdown content**
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
{{< hint danger >}}
|
||||
{{% hint danger %}}
|
||||
**Markdown content**
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
@ -1,28 +1,31 @@
|
||||
---
|
||||
title: KaTeX
|
||||
---
|
||||
# KaTeX
|
||||
|
||||
KaTeX shortcode let you render math typesetting in markdown document. See [KaTeX](https://katex.org/)
|
||||
|
||||
## Example
|
||||
{{< columns >}}
|
||||
{{% columns %}}
|
||||
|
||||
```latex
|
||||
{{</* katex [display] [class="text-center"] */>}}
|
||||
{{</* katex display=true >}}
|
||||
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
|
||||
{{</* /katex */>}}
|
||||
{{< /katex */>}}
|
||||
```
|
||||
|
||||
<--->
|
||||
|
||||
{{< katex display >}}
|
||||
{{< katex display=true >}}
|
||||
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
|
||||
{{< /katex >}}
|
||||
|
||||
{{< /columns >}}
|
||||
{{% /columns %}}
|
||||
|
||||
## Display Mode Example
|
||||
|
||||
Here is some inline example: {{< katex >}}\pi(x){{< /katex >}}, rendered in the same line. And below is `display` example, having `display: block`
|
||||
{{< katex display >}}
|
||||
{{< katex display=true >}}
|
||||
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
|
||||
{{< /katex >}}
|
||||
Text continues here.
|
@ -2,18 +2,19 @@
|
||||
|
||||
[MermaidJS](https://mermaid-js.github.io/) is library for generating svg charts and diagrams from text.
|
||||
|
||||
{{< hint info >}}
|
||||
**Override Mermaid Initialization Config**
|
||||
|
||||
{{% hint info %}}
|
||||
**Override Mermaid initialization config**
|
||||
To override the [initialization config](https://mermaid-js.github.io/mermaid/#/Setup) for Mermaid,
|
||||
create a `mermaid.json` file in your `assets` folder!
|
||||
{{< /hint >}}
|
||||
{{% /hint %}}
|
||||
|
||||
## Example
|
||||
|
||||
{{< columns >}}
|
||||
|
||||
{{% columns %}}
|
||||
|
||||
```tpl
|
||||
{{</* mermaid [class="text-center"]*/>}}
|
||||
{{</* mermaid [class="..."] >}}
|
||||
stateDiagram-v2
|
||||
State1: The state with a note
|
||||
note right of State1
|
||||
@ -22,7 +23,7 @@ stateDiagram-v2
|
||||
end note
|
||||
State1 --> State2
|
||||
note left of State2 : This is the note to the left.
|
||||
{{</* /mermaid */>}}
|
||||
{{< /mermaid */>}}
|
||||
```
|
||||
|
||||
<--->
|
||||
@ -38,4 +39,4 @@ stateDiagram-v2
|
||||
note left of State2 : This is the note to the left.
|
||||
{{</mermaid>}}
|
||||
|
||||
{{< /columns >}}
|
||||
{{% /columns %}}
|
16
exampleSite/content.en/docs/shortcodes/section/_index.md
Normal file
16
exampleSite/content.en/docs/shortcodes/section/_index.md
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
bookCollapseSection: true
|
||||
bookHidden: true
|
||||
---
|
||||
|
||||
# Section
|
||||
|
||||
Section renders pages in section as definition list, using title and description. Optional param `summary` can be used to show or hide page summary
|
||||
|
||||
## Example
|
||||
|
||||
```tpl
|
||||
{{</* section [summary] */>}}
|
||||
```
|
||||
|
||||
{{<section summary>}}
|
@ -3,17 +3,18 @@
|
||||
Tabs let you organize content by context, for example installation instructions for each supported platform.
|
||||
|
||||
```tpl
|
||||
{{</* tabs "uniqueid" */>}}
|
||||
{{</* tab "MacOS" */>}} # MacOS Content {{</* /tab */>}}
|
||||
{{</* tab "Linux" */>}} # Linux Content {{</* /tab */>}}
|
||||
{{</* tab "Windows" */>}} # Windows Content {{</* /tab */>}}
|
||||
{{</* tabs "id" */>}}
|
||||
{{%/* tab "MacOS" */%}} # MacOS Content {{%/* /tab */%}}
|
||||
{{%/* tab "Linux" */%}} # Linux Content {{%/* /tab */%}}
|
||||
{{%/* tab "Windows" */%}} # Windows Content {{%/* /tab */%}}
|
||||
{{</* /tabs */>}}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
{{< tabs "uniqueid" >}}
|
||||
{{< tab "MacOS" >}}
|
||||
{{< tabs >}}
|
||||
|
||||
{{% tab "MacOS" %}}
|
||||
# MacOS
|
||||
|
||||
This is tab **MacOS** content.
|
||||
@ -22,10 +23,9 @@ Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||
Miseratus fonte Ditis conubia.
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab "Linux" >}}
|
||||
{{% /tab %}}
|
||||
|
||||
{{% tab "Linux" %}}
|
||||
# Linux
|
||||
|
||||
This is tab **Linux** content.
|
||||
@ -34,10 +34,9 @@ Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||
Miseratus fonte Ditis conubia.
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab "Windows" >}}
|
||||
{{% /tab %}}
|
||||
|
||||
{{% tab "Windows" %}}
|
||||
# Windows
|
||||
|
||||
This is tab **Windows** content.
|
||||
@ -46,5 +45,6 @@ Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||
Miseratus fonte Ditis conubia.
|
||||
{{< /tab >}}
|
||||
{{% /tab %}}
|
||||
|
||||
{{< /tabs >}}
|
41
exampleSite/content.he/_index.md
Normal file
41
exampleSite/content.he/_index.md
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
title: Introduction
|
||||
type: docs
|
||||
---
|
||||
|
||||
# Example of RTL page
|
||||
|
||||
{{% columns %}}
|
||||
## Astris ipse furtiva
|
||||
|
||||
Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut
|
||||
olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis,
|
||||
modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies
|
||||
|
||||
<--->
|
||||
|
||||
## Suis quot vota
|
||||
|
||||
Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat:
|
||||
miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod
|
||||
nunc! Fragosis suae dextra geruntur functus vulgata.
|
||||
{{% /columns %}}
|
||||
|
||||
|
||||
## Tempora nisi nunc
|
||||
|
||||
Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei,
|
||||
tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis
|
||||
sequens!
|
||||
|
||||
var panel = ram_design;
|
||||
if (backup + system) {
|
||||
file.readPoint = network_native;
|
||||
sidebar_engine_device(cell_tftp_raster,
|
||||
dual_login_paper.adf_vci.application_reader_design(
|
||||
graphicsNvramCdma, lpi_footer_snmp, integer_model));
|
||||
}
|
||||
|
||||
## Locis suis novi cum suoque decidit eadem
|
||||
|
||||
Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab?
|
@ -1,79 +0,0 @@
|
||||
---
|
||||
title: Введение
|
||||
type: docs
|
||||
---
|
||||
|
||||
# Стартовая страница на русском языке
|
||||
|
||||
{{< columns >}}
|
||||
## Astris ipse furtiva
|
||||
|
||||
Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut
|
||||
olivae sensit **arma sorori** deducit, inesset **crudus**, ego vetuere aliis,
|
||||
modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies
|
||||
|
||||
<--->
|
||||
|
||||
## Suis quot vota
|
||||
|
||||
Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat:
|
||||
miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod
|
||||
nunc! Fragosis suae dextra geruntur functus vulgata.
|
||||
{{< /columns >}}
|
||||
|
||||
|
||||
## Tempora nisi nunc
|
||||
|
||||
Lorem **markdownum** emicat gestu. Cannis sol pressit ducta. **Est** Idaei,
|
||||
tremens ausim se tutaeque, illi ulnis hausit, sed, lumina cutem. Quae avis
|
||||
sequens!
|
||||
|
||||
var panel = ram_design;
|
||||
if (backup + system) {
|
||||
file.readPoint = network_native;
|
||||
sidebar_engine_device(cell_tftp_raster,
|
||||
dual_login_paper.adf_vci.application_reader_design(
|
||||
graphicsNvramCdma, lpi_footer_snmp, integer_model));
|
||||
}
|
||||
public_keyboard_docking += error.controller_gibibyte_plug.ip(4,
|
||||
asciiPetaflops, software(supercomputer_compatible_status + 4));
|
||||
dynamic_disk.indexModeLaptop = bufferTftpReality;
|
||||
var export_vlog_sequence = trinitron_flowchart + supercomputer_cluster_rj(
|
||||
-1, toolbar_powerpoint_query, -2 / multiprocessing_impression);
|
||||
|
||||
## Locis suis novi cum suoque decidit eadem
|
||||
|
||||
Idmoniae ripis, at aves, ali missa adest, ut _et autem_, et ab? Venit spes
|
||||
versus finis sermonibus patefecit murum nec est sine oculis. _Ille_ inmota
|
||||
macies domoque caelestia cadit tantummodo scelus procul, corde!
|
||||
|
||||
1. Dolentem capi parte rostro alvum habentem pudor
|
||||
2. Fulgentia sanguine paret
|
||||
3. E punior consurgit lentus
|
||||
4. Vox hasta eras micantes
|
||||
|
||||
## Facibus pharetrae indetonsusque indulsit sic incurrite foliis
|
||||
|
||||
Nefandam et prisci palmas! Blandita cutis flectitur montis macies, te _nati_
|
||||
Latiis; turbaque inferias. Virginis tibi peracta avidusque facies caper nec, e
|
||||
at ademptae, mira.
|
||||
|
||||
direct *= font(inputScareware(sliHome), crossplatform.byte(
|
||||
ppl_encryption.excel_e_rte(integratedModelModifier), timeVirtual,
|
||||
floating_speakers.media_printer(us, yahoo, primaryPhp)));
|
||||
friendly_metal_flatbed(cd, isoPrimaryStorage(reader), dmaMirrored);
|
||||
if (parse_flash_cron.metalGif(1, adServiceDevice, utility)) {
|
||||
adf -= operation_cdma_samba;
|
||||
imapGif.switch += torrent;
|
||||
} else {
|
||||
pmu.disk_captcha = digital_ppp_pci + recursionTransistor(5, dram);
|
||||
ajax_service += grayscalePythonLock;
|
||||
google_scroll_capacity = ftp + engine_dslam_sidebar / tape - 1;
|
||||
}
|
||||
drive_rw = zipTftp;
|
||||
var suffix = software_router_extension.dimm_ddr(-5,
|
||||
kernel_digital_minisite);
|
||||
|
||||
Vocavit toto; alas **mitis** maestus in liquidarum ab legi finitimosque dominam
|
||||
tibi subitus; Orionis vertitur nota. Currere alti etiam seroque cernitis
|
||||
innumeris miraturus amplectique collo sustinet quemque! Litora ante turba?
|
@ -5,7 +5,7 @@ type: docs
|
||||
|
||||
# 中文索引页
|
||||
|
||||
{{< columns >}}
|
||||
{{% columns %}}
|
||||
## Astris ipse furtiva
|
||||
|
||||
Est in vagis et Pittheus tu arge accipiter regia iram vocatur nurus. Omnes ut
|
||||
@ -19,7 +19,7 @@ modo arsit? Utinam rapta fiducia valuere litora _adicit cursu_, ad facies
|
||||
Ea _furtique_ risere fratres edidit terrae magis. Colla tam mihi tenebat:
|
||||
miseram excita suadent es pecudes iam. Concilio _quam_ velatus posset ait quod
|
||||
nunc! Fragosis suae dextra geruntur functus vulgata.
|
||||
{{< /columns >}}
|
||||
{{% /columns %}}
|
||||
|
||||
|
||||
## Tempora nisi nunc
|
||||
|
@ -1,45 +0,0 @@
|
||||
# Columns
|
||||
|
||||
Columns help organize shorter pieces of content horizontally for readability.
|
||||
|
||||
|
||||
```html
|
||||
{{</* columns */>}} <!-- begin columns block -->
|
||||
# Left Content
|
||||
Lorem markdownum insigne...
|
||||
|
||||
<---> <!-- magic separator, between columns -->
|
||||
|
||||
# Mid Content
|
||||
Lorem markdownum insigne...
|
||||
|
||||
<---> <!-- magic separator, between columns -->
|
||||
|
||||
# Right Content
|
||||
Lorem markdownum insigne...
|
||||
{{</* /columns */>}}
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
{{< columns >}}
|
||||
## Left Content
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||
Miseratus fonte Ditis conubia.
|
||||
|
||||
<--->
|
||||
|
||||
## Mid Content
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter!
|
||||
|
||||
<--->
|
||||
|
||||
## Right Content
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||
Miseratus fonte Ditis conubia.
|
||||
{{< /columns >}}
|
@ -1,35 +0,0 @@
|
||||
# Expand
|
||||
|
||||
Expand shortcode can help to decrease clutter on screen by hiding part of text. Expand content by clicking on it.
|
||||
|
||||
## Example
|
||||
### Default
|
||||
|
||||
```tpl
|
||||
{{</* expand */>}}
|
||||
## Markdown content
|
||||
Lorem markdownum insigne...
|
||||
{{</* /expand */>}}
|
||||
```
|
||||
|
||||
{{< expand >}}
|
||||
## Markdown content
|
||||
Lorem markdownum insigne...
|
||||
{{< /expand >}}
|
||||
|
||||
### With Custom Label
|
||||
|
||||
```tpl
|
||||
{{</* expand "Custom Label" "..." */>}}
|
||||
## Markdown content
|
||||
Lorem markdownum insigne...
|
||||
{{</* /expand */>}}
|
||||
```
|
||||
|
||||
{{< expand "Custom Label" "..." >}}
|
||||
## Markdown content
|
||||
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
|
||||
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
|
||||
protulit, sed sed aere valvis inhaesuro Pallas animam: qui _quid_, ignes.
|
||||
Miseratus fonte Ditis conubia.
|
||||
{{< /expand >}}
|
@ -1,15 +0,0 @@
|
||||
---
|
||||
bookCollapseSection: true
|
||||
---
|
||||
|
||||
# Section
|
||||
|
||||
Section renders pages in section as definition list, using title and description.
|
||||
|
||||
## Example
|
||||
|
||||
```tpl
|
||||
{{</* section */>}}
|
||||
```
|
||||
|
||||
{{<section>}}
|
@ -1,22 +0,0 @@
|
||||
---
|
||||
headless: true
|
||||
---
|
||||
|
||||
- [**Example Site**]({{< relref "/docs/example" >}})
|
||||
- [Table of Contents]({{< relref "/docs/example/table-of-contents" >}})
|
||||
- [With ToC]({{< relref "/docs/example/table-of-contents/with-toc" >}})
|
||||
- [Without ToC]({{< relref "/docs/example/table-of-contents/without-toc" >}})
|
||||
- [Collapsed]({{< relref "/docs/example/collapsed" >}})
|
||||
- [3rd]({{< relref "/docs/example/collapsed/3rd-level" >}})
|
||||
- [4th]({{< relref "/docs/example/collapsed/3rd-level/4th-level" >}})
|
||||
<br />
|
||||
|
||||
- **Shortcodes**
|
||||
- [Buttons]({{< relref "/docs/shortcodes/buttons" >}})
|
||||
- [Columns]({{< relref "/docs/shortcodes/columns" >}})
|
||||
- [Expand]({{< relref "/docs/shortcodes/expand" >}})
|
||||
- [Hints]({{< relref "/docs/shortcodes/hints" >}})
|
||||
- [Katex]({{< relref "/docs/shortcodes/katex" >}})
|
||||
- [Mermaid]({{< relref "/docs/shortcodes/mermaid" >}})
|
||||
- [Tabs]({{< relref "/docs/shortcodes/tabs" >}})
|
||||
<br />
|
@ -1,4 +1,4 @@
|
||||
# hugo server --minify --themesDir ... --baseURL=http://0.0.0.0:1313/theme/hugo-book/
|
||||
# hugo server --minify --themesDir ../.. --baseURL=http://0.0.0.0:1313/theme/hugo-book/
|
||||
|
||||
baseURL = 'https://example.com/'
|
||||
title = 'Hugo Book'
|
||||
@ -23,17 +23,18 @@ enableGitInfo = true
|
||||
[languages]
|
||||
[languages.en]
|
||||
languageName = 'English'
|
||||
contentDir = 'content'
|
||||
contentDir = 'content.en'
|
||||
weight = 1
|
||||
|
||||
[languages.ru]
|
||||
languageName = 'Russian'
|
||||
contentDir = 'content.ru'
|
||||
weight = 2
|
||||
|
||||
[languages.zh]
|
||||
languageName = 'Chinese'
|
||||
contentDir = 'content.zh'
|
||||
weight = 2
|
||||
|
||||
[languages.he]
|
||||
languageName = 'Hebrew'
|
||||
contentDir = 'content.he'
|
||||
languageDirection = 'rtl'
|
||||
weight = 3
|
||||
|
||||
[menu]
|
||||
@ -45,7 +46,7 @@ enableGitInfo = true
|
||||
|
||||
[[menu.after]]
|
||||
name = "Hugo Themes"
|
||||
url = "https://themes.gohugo.io/hugo-book/"
|
||||
url = "https://themes.gohugo.io/themes/hugo-book/"
|
||||
weight = 20
|
||||
|
||||
[params]
|
||||
@ -58,13 +59,13 @@ enableGitInfo = true
|
||||
# You can also specify this parameter per page in front matter.
|
||||
BookToC = true
|
||||
|
||||
# (Optional, default none) Set the path to a logo for the book. If the logo is
|
||||
# /static/logo.png then the path would be logo.png
|
||||
# BookLogo = 'logo.png'
|
||||
# (Optional, default favicon.png) Set the path to a favicon file.
|
||||
# If the favicon is /static/favicon.png then the path would be favicon.png
|
||||
# BookFavicon = 'favicon.png'
|
||||
|
||||
# (Optional, default none) Set leaf bundle to render as side menu
|
||||
# When not specified file structure and weights will be used
|
||||
# BookMenuBundle = '/menu'
|
||||
# (Optional, default none) Set the path to a logo for the book.
|
||||
# If the logo is /static/logo.png then the path would be logo.png
|
||||
# BookLogo = 'logo.png'
|
||||
|
||||
# (Optional, default docs) Specify root page to render child pages as menu.
|
||||
# Page is resoled by .GetPage function: https://gohugo.io/functions/getpage/
|
@ -1,4 +1,4 @@
|
||||
# hugo server --minify --themesDir ... --baseURL=http://0.0.0.0:1313/theme/hugo-book/
|
||||
# hugo server --minify --themesDir ../.. --baseURL=http://0.0.0.0:1313/theme/hugo-book/
|
||||
|
||||
baseURL: https://example.com/
|
||||
title: Hugo Book
|
||||
@ -23,15 +23,16 @@ markup:
|
||||
languages:
|
||||
en:
|
||||
languageName: English
|
||||
contentDir: content
|
||||
contentDir: content.en
|
||||
weight: 1
|
||||
ru:
|
||||
languageName: Russian
|
||||
contentDir: content.ru
|
||||
weight: 2
|
||||
zh:
|
||||
languageName: Chinese
|
||||
contentDir: content.zh
|
||||
weight: 2
|
||||
he:
|
||||
languageName: Hebrew
|
||||
contentDir: content.he
|
||||
languageDirection: rtl
|
||||
weight: 3
|
||||
|
||||
menu:
|
||||
@ -41,7 +42,7 @@ menu:
|
||||
url: "https://github.com/alex-shpak/hugo-book"
|
||||
weight: 10
|
||||
- name: "Hugo Themes"
|
||||
url: "https://themes.gohugo.io/hugo-book/"
|
||||
url: "https://themes.gohugo.io/themes/hugo-book/"
|
||||
weight: 20
|
||||
|
||||
params:
|
||||
@ -54,13 +55,13 @@ params:
|
||||
# You can also specify this parameter per page in front matter.
|
||||
BookToC: true
|
||||
|
||||
# (Optional, default none) Set the path to a logo for the book. If the logo is
|
||||
# /static/logo.png then the path would be logo.png
|
||||
# BookLogo: /logo.png
|
||||
# (Optional, default favicon.png) Set the path to a favicon file.
|
||||
# If the favicon is /static/favicon.png then the path would be favicon.png
|
||||
# BookFavicon: "favicon.png"
|
||||
|
||||
# (Optional, default none) Set leaf bundle to render as side menu
|
||||
# When not specified file structure and weights will be used
|
||||
# BookMenuBundle: /menu
|
||||
# (Optional, default none) Set the path to a logo for the book.
|
||||
# If the logo is /static/logo.png then the path would be logo.png
|
||||
# BookLogo: /logo.png
|
||||
|
||||
# (Optional, default docs) Specify root page to render child pages as menu.
|
||||
# Page is resoled by .GetPage function: https://gohugo.io/functions/getpage/
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
||||
{"Target":"book.min.8599444fcc48ee6b435b5b62c955ab7d914fa1e2a453df90c4b97cc9769665d1.css","MediaType":"text/css","Data":{"Integrity":"sha256-hZlET8xI7mtDW1tiyVWrfZFPoeKkU9+QxLl8yXaWZdE="}}
|
14
i18n/am.yaml
Normal file
14
i18n/am.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
- id: Search
|
||||
translation: ፈልግ
|
||||
|
||||
- id: Edit this page
|
||||
translation: ይህንን ገጽ አስተካክል
|
||||
|
||||
- id: Last modified by
|
||||
translation: መጨረሻ የከለሰው ሰው
|
||||
|
||||
- id: Expand
|
||||
translation: አስፋ
|
||||
|
||||
- id: bookSearchConfig
|
||||
translation: '{ cache: true }'
|
@ -8,7 +8,7 @@
|
||||
translation: Última modificación por
|
||||
|
||||
- id: Expand
|
||||
translation: Expand
|
||||
translation: Expandir
|
||||
|
||||
- id: bookSearchConfig
|
||||
translation: '{ cache: true }'
|
||||
|
14
i18n/he.yaml
Normal file
14
i18n/he.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
- id: Search
|
||||
translation: חיפוש
|
||||
|
||||
- id: Edit this page
|
||||
translation: ערוך דף זה
|
||||
|
||||
- id: Last modified by
|
||||
translation: נערך לאחרונה על ידי
|
||||
|
||||
- id: Expand
|
||||
translation: הרחב
|
||||
|
||||
- id: bookSearchConfig
|
||||
translation: '{ cache: true }'
|
14
i18n/nl.yaml
Normal file
14
i18n/nl.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
- id: Search
|
||||
translation: Zoeken
|
||||
|
||||
- id: Edit this page
|
||||
translation: Bewerk deze pagina
|
||||
|
||||
- id: Last modified by
|
||||
translation: Laatst gewijzigd door
|
||||
|
||||
- id: Expand
|
||||
translation: Uitbreiden
|
||||
|
||||
- id: bookSearchConfig
|
||||
translation: '{ cache: true }'
|
14
i18n/oc.yaml
Normal file
14
i18n/oc.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
- id: Search
|
||||
translation: Recercar
|
||||
|
||||
- id: Edit this page
|
||||
translation: Modificar aquesta pagina
|
||||
|
||||
- id: Last modified by
|
||||
translation: Darrièra modificacion per
|
||||
|
||||
- id: Expand
|
||||
translation: Desplegar
|
||||
|
||||
- id: bookSearchConfig
|
||||
translation: '{ cache: true }'
|
14
i18n/pl.yaml
Normal file
14
i18n/pl.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
- id: Search
|
||||
translation: Szukaj
|
||||
|
||||
- id: Edit this page
|
||||
translation: Edytuj stronę
|
||||
|
||||
- id: Last modified by
|
||||
translation: Ostatnia modyfikacja
|
||||
|
||||
- id: Expand
|
||||
translation: Rozwiń
|
||||
|
||||
- id: bookSearchConfig
|
||||
translation: '{ cache: true }'
|
14
i18n/pt-BR.yaml
Normal file
14
i18n/pt-BR.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
- id: Search
|
||||
translation: Buscar
|
||||
|
||||
- id: Edit this page
|
||||
translation: Editar página
|
||||
|
||||
- id: Last modified by
|
||||
translation: Última modificação por
|
||||
|
||||
- id: Expand
|
||||
translation: Expandir
|
||||
|
||||
- id: bookSearchConfig
|
||||
translation: '{ cache: true }'
|
@ -1,5 +1,5 @@
|
||||
- id: Search
|
||||
translation: Buscar
|
||||
translation: Pesquisar
|
||||
|
||||
- id: Edit this page
|
||||
translation: Editar página
|
||||
|
@ -8,6 +8,7 @@
|
||||
<style>
|
||||
.not-found {
|
||||
text-align: center;
|
||||
font-family: 'Consolas', monospace;
|
||||
}
|
||||
.not-found h1 {
|
||||
margin: .25em 0 0 0;
|
||||
@ -29,7 +30,6 @@
|
||||
</main>
|
||||
|
||||
{{ partial "docs/inject/body" . }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
@ -7,7 +7,8 @@
|
||||
{{- define "portable-link" -}}
|
||||
{{- $destination := .Destination }}
|
||||
{{- $isRemote := or (in .Destination ":") (strings.HasPrefix .Destination "//") }}
|
||||
{{- if not $isRemote }}
|
||||
{{- $isFragment := strings.HasPrefix .Destination "#" }}
|
||||
{{- if and (not $isRemote) (not $isFragment) }}
|
||||
{{- $url := urls.Parse .Destination }}
|
||||
{{- $path := strings.TrimSuffix "/_index.md" $url.Path }}
|
||||
{{- $path = strings.TrimSuffix "/_index" $path }}
|
||||
|
@ -1,10 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language.Lang }}" dir="{{ .Site.Language.LanguageDirection | default "ltr" }}">
|
||||
<html lang="{{ default .Site.Language.Lang .Site.LanguageCode }}" dir="{{ default "ltr" .Site.Language.LanguageDirection }}">
|
||||
<head>
|
||||
{{ partial "docs/html-head" . }}
|
||||
{{ partial "docs/inject/head" . }}
|
||||
</head>
|
||||
<body dir="{{ .Site.Language.LanguageDirection | default "ltr" }}">
|
||||
<body dir="{{ default "ltr" .Site.Language.LanguageDirection }}">
|
||||
<input type="checkbox" class="hidden toggle" id="menu-control" />
|
||||
<input type="checkbox" class="hidden toggle" id="toc-control" />
|
||||
<main class="container flex">
|
||||
@ -73,7 +73,7 @@
|
||||
{{ end }}
|
||||
|
||||
{{ define "main" }}
|
||||
<article class="markdown">
|
||||
<article class="markdown book-article">
|
||||
{{- .Content -}}
|
||||
</article>
|
||||
{{ end }}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<h2 class="book-brand">
|
||||
<a class="flex align-center" href="{{ cond (not .Site.Home.File) .Sites.First.Home.RelPermalink .Site.Home.RelPermalink }}">
|
||||
<a class="flex align-center" href="{{ cond (not .Site.Home.File) .Sites.Default.Home.RelPermalink .Site.Home.RelPermalink }}">
|
||||
{{- with .Site.Params.BookLogo -}}
|
||||
<img src="{{ . | relURL }}" alt="Logo" />
|
||||
<img src="{{ . | relURL }}" alt="Logo" class="book-icon" />
|
||||
{{- end -}}
|
||||
<span>{{ .Site.Title }}</span>
|
||||
</a>
|
||||
|
@ -3,4 +3,4 @@
|
||||
Usage: partial "docs/date" (dict "Date" .Date "Format" .Site.Params.BookDateFormat)
|
||||
-->
|
||||
{{- $format := default "January 2, 2006" .Format -}}
|
||||
{{- return (.Date.Format $format) -}}
|
||||
{{- return (time.Format $format .Date) -}}
|
||||
|
@ -3,9 +3,8 @@
|
||||
{{ if and .GitInfo .Site.Params.BookRepo }}
|
||||
<div>
|
||||
{{- $date := partial "docs/date" (dict "Date" .GitInfo.AuthorDate.Local "Format" .Site.Params.BookDateFormat) -}}
|
||||
{{- $commitPath := default "commit" .Site.Params.BookCommitPath -}}
|
||||
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ $commitPath }}/{{ .GitInfo.Hash }}" title='{{ i18n "Last modified by" }} {{ .GitInfo.AuthorName }} | {{ $date }}' target="_blank" rel="noopener">
|
||||
<img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon" alt="Calendar" />
|
||||
<a class="flex align-center" href="{{ partial "docs/links/commit" . }}" title='{{ i18n "Last modified by" }} {{ .GitInfo.AuthorName }} | {{ $date }}' target="_blank" rel="noopener">
|
||||
<img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon" alt="" />
|
||||
<span>{{ $date }}</span>
|
||||
</a>
|
||||
</div>
|
||||
@ -13,8 +12,8 @@
|
||||
|
||||
{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }}
|
||||
<div>
|
||||
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ .Site.Params.contentDir | default "content" }}/{{ replace .File.Path "\\" "/" }}" target="_blank" rel="noopener">
|
||||
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="Edit" />
|
||||
<a class="flex align-center" href="{{ partial "docs/links/edit" . }}" target="_blank" rel="noopener">
|
||||
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="" />
|
||||
<span>{{ i18n "Edit this page" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<img src="{{ "svg/menu.svg" | relURL }}" class="book-icon" alt="Menu" />
|
||||
</label>
|
||||
|
||||
<strong>{{ partial "docs/title" . }}</strong>
|
||||
<h3>{{ partial "docs/title" . }}</h3>
|
||||
|
||||
<label for="toc-control">
|
||||
{{ if default true (default .Site.Params.BookToC .Params.BookToC) }}
|
||||
|
1
layouts/partials/docs/html-head-favicon.html
Normal file
1
layouts/partials/docs/html-head-favicon.html
Normal file
@ -0,0 +1 @@
|
||||
<link rel="icon" href="{{ .Site.Params.BookFavicon | default "favicon.png" | relURL }}" >
|
1
layouts/partials/docs/html-head-title.html
Normal file
1
layouts/partials/docs/html-head-title.html
Normal file
@ -0,0 +1 @@
|
||||
{{ partial "docs/title" . }} | {{ .Site.Title -}}
|
@ -1,28 +1,34 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ default .Summary .Description }}">
|
||||
<meta name="theme-color" content="#FFFFFF">
|
||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff">
|
||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#343a40">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
|
||||
{{- with .Page.Params.BookHref -}}
|
||||
<meta http-equiv="Refresh" content="0; url='{{ . }}'" />
|
||||
{{- end -}}
|
||||
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
|
||||
<title>{{ partial "docs/title" . }} | {{ .Site.Title -}}</title>
|
||||
<title>{{ partial "docs/html-head-title" . }}</title>
|
||||
{{ partial "docs/html-head-favicon" . }}
|
||||
|
||||
{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }}
|
||||
<link rel="manifest" href="{{ $manifest.RelPermalink }}">
|
||||
<link rel="icon" href="{{ "favicon.png" | relURL }}" type="image/x-icon">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
{{- range .Translations }}
|
||||
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}" title="{{ partial "docs/title" . }}">
|
||||
<link rel="alternate" hreflang="{{ default .Site.LanguageCode .Language.Lang }}" href="{{ .Permalink }}" title="{{ partial "docs/title" . }}">
|
||||
{{- end -}}
|
||||
|
||||
<!-- 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" . | css.Sass | resources.Minify | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $styles.RelPermalink }}" {{ template "integrity" $styles }}>
|
||||
|
||||
{{- if default true .Site.Params.BookSearch -}}
|
||||
{{- $searchJSFile := printf "%s.search.js" .Language.Lang }}
|
||||
{{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }}
|
||||
<script defer src="{{ "flexsearch.min.js" | relURL }}"></script>
|
||||
<script defer src="{{ "fuse.min.js" | relURL }}"></script>
|
||||
<script defer src="{{ $searchJS.RelPermalink }}" {{ template "integrity" $searchJS }}></script>
|
||||
{{ end -}}
|
||||
|
||||
@ -31,7 +37,7 @@
|
||||
<script defer src="{{ $swJS.RelPermalink }}" {{ template "integrity" $swJS }}></script>
|
||||
{{ end -}}
|
||||
|
||||
{{- template "_internal/google_analytics_async.html" . -}}
|
||||
{{- template "_internal/google_analytics.html" . -}}
|
||||
|
||||
<!-- RSS -->
|
||||
{{- with .OutputFormats.Get "rss" -}}
|
||||
|
@ -23,7 +23,7 @@
|
||||
<ul>
|
||||
{{ range .Site.Languages }}{{ with index $translations .Lang }}
|
||||
<li>
|
||||
<a href="{{ .Permalink }}">
|
||||
<a href="{{ cond hugo.IsMultihost .Permalink .RelPermalink }}">
|
||||
{{ .Language.LanguageName }}
|
||||
</a>
|
||||
</li>
|
||||
|
2
layouts/partials/docs/links/commit.html
Normal file
2
layouts/partials/docs/links/commit.html
Normal file
@ -0,0 +1,2 @@
|
||||
{{- $commitPath := default "commit" .Site.Params.BookCommitPath -}}
|
||||
{{- .Site.Params.BookRepo }}/{{ $commitPath }}/{{ .GitInfo.Hash -}}
|
2
layouts/partials/docs/links/edit.html
Normal file
2
layouts/partials/docs/links/edit.html
Normal file
@ -0,0 +1,2 @@
|
||||
{{- $bookFilePath := (strings.TrimPrefix hugo.WorkingDir .Page.File.Filename | path.Join) -}}
|
||||
{{- .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}{{ ($bookFilePath) -}}
|
@ -1,5 +0,0 @@
|
||||
{{ with .Site.GetPage .Site.Params.BookMenuBundle }}
|
||||
{{- $href := printf "href=\"%s\"" $.RelPermalink -}}
|
||||
{{- replace .Content $href (print $href "class=active") | safeHTML -}}
|
||||
{{- warnf "Bundle menu mode is deprecated and will be removed" -}}
|
||||
{{ end }}
|
@ -9,7 +9,7 @@
|
||||
|
||||
{{ define "book-section-children" }}{{/* (dict "Section" .Section "CurrentPage" .CurrentPage) */}}
|
||||
<ul>
|
||||
{{ range (where .Section.Pages "Params.bookhidden" "ne" true) }}
|
||||
{{ range (where .Section.Pages "Params.bookHidden" "ne" true) }}
|
||||
{{ if .IsSection }}
|
||||
<li {{- if .Params.BookFlatSection }} class="book-section-flat" {{ end -}}>
|
||||
{{ template "book-page-link" (dict "Page" . "CurrentPage" $.CurrentPage) }}
|
||||
@ -28,15 +28,19 @@
|
||||
{{ $current := eq .CurrentPage .Page }}
|
||||
{{ $ancestor := .Page.IsAncestor .CurrentPage }}
|
||||
|
||||
{{ if .Page.Params.bookCollapseSection }}
|
||||
{{ if .Page.Params.BookCollapseSection }}
|
||||
<input type="checkbox" id="section-{{ md5 .Page }}" class="toggle" {{ if or $current $ancestor }}checked{{ end }} />
|
||||
<label for="section-{{ md5 .Page }}" class="flex justify-between">
|
||||
<a {{ if .Page.Content }}href="{{ .Page.Permalink }}"{{ else }}role="button"{{ end }} class="{{ if $current }}active{{ end }}">
|
||||
<a {{ if .Page.Content }}href="{{ .Page.RelPermalink }}"{{ else }}role="button"{{ end }} class="{{ if $current }}active{{ end }}">
|
||||
{{- partial "docs/title" .Page -}}
|
||||
</a>
|
||||
</label>
|
||||
{{ else if .Page.Params.BookHref }}
|
||||
<a href="{{ .Page.Params.BookHref }}" class="{{ if $current }}active{{ end }}" target="_blank" rel="noopener">
|
||||
{{- partial "docs/title" .Page -}}
|
||||
</a>
|
||||
{{ else if .Page.Content }}
|
||||
<a href="{{ .Page.Permalink }}" class="{{ if $current }} active{{ end }}">
|
||||
<a href="{{ .Page.RelPermalink }}" class="{{ if $current }}active{{ end }}">
|
||||
{{- partial "docs/title" .Page -}}
|
||||
</a>
|
||||
{{ else }}
|
||||
|
@ -10,7 +10,7 @@
|
||||
<ul>
|
||||
{{ range . }}
|
||||
<li>
|
||||
<a href="{{ .URL }}" {{ if not .Page }}target="_blank" rel="noopener"{{ end }}>
|
||||
<a href="{{ .URL }}" {{ with .Params.class }}class="{{ . }}"{{ end }} {{ if not .Page }}target="_blank" rel="noopener"{{ end }}>
|
||||
{{- .Pre -}}
|
||||
{{ with .Page }}
|
||||
{{ partial "docs/title" .Page }}
|
||||
|
@ -1,18 +1,14 @@
|
||||
<nav>
|
||||
{{ partial "docs/brand" . }}
|
||||
{{ partial "docs/search" . }}
|
||||
{{ if .Site.IsMultiLingual }}
|
||||
{{ if hugo.IsMultilingual }}
|
||||
{{ partial "docs/languages" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "docs/inject/menu-before" . }}
|
||||
{{ partial "docs/menu-hugo" .Site.Menus.before }}
|
||||
|
||||
{{ if .Site.Params.BookMenuBundle }}
|
||||
{{ partial "docs/menu-bundle" . }}
|
||||
{{ else }}
|
||||
{{ partial "docs/menu-filetree" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "docs/menu-hugo" .Site.Menus.after }}
|
||||
{{ partial "docs/inject/menu-after" . }}
|
||||
|
@ -1,23 +1,16 @@
|
||||
{{ with .Date }}
|
||||
<h5>{{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }}</h5>
|
||||
<div class="flex align-center text-small book-post-date">
|
||||
<img src="{{ "svg/calendar.svg" | relURL }}" class="book-icon " alt="" />
|
||||
<span>{{ partial "docs/date" (dict "Date" . "Format" $.Site.Params.BookDateFormat) }}</span>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ range $taxonomy, $_ := .Site.Taxonomies }}
|
||||
{{ with $terms := $.GetTerms $taxonomy }}
|
||||
<div>
|
||||
<div class="text-small">
|
||||
{{ range $n, $term := $terms }}{{ if $n }}, {{ end }}
|
||||
<a href="{{ $term.RelPermalink }}">{{ $term.Title }}</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Params.image }}
|
||||
<p>
|
||||
{{ with .Resources.GetMatch .Params.image }}
|
||||
<img src={{ .RelPermalink }} />
|
||||
{{ else }}
|
||||
<img src={{ .Params.image | relURL }} />
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
@ -1,7 +1,8 @@
|
||||
{{ if default true .Site.Params.BookSearch }}
|
||||
<div class="book-search">
|
||||
<div class="book-search hidden">
|
||||
<input type="text" id="book-search-input" placeholder="{{ i18n "Search" }}" aria-label="{{ i18n "Search" }}" maxlength="64" data-hotkeys="s/" />
|
||||
<div class="book-search-spinner hidden"></div>
|
||||
<ul id="book-search-results"></ul>
|
||||
</div>
|
||||
<script>document.querySelector(".book-search").classList.remove("hidden")</script>
|
||||
{{ end }}
|
||||
|
@ -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 }}
|
||||
|
@ -5,12 +5,12 @@
|
||||
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
|
||||
</h2>
|
||||
{{ partial "docs/post-meta" . }}
|
||||
<p>
|
||||
<div class="book-post-content">
|
||||
{{- .Summary -}}
|
||||
{{ if .Truncated }}
|
||||
<a href="{{ .RelPermalink }}">...</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
{{ define "main" }}
|
||||
<article class="markdown">
|
||||
<article class="markdown book-post">
|
||||
<h1>
|
||||
<a href="{{ .RelPermalink }}">{{ partial "docs/title.html" . }}</a>
|
||||
{{ partial "docs/title.html" . }}
|
||||
</h1>
|
||||
{{ partial "docs/post-meta" . }}
|
||||
<div class="book-post-content">
|
||||
{{- .Content -}}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
{{ $ref := "" }}
|
||||
{{ $target := "" }}
|
||||
{{ with .Get "href" }}
|
||||
{{ $ref = . }}
|
||||
{{ $target = "_blank" }}
|
||||
{{ end }}
|
||||
{{ with .Get "relref" }}
|
||||
{{ $ref = relref $ . }}
|
||||
{{ end }}
|
||||
{{- $ref := "" }}
|
||||
{{- $target := "" -}}
|
||||
{{- with .Get "href" -}}
|
||||
{{- $ref = . -}}
|
||||
{{- $target = "_blank" -}}
|
||||
{{- end -}}
|
||||
{{- with .Get "relref" -}}
|
||||
{{- $ref = relref $ . -}}
|
||||
{{- end -}}
|
||||
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ $.Inner | markdownify }}
|
||||
{{- .InnerDeindent -}}
|
||||
</a>
|
||||
|
@ -1,7 +1,9 @@
|
||||
<div class="book-columns flex flex-wrap">
|
||||
{{ range split .Inner "<--->" }}
|
||||
<div class="flex-even markdown-inner">
|
||||
{{ . | $.Page.RenderString }}
|
||||
{{- $ratio := (split (.Get "ratio") ":") -}}
|
||||
<div class="book-columns flex flex-wrap{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ range $index, $content := split .InnerDeindent "<--->" }}
|
||||
{{- $grow := default 1 (index $ratio $index) -}}
|
||||
<div class="flex-even markdown-inner" style="flex-grow: {{ $grow }};">
|
||||
{{ $content | safeHTML }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<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 }}</summary>
|
||||
<div class="markdown-inner">
|
||||
{{ .Inner | markdownify }}
|
||||
{{ .InnerDeindent | safeHTML }}
|
||||
</div>
|
||||
</details>
|
||||
|
@ -1,13 +0,0 @@
|
||||
{{ warnf "Expand shortcode is deprecated. Use 'details' instead." }}
|
||||
<div class="book-expand">
|
||||
<label>
|
||||
<div class="book-expand-head flex justify-between">
|
||||
<span>{{ default (i18n "Expand") (.Get 0) }}</span>
|
||||
<span>{{ default "↕" (.Get 1) }}</span>
|
||||
</div>
|
||||
<input type="checkbox" class="hidden" />
|
||||
<div class="book-expand-content markdown-inner">
|
||||
{{ .Inner | markdownify }}
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
@ -1,3 +1,3 @@
|
||||
<blockquote class="book-hint {{ .Get 0 }}">
|
||||
{{ .Inner | markdownify }}
|
||||
{{ .Inner | safeHTML }}
|
||||
</blockquote>
|
||||
|
1
layouts/shortcodes/html.html
Normal file
1
layouts/shortcodes/html.html
Normal file
@ -0,0 +1 @@
|
||||
{{- .Inner | safeHTML -}}
|
2
layouts/shortcodes/i18n.html
Normal file
2
layouts/shortcodes/i18n.html
Normal file
@ -0,0 +1,2 @@
|
||||
{{- $content := .Get 0 -}}
|
||||
{{- default $content (i18n $content) -}}
|
@ -1,5 +1,5 @@
|
||||
{{- if not (.Page.Scratch.Get "katex") -}}
|
||||
<!-- Include katext only first time -->
|
||||
<!-- Include katex only first time -->
|
||||
<link rel="stylesheet" href="{{ "katex/katex.min.css" | relURL }}" />
|
||||
<script defer src="{{ "katex/katex.min.js" | relURL }}"></script>
|
||||
<script defer src="{{ "katex/auto-render.min.js" | relURL }}" onload="renderMathInElement(document.body);"></script>
|
||||
@ -7,7 +7,7 @@
|
||||
{{- end -}}
|
||||
|
||||
<span {{- with .Get "class" }} class="{{ . }}"{{ end }}>
|
||||
{{ cond (in .Params "display") "\\[" "\\(" -}}
|
||||
{{- trim .Inner "\n" -}}
|
||||
{{- cond (in .Params "display") "\\]" "\\)" }}
|
||||
{{ with .Get "display" }}\[{{else}}\({{end}}
|
||||
{{- .InnerDeindent -}}
|
||||
{{ with .Get "display" }}\]{{else}}\){{end}}
|
||||
</span>
|
||||
|
@ -7,6 +7,6 @@
|
||||
{{ .Page.Scratch.Set "mermaid" true }}
|
||||
{{ end }}
|
||||
|
||||
<p class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
<pre class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{- .Inner -}}
|
||||
</p>
|
||||
</pre>
|
||||
|
@ -1,10 +1,13 @@
|
||||
{{- warnf "Section shortcode is deprecated and will be removed" -}}
|
||||
<dl>
|
||||
{{ range .Page.Pages }}
|
||||
<dt>
|
||||
<a href="{{ .RelPermalink }}">{{ partial "docs/title" . }}</a>
|
||||
</dt>
|
||||
{{ if (in $.Params "summary") -}}
|
||||
<dd class="markdown-inner">
|
||||
{{ default .Summary .Description }}
|
||||
</dd>
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
</dl>
|
||||
|
@ -1,12 +1,9 @@
|
||||
{{ if .Parent }}
|
||||
{{ $name := .Get 0 }}
|
||||
{{ $group := printf "tabs-%s" (.Parent.Get 0) }}
|
||||
|
||||
{{ if not (.Parent.Scratch.Get $group) }}
|
||||
{{ .Parent.Scratch.Set $group slice }}
|
||||
{{ end }}
|
||||
|
||||
{{ .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }}
|
||||
{{ else }}
|
||||
{{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }}
|
||||
{{ end}}
|
||||
{{- $group := printf "tabs-%v" (default .Parent.Ordinal (.Parent.Get 0)) -}}
|
||||
{{- $tab := printf "%s-%d" $group .Ordinal }}
|
||||
<input type="radio" class="toggle" name="{{ $group }}" id="{{ $tab }}" {{ if not .Ordinal }}checked="checked"{{ end }} />
|
||||
<label for="{{ $tab }}">
|
||||
{{- .Get 0 -}}
|
||||
</label>
|
||||
<div class="book-tabs-content markdown-inner">
|
||||
{{- .Inner -}}
|
||||
</div>
|
||||
|
@ -1,15 +1,3 @@
|
||||
{{ if .Inner }}{{ end }}
|
||||
{{ $id := .Get 0 }}
|
||||
{{ $group := printf "tabs-%s" $id }}
|
||||
|
||||
<div class="book-tabs">
|
||||
{{- range $index, $tab := .Scratch.Get $group -}}
|
||||
<input type="radio" class="toggle" name="{{ $group }}" id="{{ printf "%s-%d" $group $index }}" {{ if not $index }}checked="checked"{{ end }} />
|
||||
<label for="{{ printf "%s-%d" $group $index }}">
|
||||
{{- $tab.Name -}}
|
||||
</label>
|
||||
<div class="book-tabs-content markdown-inner">
|
||||
{{- .Content | markdownify -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{ .Inner }}
|
||||
</div>
|
||||
|
@ -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 }}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user