Compare commits

...

359 Commits
v2 ... master

Author SHA1 Message Date
Micah R Ledbetter 115a94122e
Add scrollbar-gutter: stable (#703) 2025-04-07 15:42:04 +02:00
sfavazza 8aa692f195
fix: correct hint shortcodes rendering in lists (#699)
Co-authored-by: Samuele Favazza <samuele.favazza@duagon.com>
2025-04-07 15:38:25 +02:00
gobai 44fa55ddde
fix: change article title from h2 to h1 in single.html (#694)
Signed-off-by: go-bai <599500688@qq.com>
2025-04-07 15:25:20 +02:00
Paweł Sobótka 95bef1b75f
i18n: Add Polish translations (#690)
This adds Polish (PL/🇵🇱) translations within i18n directory.
2025-04-07 15:17:44 +02:00
Vadim (vadcx) 6c86dcfdc6
Docs: Change tabs shortcode example to permit unsafe=false (#689)
The syntax of `{{% code %}}` only expects Markdown inside. That's why it
triggers unsafe warning, if used as a shortcode template.

Instead the only the top table shortcode should be used as
`{{< tabs >}}` to include the HTML, while the user may use only
`{{% tab "Name" %}}` inside and be happily restricted to Markdown.

https://gohugo.io/methods/page/rendershortcodes/#shortcode-notation
https://github.com/InfosecForActivistsTeam/infosec-activists/pull/45
2025-04-07 15:17:19 +02:00
Alex Shpak 645c868cec Hotfix: tabs: improve unique id serialization 2025-02-03 23:19:43 +01:00
ensag-dev fb701f6f7f
i18n: Create oc.yaml (#682) 2025-01-31 00:20:22 +01:00
Alex Shpak 4ebdff516a Add resources to gitignore 2025-01-31 00:10:01 +01:00
Alex Shpak fbb94a56b2 Remote resources folder, not needed for demo sites anymore 2025-01-31 00:09:43 +01:00
Alex Shpak 60f4c03b8b #672: Add tabs unique ID for nested tabs, uses .Ordinal by default 2025-01-30 22:03:07 +01:00
mvtango f889e52566
Three hugo deprecations (#664)
* as per deprecation note: ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.137.0. Use hugo.IsMultilingual instead.

* as per deprecation note: ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.137.0. Use hugo.IsMultilingual instead.

* deprecated: .Sites.First was deprecated in Hugo v0.127.0 and will be removed in a future release.

* as per deprecation note: ERROR deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0 and will be removed in Hugo 0.137.0. Use hugo.IsMultilingual instead.

* resources.ToCSS was deprecated in Hugo v0.128.0 and will be removed in a future release. Use css.Sass instead.

* ignore ressources from example site
2025-01-29 02:46:56 +01:00
Alex Shpak 7c78a39c53 Align spacings and colors in titles and buttons 2024-10-09 23:27:54 +02:00
Alex Shpak e4c062890b Switch to font-display: fallback to reduce flickering 2024-10-09 17:05:20 +02:00
Alex Shpak 2b7a0e87c3 Deprecate section shortcode 2024-10-08 15:50:46 +02:00
Alex Shpak f8a0e8976b Rewrite tabs shortcode to make them simpler 2024-10-08 15:49:39 +02:00
Alex Shpak 1bda9fb34d Introduce i18n shortcode to add translated strings to markdown pages 2024-10-08 13:57:33 +02:00
Alex Shpak 21e7727a0e Update generated styles 2024-10-04 15:35:43 +02:00
Alex Shpak a5fdf88017 let numbered plugin count nested headings 2024-10-04 15:35:02 +02:00
loikein 15c85acfcd
add number for mobile toc, fix order for nested titles (#555)
Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2024-10-04 15:32:07 +02:00
Alex Shpak d008a21049 Fix syntax in Katex markdown file 2024-10-04 13:41:30 +02:00
Alex Shpak 9cc0b0225d #422, add support for column ratios in shortcode 2024-10-04 13:36:14 +02:00
Alex Shpak 925dbd3b9f Breaking change: switch to '{{%' decorators in shortcodes to better support shortcode-in-shortcode 2024-10-04 11:29:44 +02:00
Alex Shpak 69886cc74b Update favicon, move to separate shortcode for customization 2024-10-04 10:59:28 +02:00
Alex Shpak e585c86a81 Update Roboto font and use optional swap 2024-10-03 13:59:55 +02:00
Alex Shpak 3f56e60b6d #414, Move commit and edit links to separate pertials to allow overwrites 2024-10-02 23:16:25 +02:00
Alex Shpak a424a062ca #489: use Rel or Permalink depending on if site is multihost 2024-10-02 16:34:48 +02:00
Alex Shpak 31662538df Remove deprecated bundle/leaf menu type 2024-10-02 16:14:53 +02:00
Alex Shpak 2f64607bc9 Update pos list styles, remove self link from post 2024-10-02 13:25:16 +02:00
Alex Shpak 35bf672b70 Use .InnerDeindent in inline shortcodes 2024-10-02 12:02:41 +02:00
Alex Shpak 2b7b9c3c79 #640: fix line number alignment in code block 2024-10-02 01:45:03 +02:00
anatawa12 657807f879
fix: hreflang for link rel=alternate uses site language code (#654) 2024-10-01 23:37:54 +02:00
Alex Shpak b655b0b7b7 Add horizontal spacing between buttons 2024-10-01 23:34:25 +02:00
Alex Shpak 55c4c45c74 Remove 'expand' shortcode, use 'details' instead 2024-10-01 23:28:57 +02:00
Alex Shpak 3f6dec2482 Bump KaTeX to 0.16.11 2024-10-01 22:50:27 +02:00
Alex Shpak e6d4fbc186 Upgarde mermaidjs to 11.2.1 2024-10-01 22:45:51 +02:00
FuadEfendi 94edf47a12
Fix for spaces being removed during "minify" build for "mermaid" snippet (#613)
"mindmap" style is not rendered correctly with "--minify"  because spaces are removed from final HTML
2024-10-01 22:24:24 +02:00
Rojax 8d56f3fe84
fix: Fixed edit page support for multilang books (#630) 2024-10-01 22:17:03 +02:00
Gram 460d44479b
Auto-generate ID for tabs (#649) 2024-10-01 22:14:16 +02:00
Alex Shpak b25c58878c Bump minimum version in readme to 0.134 2024-10-01 22:07:11 +02:00
Andreas Deininger e54cf3e6d1
Fix deprecation warnings, upgrade to hugo 0.134 (#653) 2024-10-01 21:52:34 +02:00
Michael Schmetter 3588e36948
Update README.md, fixing broken link (#655) 2024-10-01 21:51:36 +02:00
Daniël van de Giessen c19a0a60ff
Add Dutch translations (#631) 2024-09-02 15:03:12 +02:00
Leo Heitmann Ruiz 8e66fc7613
Fix link in README (#618) 2024-09-02 14:58:01 +02:00
Alex Shpak 7c26d9b8b7 Update minimum hugo version in README 2024-05-18 13:14:20 +02:00
Alex Shpak e104a11f42 #582, use time.Format for date formatting 2024-05-18 12:48:43 +02:00
Alex Shpak 90eab4a917 #591, hide search field if JS is not enabled 2024-05-18 12:44:13 +02:00
Alex Shpak ecbe879801 Set minimum hugo version to 0.124 2024-05-18 12:36:23 +02:00
Rajesh Duggal eff55ecd56
Change "config.toml" to "hugo.toml" in the README.md documentation (#596) 2024-05-18 12:32:29 +02:00
Eitan Adler 1c78b920b0
replace .Site.IsMultiLingual with hugo.IsMultilingual (#609)
# Problem

The warning
```
INFO  deprecated: .Site.IsMultiLingual was deprecated in Hugo v0.124.0
and will be removed in a future release. Use hugo.IsMultilingual
instead.``

shows up

# Solution

Follow the deprecation warning
2024-05-18 12:31:58 +02:00
wenbingzhang 1c42a96572
Replace flexsearch with fusejs (#600)
Co-authored-by: 张文兵 <wenbing@mgtv.com>
2024-05-18 12:29:55 +02:00
Essa Alshammri f8a0fc4e24
Add direction ltr to pre > code and highlight (#611)
* Add direction ltr to pre > code and highlight
* Add unicode-bidi: embed;
2024-04-13 11:19:59 +02:00
Leo Heitmann Ruiz 0baec34596
Use null alt text when icon is next to action (#610) 2024-04-13 11:18:14 +02:00
Leo Heitmann Ruiz 2dffe0bc7a
Make image path absolute (#593) 2024-03-11 14:12:18 +01:00
Leo Heitmann Ruiz da22a41f60
Update link to hugo themes (#590) 2024-03-11 14:11:32 +01:00
Alex Shpak a8b156250b #589, change hugo extended url 2024-03-11 13:42:39 +01:00
Alex Shpak a111041867 #583, fix katex and mermaid examples with raw html 2024-02-17 18:57:02 +01:00
Alex Shpak 01645fc56d #521: add canonical url to the header 2024-02-17 18:04:57 +01:00
Alex Shpak cba1eb611a Upgrade mermaidjs to 10.8.0 2024-02-17 17:36:33 +01:00
Andreas Deininger 5e15ddb4f4
Fix typos (#575) 2024-01-10 12:40:24 +01:00
Andreas Deininger 2d7ce27f77
Fix: make use of .Site.Params.BookFavicon (#576) 2024-01-10 12:39:18 +01:00
Alex Shpak 118997fa92 #524: Disable numbered plugin for non-article pages 2023-12-05 00:33:41 +01:00
李宗英 14e14f60ae
fix server worker is blocked (#565)
* fix server worker is blocked

* Also use relURL in manifest

---------

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2023-12-04 22:25:48 +01:00
Alex Shpak 3f1bcccbfb #543, Add summary param for section shortcode 2023-08-08 13:39:20 +02:00
auwsom e7155b473a
Themes dir correction and peaceiris deploy to GitHub Pages (#506)
* commit

* commit

* remove push to /public

---------

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2023-08-08 13:08:03 +02:00
Alex Shpak 16f6203f90 #455, add BookFavicon parameter 2023-08-08 12:40:46 +02:00
nobu1308 1cebd589f6
Update meta theme-color in html-head.html (#527)
theme-color that works in both light and dark mode
2023-08-08 12:10:07 +02:00
Miguel Pimentel 36a7e32815
Update es.yaml (#547)
Added translation for 'Expand'.
Should be 'Expandir' instead.
2023-08-08 12:09:31 +02:00
Alex Shpak d86d5e70c7 Reset generated CSS in example site 2023-04-24 15:41:11 +02:00
Alex Shpak 26fee5551f #528: hotfix for search, until we find a reason 2023-04-24 15:40:42 +02:00
Kanematsu Gaku 12de4671e3
Add "word-break" to list. (#534) 2023-04-24 13:07:08 +02:00
Kanematsu Gaku 9c8210d99b
Format CSS (#535) 2023-04-24 13:06:20 +02:00
Kenta Nakase 036e037a63
Update step for creating site from scratch to use content.en path (#508)
Co-authored-by: parroty <parroty@users.noreply.github.com>
Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2023-02-13 23:05:05 +01:00
Alex Shpak 61bb57f32e #496, update content folder name in readme 2023-02-13 22:23:42 +01:00
Gerasimos (Makis) Maropoulos d5b75f4fb3
README.md: fix link path to content.en (#497) 2022-11-11 11:08:54 +01:00
Alex Shpak 3d2bfec186 #445, Upgrade mermaid to 9.2.0 2022-11-03 00:28:15 +01:00
Alex Shpak 412f140762 Bump minimal hugo version to 0.79 2022-11-03 00:11:38 +01:00
Alex Shpak 1318a717ed #441, add menu.params.class support 2022-11-02 23:42:10 +01:00
Alex Shpak 9013a1f457 #352: move english content to content.en 2022-11-02 23:28:30 +01:00
Alex Shpak 6e1b44c4c4 #452: Put double comments on shortcodes 2022-11-02 23:09:40 +01:00
Mikey Lombardi (He/Him) 6090fddebd
(MAINT) Respect LinkTitle in page metadata (#483)
Prior to this commit, the partial for determining a page title used the
`Title` property of a page, if present, or humanized and titleized the
file name if not.

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

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

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

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

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

[01]: https://gohugo.io/content-management/front-matter/
[02]: https://gohugo.io/content-management/menus/#nesting
[03]: https://gohugo.io/variables/menus/#menu-entry-variables
2022-10-05 10:01:03 +02:00
Dongliang Yin 317ccae23b
Remove left pagination spacing (#467) 2022-08-02 12:57:40 +02:00
Alexander Danilov c024538604
Ignore code block clicks with active selection (#448) 2022-07-04 08:55:54 +02:00
Alex Shpak 4ef38f3bbf Add .hugo_build.lock to .gitignore 2022-04-26 13:43:10 +02:00
Alex Shpak 1852b16d93 #440L Adjust bookHref, check .Content again, add redirect 2022-04-26 13:14:22 +02:00
Horea Christian c2014a08a5
Add BookHref, set explicit URL for the menu (#440) 2022-04-26 13:10:39 +02:00
Leone G faede5e749
Add Amharic language translations (#444) 2022-04-26 11:35:50 +02:00
Giuseppe Masino 98d19b8e95
Make menu entries' link relative (#421)
This change allows hugo to build pages correcly when
`canonifyURLs = false` and `relativeURLs = true`.
Otherwise the links on the menu will be canonicalized regardless of
configuration.
This results in broken sites in a number of situations, such as sites
served behind a reverse-proxy that don't want to account for the prefix
they're served under.
2022-02-18 17:35:02 +01:00
Andreas Deininger 5581ec0845
REDAME: Katex to KaTeX (#416) 2022-02-14 15:44:11 +01:00
Alex Shpak 3a65df3a76 #408, #410: Use LanguageCode in templates if specified 2022-01-13 19:20:02 +01:00
shawn.ye fb0863a27a
Prevent breaked-lines in <p> (#404) 2022-01-13 16:52:03 +01:00
Samuel Redai 2f60f0919f
Updating book to hugo-book in README (#394)
Looks like the path `/book/` in the readme should be `/hugo-book/`.
2021-12-01 10:43:39 +01:00
Alex Shpak 2e693816ae #385: Do not focus search field if current element has value 2021-11-19 14:24:28 +01:00
QIN2DIM c47eb7388a
Rename theme in readmin to hugo-book (#386)
* Update README.md
* Update README.md

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2021-11-19 13:33:01 +01:00
Alex Shpak 8bb6d7ebec #369, switch to google_analytics.html internal template 2021-10-19 22:05:41 +02:00
Nikolay Raspopov 6c3d1e942a
Removed extra Google Analitics include (#389)
It's already included via "docs/html-head" partial.
2021-10-19 21:56:36 +02:00
Jack Morgan 9d4916fcc2
Allow site title to be customised via parital (#384)
* Allow site title to be customised via parital
* Modify readme to highlight available partials
* Rename template for consistency
* Move title tags to head partial
2021-09-27 09:36:02 +02:00
xhdix f2fb37b1ad
add color-scheme to head-html (#387) 2021-09-26 21:47:58 +02:00
Alex Shpak d6087bd32d Add hugo init to install instructions 2021-09-11 21:27:19 +02:00
Alex Shpak 15ef744c94 Rollback flexsearch for now 2021-09-08 23:41:49 +02:00
Michael T Lombardi (He/Him) 6aef8ef1c7
(GH-375) Enable use as a hugo module (#376)
This commit does the minimal work to make the Book theme a functional
hugo module by adding the go.mod file and including instructions in
the project README for use.

Resolves #375
2021-09-07 22:05:33 +02:00
Alex Shpak a656d711bf Upgrade flexsearch and mermaid 2021-08-30 14:47:27 +02:00
Alex Shpak 0cde2e461d #370: Allow markdown in details shortcode, also change markdownify to RenderString in other shortcodes 2021-08-30 14:32:11 +02:00
Alex Shpak 4c1de2b3de #374: set auto height for images in markdown 2021-08-30 14:15:57 +02:00
Alex Shpak 26de844a19 #343, #165: Move lang selector to left menu 2021-08-18 11:12:58 +02:00
Alex Shpak 50147be131
Update README.md 2021-07-25 22:44:14 +02:00
Alex Shpak deb00bcad2
Update theme.toml 2021-07-25 22:41:58 +02:00
逊狼 92d97049cf
issues 362 (#364)
* 🐞 fix issues 352

Solve this problem:
https://github.com/alex-shpak/hugo-book/issues/352

The Reason:
https://github.com/gohugoio/hugo/issues/8688

* fix issues 362

https://github.com/alex-shpak/hugo-book/issues/362

* Revert "🐞 fix issues 352"

This reverts commit 58f8935d1e.

* Revert "Revert "🐞 fix issues 352""

This reverts commit fa0d46ccf5.

* fix issues 362

* Update columns.html

* Revert "Revert "Revert "🐞 fix issues 352"""

This reverts commit 79777a9e84.

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2021-07-20 16:20:43 +02:00
Marco Guerrini c4d69635af
Added italian translation (#356) 2021-07-01 11:26:02 +02:00
xhdix e939f40314
Add Farsi with support for search RTL texts (#350)
Farsi/Parsi/Persian
2021-06-21 21:11:36 +02:00
xhdix 0d2ed5586e
Change collapsed icon in menu for RTL pages (#354) 2021-06-21 20:18:14 +02:00
xhdix 379e311d7e
Fix menu not working in RTL menu (#349) 2021-06-08 10:08:46 +02:00
Nikolay Raspopov 4540d66e3b
Document removal of internal hugo templates (#345) 2021-05-27 09:11:13 +02:00
Alex Shpak fde10f1319 #285, skip integrity attribute if site is built without hostname 2021-05-21 00:50:38 +02:00
Alex Shpak f6e8d1b693 Add deprecation notice for menu bundle 2021-05-21 00:46:53 +02:00
Nikolay Raspopov 345cb5d947
Prefer existing and translated variant of home page (#342)
* Prefer existing and translated variant of home page as the site link in the menu header.
* More compact "cond"-version of fix.
2021-05-20 22:02:31 +02:00
Alex Shpak 553d378db3 Fix lighthouse remarks: icon sizes, noopener 2021-05-20 19:00:15 +02:00
Alex Shpak 195138cad0 Update roboto fonts 2021-05-20 11:28:51 +02:00
Alex Shpak 9b2e21f870 Refactor search, syntax error 2021-05-19 20:28:21 +02:00
Alex Shpak d7c644f0e7 Refactor search, prepare for pre-built indexing 2021-05-19 20:26:21 +02:00
Alex Shpak 843144dd85 Regression, fix menu reset script 2021-05-19 20:12:27 +02:00
Nikolay Raspopov 4d936a55d8
Fixed ineffective "disableHugoGeneratorInject" parameter (#337)
Fixed issue #336. HUGO does not use `{{ hugo.Generator }}` placeholder anymore.
2021-05-06 09:33:18 +02:00
Alex Shpak 6720168dd5 #281, Copy code block content on click 2021-05-03 23:52:00 +02:00
Alex Shpak 6a1932611c Update MermaidJS example 2021-05-03 23:14:20 +02:00
Alex Shpak e611f564bb Update archetypes 2021-05-03 23:06:43 +02:00
Alex Shpak f4a26ff3da Imporove sectiopn shortcode example 2021-05-03 22:59:33 +02:00
Alex Shpak 9e9c7d3403 Improve posts title rendering 2021-05-03 22:05:25 +02:00
Alex Shpak c197f3399b #286, Add ability to set image for posts 2021-05-03 21:47:19 +02:00
Pim Snel e0823c2138
collapsed menu right arrow, uncollapsed down arrow (#332) 2021-05-03 21:18:49 +02:00
Hsin-Hsiang Peng 51140a8026
add Traditional Chinese i18n translation (#335)
Add the Traditional Chinese i18n translation for language code "zh-TW".

Ref: https://discourse.gohugo.io/t/i18n-support-for-language-country-code/20303
2021-05-03 21:17:44 +02:00
Pim Snel 62004506e2
change master to github's new default main branch (#325) 2021-04-11 17:51:42 +02:00
Collin Brooks ba38e17b1b
Add custom commit path for last edited link (#319)
- A new `BookCommitPath` paramter was added that allows the 'commit'
   portion of the link to a page's last edited commit hash to be
   specified.
 - This is useful when github is not the default repository for a
   project.

Co-authored-by: Collin Brooks <cbrooks@sentryds.com>
2021-04-11 17:50:54 +02:00
Collin Brooks e2786374ad
Add documentation for mermaid init config override (#317)
* Add documentation for mermaid init config override
* Capitalize Mermaid

Co-authored-by: Collin Brooks <cbrooks@sentryds.com>
2021-04-11 17:49:09 +02:00
Abu Zafar 1e4bcc2cc3
Mj abuz patch 2 (#314)
* Create bn.yml

Adding Bengali (BN)

* Create _index.md

Bengali(BN)

* Rename bn.yml to bn.yaml

Typo Mistake
2021-03-08 12:27:50 +01:00
Caleb Jasik 9791db1ce7
Bug Fix: Empty .Site.Params.contentDir (#312)
* Bug Fix: Empty .Site.Params.contentDir

When .Site.Params.contentDir is left as the default: "content", calling .Site.Params.contentDir returns nothing, or maybe an empty string. To fix this, we set a default value for .Site.Params.contentDir to "content" and the url is built correctly.

* Use the `default` function instead of `or`

https://gohugo.io/functions/default/
2021-02-22 19:48:49 +01:00
Nikolay Raspopov 27c1791144
Let's enable markdown in the button title (#308)
Added " | markdownify" to the inner text of button.
2021-02-19 11:55:53 +01:00
Nikolay Raspopov cb57401039
Added default dir="ltr" (#307)
Added default (i.e. "ltr") value of "dir" attribute of "html" and "body" tags instead of empty.
2021-02-03 09:42:32 +01:00
Alex Shpak 60dfd9aa4b Set BookTranslatedOnly to false for example site 2021-01-29 10:54:35 +01:00
Alex Shpak d9fe59a6e9 Refactor aside menus, add extra wrapper 2021-01-26 22:20:30 +01:00
Tiger Oakes 012ccee53d
Add before and after partials for toc (#296)
Closes #257
2021-01-26 18:45:08 +01:00
Ayush Agarwal a12baf0e01
upgrade mermaidjs to v8.9.0 (#305)
this fixes the following issue
https://github.com/mermaid-js/mermaid/issues/1836

the sha256sum of mermaid.min.js downloaded from the following link as on
2021-01-26 09:36:19 UTC

https://unpkg.com/mermaid@8.9.0/dist/mermaid.min.js

is

910e77c953c7417fd61148fc61b175624001bdd3c6e977e228fcb30607f7bd42
2021-01-26 18:16:35 +01:00
Alex Ivanov c828c6660f
Add OnlyTranslated property (#303)
* Add OnlyTranslated property

Signed-off-by: Alex Ivanov <ai@contributor.pw>

* Add newlines

Signed-off-by: Alex Ivanov <ai@contributor.pw>

* rename property

Signed-off-by: Alex Ivanov <ai@contributor.pw>
2021-01-21 11:42:26 +01:00
Yağızhan e53a638b2c
Adding Turkish translations (#300)
* Create tr.yaml

* Update tr.yaml

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2020-12-23 11:51:50 +01:00
Shohei Ueda a486adf846
Add hugo.Generator (#290)
https://gohugo.io/functions/hugo
2020-11-14 21:40:16 +01:00
Shohei Ueda f66a45df04
Improve GitHub Actions workflow (#289)
- Use the strategy.matrix syntax
- Use peaceiris/actions-hugo: https://github.com/peaceiris/actions-hugo
2020-11-14 21:40:00 +01:00
Alex Shpak f9643aa6b7 Fix styles on flat and collapsed section 2020-09-22 10:33:14 +02:00
Alex Shpak 269e4de142 Set default value for color scheme to light 2020-09-22 09:37:53 +02:00
Alex Shpak b76bdd715b #242, Add bookSearchExclude frontmatter param 2020-09-15 00:17:28 +02:00
Alex Shpak 5cc3d6719c #231, Allow open collapsed menu without changing page 2020-09-14 22:45:58 +02:00
Alex Shpak 4e34988b5d #151, move SCSS vars to CSS vars, implement dark and light modes by browser preference 2020-09-14 00:02:55 +02:00
Ivan Cheban 6beca7928c
Update columns.md (#265)
sparator ↔️ separator
2020-08-19 20:22:25 +02:00
Alex Shpak 8f64ee74aa #204, Add mermaid config customization, upgrade mermaidjs 2020-08-16 18:57:43 +02:00
Marie-Helene Burle 796468766f
Many minor fixes in README.md (#258)
- fix path of `menu/index.md` to match that given in the ExampleSite
- fix typos
- fix grammar
- add missing articles
2020-07-29 13:37:55 +02:00
Greg Kitson 5eceee52ed
fix minor typo in README.md under Site Configuration (#254) 2020-07-23 11:18:18 +02:00
Nagidal e09fa6ec83
Corrected German translation (#253) 2020-07-21 12:09:53 +02:00
Nagidal a056627f4a
Added Czech translation (#251) 2020-07-21 12:09:11 +02:00
Alex Shpak e91fa9024b #243, Copy jp.yaml to ja.yaml 2020-07-15 20:51:11 +02:00
Alex Shpak 615400b3b7 Revert example site title 2020-07-07 23:07:28 +02:00
Alex Shpak bf93dafdfa Improve accessibility and keyboard navigation 2020-07-07 23:06:21 +02:00
Alex Shpak f416a71bf8 #236, #171 Add section to search results 2020-07-06 22:17:36 +02:00
Alex Shpak 05c6336d22 Remove test image from example site 2020-06-16 23:25:45 +02:00
Alex Shpak 8522638b1f Update generated content 2020-06-16 23:25:20 +02:00
Alex Shpak 9f58f3b667 Update figure styles in markdown 2020-06-16 23:24:48 +02:00
Ge "David" Feng c79ab9dbc0
Add image and figure shortcodes (#233)
* add image and figure shortcodes
* remove shortcodes, add css
2020-06-16 23:19:54 +02:00
Chris Mayo d3673e797b
Remove execute permission from favicon.png (#234) 2020-06-15 21:39:45 +02:00
Alex Shpak c5ae65bc13 Make medu slide over content 2020-06-13 18:19:58 +02:00
Alex Shpak 5f2cc877df #229: Add height to body, for sticky elements 2020-06-13 00:21:08 +02:00
Alex Shpak b8b7184e89 Add section shortcode, to render children 2020-05-31 00:18:25 +02:00
Alex Shpak aa7c486e76 Add anchors to headings 2020-05-30 23:22:51 +02:00
Vincent Vialard 1608ade3f4
- hide ToC icon in header if ToC not enabled (#225) 2020-05-25 22:40:54 +02:00
Justin d198d96b30
Enabling KaTex Instructions (#217)
* Enabling KaTex Instructions

This would have been really helpful if that was documented, many users aren't able to render the KaTex and aren't sure why/where to look
Also,  fixed spelling some spelling

* Update README.md

Co-authored-by: Alex Shpak <alex-shpak@users.noreply.github.com>
2020-05-22 10:35:31 +02:00
Alex Shpak 8edf0aab16 #215, Fix search spinner in RTL direction 2020-05-19 23:10:11 +02:00
Alex Shpak 65484b0f4c #215, Fix menu translateX for RTL (negative X) 2020-05-18 23:58:21 +02:00
Alex Shpak 71e55e59d1 Set minimum version to 0.68 2020-05-17 13:18:34 +02:00
Alex Shpak 92600f77fe #215, Add support for languageDirection param 2020-05-17 13:10:50 +02:00
Alex Shpak d5f55b4003
#220, Update 'BookEditPath' docs 2020-05-11 11:17:31 +02:00
Lars Tveito 31e642141f
Add Norwegian (bokmål) i18n translation (#219) 2020-05-11 11:13:10 +02:00
Alex Shpak a877c17dc1 Add precache to service worker 2020-05-01 17:45:23 +02:00
Alex Shpak e2ffa7b3ad Add manifest 2020-05-01 17:35:08 +02:00
Alex Shpak c672d64f12 Generate pages list in sw.js 2020-05-01 13:19:58 +02:00
Alex Shpak 9c5fc12dd8 Add build badge 2020-04-28 22:10:01 +02:00
Alex Shpak 2b430b0b41 #212, Fix use of IsAncestor after hugo breaking change 2020-04-28 22:00:24 +02:00
Alex Shpak 5be250b0e2 #207, Fix whitespaces again, in shortcodes inside shortcodes 2020-04-24 10:29:23 +02:00
Alex Shpak 7b18b077ee Add ukrainian translation 2020-04-21 23:53:58 +02:00
Alex Shpak 5ac8fe662a Add cn.yaml back for backward compatibility 2020-04-21 23:40:08 +02:00
Alex Shpak 821203777d Rename 'cn' locale to 'zh', cn code is unassigned 2020-04-21 23:38:30 +02:00
Alex Shpak 357de9eb39 #196, #201 Refactor numbered plugin. multilevel numbers in ToC 2020-04-21 23:25:36 +02:00
Alex Shpak 66968582ef #205, Add details shortcode 2020-04-21 22:30:00 +02:00
tyler71 b88d5f6b12
Edit this page content dir lang independent (#202)
#200
2020-04-16 17:40:17 +02:00
Alex Shpak 0f58a77354 404 Page redesign 2020-04-15 23:24:51 +02:00
Almir A. Braggio 7382758270
Adding portuguese i18n file (#199)
Co-authored-by: Almir Braggio <almir.braggio@pti.org.br>
2020-04-15 10:39:40 +02:00
Alex Shpak 94c8230e1e #197, Use RelPermalink to identify nested pages in collapsed menu 2020-04-14 22:56:31 +02:00
Alex Shpak 9719692512 Introduce serviceWorker, disabled by default 2020-04-12 20:50:03 +02:00
Alex Shpak e4e43bd9b1 Refactor KaTeX shortcode, remove whitespaces and fix font size 2020-04-11 20:05:43 +02:00
Alex Shpak d61558462f Revert config.toml sectin config 2020-04-11 14:37:47 +02:00
Alex Shpak 15339ab6a6 #157, Refactor side menu, simpler and renders all pages at root 2020-04-11 14:35:29 +02:00
Alex Shpak 8927a3c672 #162, Add docs/date partial, for date customization 2020-04-10 20:24:36 +02:00
Alex Shpak 6234f12654 Restrict visited link color to markdown only 2020-04-06 11:26:35 +02:00
Alex Shpak 1eeabcad67 #187, Use .Permalink for lang switch, align icons 2020-04-03 17:42:48 +02:00
Alex Shpak 6e146b1bf1 #188, Add hreflang metadata to html head 2020-04-02 22:47:36 +02:00
Alex Shpak b91e9eaea7 #186, Make title generation cross-platform 2020-03-31 23:29:21 +02:00
Alex Shpak a9867292af Fix current page highlight in new Hugo version 2020-03-30 18:00:15 +02:00
Alex Shpak 831e570f16 Fix mermaid scaling for flowchart 2020-03-30 17:59:29 +02:00
Eugene van der Merwe 3011d3351d
Added Dark Mode to features (#184)
Updated the list of features.
2020-03-28 21:24:59 +01:00
Alex Shpak 976f619b2f Update mermaid to 8.4.8, move KaTeX to static folder 2020-03-23 20:40:53 +01:00
Alex Shpak 61b13ba583 #183, Update generated resources 2020-03-22 19:51:55 +01:00
Alex Shpak bccdeca767 Remove unintended whitespaces from markdown links 2020-03-22 19:09:09 +01:00
Alex Shpak a3059fe4f7 #140, Use new GetTerms function to fix tag titles 2020-03-19 22:00:45 +01:00
Alex Shpak 0d1ba29999 #177, #176 Simplify description in html head 2020-03-13 18:15:51 +01:00
undergroundwires 13ef4c1efc
prioritize more related parameters for description #176 (#177) 2020-03-13 18:14:22 +01:00
undergroundwires d7def135c9
added go home url #172 (#178)
* added go home url #172
* wrapped in a div #172
* removed h2 #172
* fixed indenting #172
2020-03-13 18:13:36 +01:00
Alex Shpak 6e5d35a5ab #179, Also include sections to search 2020-03-12 10:58:52 +01:00
Alex Shpak 5ba88ccad5 #179, Use only regular pages for search index 2020-03-11 23:16:15 +01:00
Alex Shpak 392f75d2c7 Update scrollbar resets 2020-03-11 23:05:39 +01:00
Hugo Locurcio 7259e4d9a8
Add French localization (#173) 2020-03-11 21:22:53 +01:00
Alex Shpak 5296ba3d38 Clean trailing whitespaces 2020-03-07 18:51:24 +01:00
Alex Shpak 289a3f456e Add portable links, requires hugo 0.62 2020-03-07 18:47:16 +01:00
Alex Shpak c217876059 Update generated resources 2020-03-07 14:30:31 +01:00
Alex Shpak 3953fca636 #155, Move collapse indicator to the right side 2020-03-07 14:03:46 +01:00
Alex Shpak 7df4251b72 #169, Remove whitespaces around content in tabs, just to be safe. 2020-03-07 13:37:40 +01:00
Alex Shpak 050d5a83de #161, Move inject/footer template into footer, before comments 2020-03-01 00:52:00 +01:00
Alex Shpak 9c8663eb34 #155, Do not show collapse indicator in non-section pages 2020-03-01 00:49:34 +01:00
Vilhelm Prytz aa5967140d
workflow: check with minimum supported version of Hugo (#163)
added build job that checks with the minimum supported version of Hugo
2020-03-01 00:35:10 +01:00
Vilhelm Prytz 71425a377a
GitHub Workflow: always use latest version of Hugo (#159)
fetch latest tag (release) from GitHub API as variable
download corresponding ".deb" package using latest version variable
2020-03-01 00:08:51 +01:00
Vilhelm Prytz 8fcd606500
Add Swedish i18n translation (#160) 2020-03-01 00:05:51 +01:00
Alex Shpak 4ee099e8cf #157, Make docs template default for all pages 2020-02-29 21:24:00 +01:00
Alex Shpak 6ecc94ed2b #155, Add expand indicator in collapsed section 2020-02-29 21:15:52 +01:00
Alex Shpak a722f74fba #154, Add menu overlay over content to hide menu on click 2020-02-27 22:58:15 +01:00
Tobias 352ceea411
German i18n file added (#152)
* German i18n file added
* Typo
2020-02-25 22:24:40 +01:00
Alex Shpak d55e2b2946 Remove tabs test page 2020-02-25 21:19:17 +01:00
Alex Shpak 08519158f4 #153, Remove extra spaces in generated tabs html 2020-02-25 21:16:49 +01:00
Alex Shpak 5d7f257e30 #150, Add content-before and content-after inject partials 2020-02-23 13:29:58 +01:00
Alex Shpak 5cba28f865 Simplify post meta template 2020-02-23 13:26:51 +01:00
Alex Shpak 8369d9a3a7 #150, Add support for menu nesting (before, after menus) 2020-02-22 19:30:46 +01:00
Alex Shpak 59b649cf8b Update bundle menu example 2020-02-22 11:59:35 +01:00
Alex Shpak f633bbe679 Add touch-action: manipulation for mobile devices 2020-02-12 23:31:58 +01:00
Alex Shpak 2088c9a0cb Add support for hugo menus 2020-02-12 22:12:41 +01:00
Alex Shpak 59479b17ac Make start page fit single screen 2020-02-12 00:00:04 +01:00
Alex Shpak eef4bef0d7 Removed unused ToC levels classes 2020-02-11 23:53:36 +01:00
Alex Shpak 08ccd92549 Rename collapsed menu in exampleSite 2020-02-11 23:49:07 +01:00
Alex Shpak cb61957623 Add scrollbar plugin and update README 2020-02-10 23:31:33 +01:00
Alex Shpak a23d848db2 #141, Add page counters to taxonomy side menu 2020-02-10 22:24:36 +01:00
Alex Shpak a33bb33f18 Make translations list respect weight of languages 2020-02-10 22:05:26 +01:00
xwutong 7f25a125aa
added Japanese translation (#145)
* Update cn.yaml
added some zh-cn translation

* Update jp.yaml
translated to Japanese
2020-02-10 18:39:59 +01:00
Alex Shpak e1d55f2b15 Improve lang switch accesibility 2020-02-10 18:39:07 +01:00
Alex Shpak 72cf0968ce Button shortcode redesign: smaller font, resize 2020-02-10 17:49:26 +01:00
Alex Shpak caeba5ec99 Default body font color to black for better readability 2020-02-10 17:49:26 +01:00
xwutong dae803fa44 Update cn.yaml (#144)
added some zh-cn translation
2020-02-08 12:21:48 +01:00
Alex Shpak 4e03ee5835 #138, Lower minimum body width from 400px to 320px, regression 2020-02-04 22:39:12 +01:00
Alex Shpak c0bd5b5bb8 #90, Move inline scripts to file in assets to allow overwrite 2020-02-04 22:24:36 +01:00
Alex Shpak 83f6c3d475 Disable space as search focus key 2020-01-24 00:39:47 +01:00
Alex Shpak dc7e2f0013 Update ToC docs in README 2020-01-24 00:36:26 +01:00
Alex Shpak 88136f596d Add details styles for markdown 2020-01-24 00:22:23 +01:00
Alex Shpak ba5d38ad44 Rework of main template, adds options for more fine customisation 2020-01-24 00:07:56 +01:00
Daniel Forssten 2acd6ab280 #134, Focus search field by pressing s or / (#135)
* #134, Focus search field by pressing s or /
* #134, Refactoring away an array loop using indexOf
2020-01-19 22:06:37 +01:00
Daniel Forssten 93fd87e4a0 #134, Focus search field by pressing s or / (#135)
* #134, Focus search field by pressing s or /
* #134, Refactoring away an array loop using indexOf
2020-01-19 22:02:34 +01:00
Daniel Forssten 145b8ae2e3 #134, Focus search field by pressing s or / (#135)
* #134, Focus search field by pressing s or /
* #134, Refactoring away an array loop using indexOf
2020-01-19 22:02:03 +01:00
Daniel Forssten 4cd9c6f8f9 #134, Focus search field by pressing s or / (#135)
* #134, Focus search field by pressing s or /
* #134, Refactoring away an array loop using indexOf
2020-01-19 22:00:09 +01:00
Daniel Forssten ce0857eedd #134, Focus search field by pressing s or / (#135)
* #134, Focus search field by pressing s or /
* #134, Refactoring away an array loop using indexOf
2020-01-19 21:59:07 +01:00
Daniel Forssten 7e2af86777 #134, Focus search field by pressing s or / (#135)
* #134, Focus search field by pressing s or /
* #134, Refactoring away an array loop using indexOf
2020-01-19 21:57:53 +01:00
Alex Shpak 4b641b0f9a #133, move disqus to separate template to allow override, rename BookDisqus to BookComments 2020-01-17 21:44:25 +01:00
Alex Shpak b9688d7e36 Update generated resources 2020-01-17 21:32:01 +01:00
Alex Shpak 9888c52dbf #132, add urlize to taxonomy templates 2020-01-17 21:31:36 +01:00
Shane Liesegang bce8940c62 Removing flex from <main> for sake of print layout (#129)
* Removing flex from <main> for sake of print layout
* trimming excess whitespace
2020-01-17 20:32:36 +01:00
Roberto MF c43a00feb2 Add es lang (#128) 2020-01-16 09:59:52 +01:00
Alex Shpak db73f20cb5 #130, Fix post metadata links regression, add RelPermalink 2020-01-16 09:58:53 +01:00
Alex Shpak 68f096fa4c Remove use of Scratch in search configuration 2020-01-13 19:42:16 +01:00
Alex Shpak 134b7456b8 Add jp and ko search settings (same as chinese) 2020-01-13 19:29:32 +01:00
Alex Shpak 9fa444757a #117, Update KaTeX shortcode, add displayMode param 2020-01-13 19:05:54 +01:00
Alex Shpak b9f45270a0 #122, Fix post taxonomy list links (include base url) 2020-01-13 18:06:09 +01:00
Alex Shpak ec53e2733f Update disqus support, add global site config BookDisqus 2020-01-13 17:55:34 +01:00
Dave Kerr 36a8cf5169 feat: added support for Disqus (#120)
* feat: added support for Disqus
* feat: allow disqus to be disabled through frontmatter

Set:
    bookDisableComments: true

On a page to disable disqus for the content.
2020-01-13 17:46:19 +01:00
tyler71 e037b7c70f mobile toc menu (#121)
* Implement TOC for mobile
* Uses Page title as label
* Label entries so that tapping TOC will hide menu
* Switch to medium breakpoint
* Correct tos -> toc
* toc-menu-control -> toc-control
2020-01-13 17:44:24 +01:00
Alex Shpak d6290dcf50 #66, add taxonomy support 2019-12-19 17:22:12 +01:00
Thomas M Porter II f5a52e6ed1 replacing any backslashes with forward slashes for edit file url(#116)
Seems to be a Windows related thing. `.File.Path` returns a path with backslashes this adds a replace to make those forward slashes. This appears to fix #115
2019-12-17 23:24:15 +01:00
Alex Shpak e30504802e Add space between posts in list, clean posts class removal 2019-12-14 13:38:27 +01:00
Alex Shpak c4232b6e28 #113, Hide date from posts if not specified 2019-12-14 13:31:11 +01:00
Alex Shpak e01674c287 Move baseof to _default folder, making it default view of site 2019-12-09 11:24:31 +01:00
Alex Shpak 3f463aeb0c Set toc starting level to 1 2019-12-09 11:24:31 +01:00
Alex Shpak d934e0b12a Make icons white in dark mode 2019-12-09 11:24:31 +01:00
Alex Shpak a2e356d4bb
Update README.md 2019-12-01 19:31:27 +01:00
Alex Shpak 5af2b92f00 #106, Upgrade to hugo 0.60 2019-12-01 14:54:47 +01:00
Peiling Jiang 995c1e695c add .DS_Store to gitignore (#108) 2019-12-01 13:05:08 +01:00
Alex Shpak 681a6ed870 Set required version to 0.56 2019-11-29 22:58:20 +01:00
Alex Shpak e3dc5c5723 #99, Move translations to separate content folders 2019-11-19 23:56:45 +01:00
Alex Shpak 707f9e6466 Remove test headers from index page 2019-11-19 22:53:35 +01:00
Alex Shpak 1941d7130e #100, Make h4, h5 and h6 bolder and increase font size 2019-11-19 22:50:00 +01:00
Vilhelm Prytz 4a8620ce55 Update Hugo version in GitHub workflow (#98) 2019-11-17 19:58:01 +01:00
Alex Shpak 20c3faae4d Improve accessibility score 2019-11-16 22:00:50 +01:00
Alex Shpak f1d4aeb69a Make GitInfo not required for 'edit this page' link 2019-11-16 21:49:48 +01:00
Alex Shpak 1e4d0001e2 Add multilingual mode to README 2019-11-16 21:48:35 +01:00
Alex Shpak bad2eddcf4 Update index pages for ru/cn 2019-11-16 21:42:52 +01:00
Alex Shpak 1addb8dca6 Refactor footer 2019-11-16 21:32:23 +01:00
Alex Shpak aaf236410e Update README.md 2019-11-16 20:35:23 +01:00
Alex Shpak 13584878c2 Polish multilang mode, update docs 2019-11-16 20:35:23 +01:00
Alex Shpak 7b52bf4232 #87, Add support for multilang search index generation 2019-11-16 20:35:23 +01:00
Alex Shpak 05c3b8fac9 Add language switch at bottom of page 2019-11-16 20:35:23 +01:00
Alex Ivanov 9cd378a2d2 Multilang (#93)
* Add i18n langs trans example
* partials
* Update sample site
* cc of variables of config
* Clean PR
* revert master data
2019-11-16 20:34:46 +01:00
Alexandros 890cc000bb Update generated resources latest hugo (#97) 2019-11-16 20:26:53 +01:00
Alex Shpak 6d6c59bb23 Update generated resources in exampleSite 2019-11-16 01:48:05 +01:00
Alex Shpak 1af0e0a18b #94, Show toc at top of printing page 2019-11-08 23:42:15 +01:00
Alex Shpak 1c65dac6ce #94, Add printing styles 2019-11-08 23:31:27 +01:00
Alex Shpak 1b6469f7b1 #92, use 'em' units for markdown line-height 2019-10-27 20:20:13 +01:00
Alex Shpak 179d4443b8 #92, Fix code block with lines spacing 2019-10-27 13:05:43 +01:00
Alex Shpak 1c7fa1d974 Update docs archetype 2019-10-27 12:36:34 +01:00
Alex Shpak 825573cdd2 Remove dark links mixin and sass var 2019-10-27 12:33:14 +01:00
Alex Shpak a5788d71fa #80, Add search index configuration 2019-10-27 11:58:58 +01:00
Alex Shpak b4307e7c09 #80, Migrate to flexsearch 2019-10-23 21:32:15 +02:00
Alex Shpak 4596f08e32 Rename ToC level styles, reorganize example content 2019-10-23 21:31:58 +02:00
Alex Shpak e03b9bccb1 Delete .DS_Store 2019-10-21 10:20:05 +02:00
Alex Shpak e2188136e1 #51, Add experimental bookCollapseSection page param to hide nested sections 2019-10-09 01:00:40 +02:00
Alex Shpak 071e069d92 Update readme 2019-10-09 00:05:30 +02:00
Alex Shpak c7f93dc789 Update example file structure, give each shortcode own file 2019-10-08 23:55:34 +02:00
Alex Shpak 1db63cef5c Fix valign for git footer icons 2019-10-08 23:25:33 +02:00
Alex Shpak 00988ceee1 Remove BookMenuBundleActiveLinkColor parameter 2019-10-08 23:17:30 +02:00
Alex Shpak 394b54f76b Upgrade hugo in github action 2019-10-08 17:15:16 +02:00
Alex Shpak 007bc10c07 Introduce SCSS plugins: dark mode and numbered headings 2019-10-08 17:03:49 +02:00
Peiling Jiang 1cd5040d84 Add Google Analytics setup (in configuration file) hint. (#88) 2019-10-04 09:52:51 +02:00
Alex Shpak 1f8d34168f #77, Introduce hint shortcode 2019-10-03 18:15:24 +02:00
Alex Shpak 3e3a3346e1 #59, Allow customize SASS vars, add example of dark theme 2019-10-03 15:07:56 +02:00
Alex Shpak 77255304f3 #74, Remove readonly flag from search field 2019-10-03 14:18:34 +02:00
Alex Shpak 22ff783d86 #86, Add google analytics to readme, move GA and enable Open Graph in head 2019-10-03 14:10:03 +02:00
Alex Shpak 397ebbc2a4 #79, Disable async load for dynamically inserted scripts 2019-10-03 13:56:41 +02:00
Olivier Beaulieu ff6ba4b1ae Fixed typo in README 2019-09-30 11:03:10 +02:00
Alex Shpak 5d6873e992 #73, Enable TOC and git footer for posts 2019-09-22 13:15:22 +02:00
Alex Shpak 74422e6896 Fix github workflow name 2019-09-05 23:44:19 +02:00
Alex Shpak 9a58945b8b Reorganize files structure to be similar to menu bundle 2019-09-05 23:03:08 +02:00
Alex Shpak ae3c5017c4 Small adjustments for logo span and css 2019-09-05 23:01:40 +02:00
Paul Twohey 73e53768c9 always have <span> for title text and move spacing to logo 2019-09-05 22:22:14 +02:00
Paul Twohey d94b4196ba support relative URLs for brand logos 2019-09-05 22:22:14 +02:00
Paul Twohey 6004c7edc3 Optional brand logo in the menu controlled by .Site.Params.BookLogo
- documentation in README.md and exampleSite/config.{toml,yaml}
2019-09-05 22:22:14 +02:00
Paul Twohey 7d0ee68c3b Fixes #69 Make file based menus behave as expected
- Fixes #69
- Section headings are listed once
- Sections and normal pages sort with the same weights amongst themselves
2019-09-04 16:09:55 +02:00
Paul Twohey 64dfdf39fb add sub resource integrity (SRI) to processed assets
- search javascript
- SCSS processed stylesheet
2019-09-02 09:59:50 +02:00
Paul Twohey 964968be39 use class="hidden" instead of creating new classes
Use class "hidden" instead of styled classes to ensure that input elments stay
hidden when the Content-Security-Policy header has "style-src 'self';"
2019-09-01 20:51:15 +02:00
Paul Twohey 438f011ff5 fix menu, docs, and posts to work with strict Content-Security-Policy
When the Content-Security-Policy header has "style-src 'self';"
inine style elements like style="display: none" are not honored
by browsers, so style them display: none
2019-09-01 20:51:15 +02:00
Paul Twohey 99bd271b35 fix expand and tabs shortcodes to work with strict Content-Security-Policy
When the Content-Security-Policy header has "style-src 'self';"
inine style elements like style="display: none" are not honored
by browsers, so add CSS to the markup classes and style them
display: none
2019-09-01 20:51:15 +02:00
Alex Shpak 8f1cdb6aee #61, Remove need for $$ in katex shortcode 2019-08-23 13:23:06 +02:00
Alex Shpak 185e52d2f6 #61, Add katex shortcode 2019-08-23 00:01:14 +02:00
Alex Shpak c98b510fe0 Finish migration to github actions 2019-08-22 23:17:07 +02:00
Alex Shpak 98d18c3cef Download hugo from releases in workflow 2019-08-22 23:14:55 +02:00
Alex Shpak 73ed73a26a Update workflow to ubuntu-latest 2019-08-22 23:07:54 +02:00
Alex Shpak 817d096e43 Add working directory to workflow 2019-08-22 23:06:13 +02:00
Alex Shpak 624cefb3c0 Add checkout action to workflow 2019-08-22 22:54:29 +02:00
Alex Shpak 03b8e93481 Specify run-on for github workflow 2019-08-22 22:51:32 +02:00
Alex Shpak face62569e
Create hugo github action 2019-08-22 22:46:28 +02:00
Alex Shpak 424ff16092 Fix formatting in search-data 2019-08-09 14:53:15 +02:00
Alex Shpak df8d186d38 Jsonify title in search as well 2019-08-08 13:17:47 +02:00
Alex Shpak b95fbf9750 Update hugo version in travis 2019-08-06 13:14:51 +02:00
Alex Shpak 3deb5ffc52 Update screenshots and theme tags 2019-08-06 13:05:04 +02:00
Alex Shpak 11d1c44a1a Update search box design 2019-08-06 11:33:42 +02:00
Alex Shpak 469d9d88cd Show progressbar while loading lunr and data 2019-08-06 11:33:42 +02:00
Alex Shpak f56f2bf04d Block serach bar untill index is loaded 2019-08-06 11:33:42 +02:00
Alex Shpak a3f7d8b948 Improve search settings 2019-08-06 11:33:42 +02:00
Alex Shpak c78c67ffed Fix title partial, frontmatter title was ignored 2019-08-06 11:33:42 +02:00
Alex Shpak 625f202275 Make lunr to load on search interaction as well 2019-08-06 11:33:42 +02:00
Alex Shpak 440ea834f7 Add extra margin under search bar, cleanup 2019-08-06 11:33:42 +02:00
Alex Shpak 1f3addcca5 Implement search, loading on demand 2019-08-06 11:33:42 +02:00
Alex Shpak dda0a0eab1 Start work on search feature with lunr 2019-08-06 11:33:42 +02:00
Jack b199d72e5f make tables scroll 2019-08-05 10:09:05 +02:00
Beth Aitman 85f3a2d4e0 Remove discs from pagination ul 2019-07-25 01:39:01 +02:00
240 changed files with 5232 additions and 1543 deletions

34
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Build with Hugo
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
hugo-version:
- 'latest'
- '0.134.2'
steps:
- 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@v3
with:
hugo-version: ${{ matrix.hugo-version }}
extended: true
- 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

5
.gitignore vendored
View File

@ -1,2 +1,5 @@
public/
exampleSite/public/
exampleSite/public/
.DS_Store
.hugo_build.lock
resources/

View File

@ -1,2 +0,0 @@
language: generic
script: docker run --rm -it -v $(pwd)/exampleSite:/src -v $(pwd):/src/themes/hugo-book klakegg/hugo:0.52-ext-alpine --enableGitInfo=false

358
README.md
View File

@ -1,116 +1,121 @@
# Hugo Book Theme
[![Build Status](https://travis-ci.org/alex-shpak/hugo-book.svg?branch=master)](https://travis-ci.org/alex-shpak/hugo-book)
[![Hugo](https://img.shields.io/badge/hugo-0.48-blue.svg)](https://gohugo.io)
[![Hugo](https://img.shields.io/badge/hugo-0.134-blue.svg)](https://gohugo.io)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
![Build with Hugo](https://github.com/alex-shpak/hugo-book/workflows/Build%20with%20Hugo/badge.svg)
### [Hugo](https://gohugo.io) documentation theme as simple as plain book
![Screenshot](https://github.com/alex-shpak/hugo-book/blob/master/images/screenshot.png)
![Screenshot](https://raw.githubusercontent.com/alex-shpak/hugo-book/master/images/screenshot.png)
- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Menu](#menu)
- [Blog](#blog)
- [Configuration](#configuration)
- [Shortcodes](#shortcodes)
- [Versioning](#versioning)
- [Contributing](#contributing)
## Features
- Clean simple design
- Mobile friendly
- Light and Mobile-Friendly
- Multi-language support
- Customisable
- Designed to not interfere with other layouts
- Zero initial configuration
- Handy shortcodes
- Comments support
- Simple blog and taxonomy
- Primary features work without JavaScript
- Dark Mode
## Requirements
- Hugo 0.48 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
Below is example how to create new site from scratch
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 theme will render pages from `content/docs` section as menu in a tree structure.
You can set `title` and `weight` in front matter of pages to adjust order and titles in menu.
### Leaf bundle menu
You can also use leaf bundle and content of it's `index.md` as menu.
Given you have this file structure
```
├── content
│ ├── docs
│ │ ├── page-one.md
│ │ └── page-two.md
│ └── posts
│ ├── post-one.md
│ └── post-two.md
```
Create file `content/docs/menu/index.md` with content
```md
+++
headless = true
+++
- [Book Example](/docs/)
- [Page One](/docs/page-one)
- [Page Two](/docs/page-two)
- [Blog](/posts)
```
And Enable it by settings `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/)
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, 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
Simple blog supported for section `posts`
A simple blog is supported in the section `posts`.
A blog is not the primary usecase of this theme, so it has only minimal features.
## Configuration
### Site Configuration
There are few configuration options you can add to your `config.toml` file.
You can also see `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.
# Always put it on the top of the configuration file, otherwise it won't work
googleAnalytics = "UA-XXXXXXXXX-X"
# (Optional) If you provide a Disqus shortname, comments will be enabled on
# all pages.
disqusShortname = "my-site"
# (Optional) Set this to true if you use capital letters in file names
disablePathToLower = true
@ -123,143 +128,179 @@ enableGitInfo = true
disableKinds = ['taxonomy', 'taxonomyTerm']
[params]
# (Optional, default 6) Set how many table of contents levels to be showed on page.
# Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/)
# You can also specify this parameter per page in front matter
BookToC = 3
# (Optional, default light) Sets color theme: light, dark or auto.
# Theme 'auto' switches between dark and light modes based on browser/os preferences
BookTheme = 'light'
# (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 true) Controls table of contents visibility on right side of pages.
# Start and end levels can be controlled with markup.tableOfContents setting.
# You can also specify this parameter per page in front matter.
BookToC = true
# (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'
# (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) This value is duplicate of $link-color for making active link highlight in menu bundle mode
# BookMenuBundleActiveLinkColor = '\#004ed0'
# (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'
# (Optional, default false) Include JS scripts in pages. Disabled by default.
# - Keep side menu on same scroll position during navigation
BookEnableJS = true
# Set source repository location.
# Used for 'Last Modified' and 'Edit this page' links.
BookRepo = 'https://github.com/alex-shpak/hugo-book'
# Set source repository location.
# Used for 'Last Modified' and 'Edit this page' links.
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
# type.
# Required if 'BookRepo' param is set.
# Value used to construct a URL consisting of BookRepo/BookCommitPath/<commit-hash>
# Github uses 'commit', Bitbucket uses 'commits'
BookCommitPath = 'commit'
# Enable 'Edit this page' links for 'doc' page type.
# Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
# Path must point to 'content' directory of repo.
BookEditPath = 'edit/master/exampleSite/content'
# Enable 'Edit this page' links for 'doc' page type.
# Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
# Path must point to the site directory.
BookEditPath = 'edit/master/exampleSite'
# (Optional, default January 2, 2006) Configure the date format used on the pages
# - In git information
# - In blog posts
BookDateFormat = 'Jan 2, 2006'
# (Optional, default January 2, 2006) Configure the date format used on the pages
# - In git information
# - In blog posts
BookDateFormat = 'Jan 2, 2006'
# (Optional, default true) Enables search function with flexsearch,
# Index is built on fly, therefore it might slowdown your website.
# Configuration for indexing can be adjusted in i18n folder per language.
BookSearch = true
# (Optional, default true) Enables comments template on pages
# By default partials/docs/comments.html includes Disqus template
# See https://gohugo.io/content-management/comments/#configure-disqus
# Can be overwritten by same param in page frontmatter
BookComments = true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
# Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
# Theme will print warning if page referenced in markdown does not exists.
BookPortableLinks = true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
BookServiceWorker = true
```
### Multi-Language Support
Theme supports Hugo's [multilingual mode](https://gohugo.io/content-management/multilingual/), just follow configuration guide there. You can also tweak search indexing configuration per language in `i18n` folder.
### Page Configuration
You can specify additional params per page in front matter
You can specify additional params in the front matter of individual pages:
```toml
# 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 mark page as flat section in file-tree menu (if BookMenuBundle not set)
bookFlatSection = true
# (Optional) Set to 'true' to mark page as flat section in file-tree menu.
bookFlatSection = false
# (Optional) Set true to hide page or section from side menu (if BookMenuBundle not set)
bookHidden = true
# (Optional) Set to hide nested sections or pages at that level. Works only with file-tree menu mode
bookCollapseSection = true
# (Optional) Set how many levels of ToC to show. use 'false' to hide ToC completely
bookToC = 3
# (Optional) Set true to hide page or section from side menu.
bookHidden = false
# (Optional) Set 'false' to hide ToC from page
bookToC = true
# (Optional) If you have enabled BookComments for the site, you can disable it for specific pages.
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 |
| ----------------------------------------------- | -------------------------------------- |
| `layouts/partials/docs/inject/head.html` | Before closing `<head>` tag |
| `layouts/partials/docs/inject/body.html` | Before closing `<body>` tag |
| `layouts/partials/docs/inject/footer.html` | After page content |
| `layouts/partials/docs/inject/menu-before.html` | At the beginning of `<nav>` menu block |
| `layouts/partials/docs/inject/menu-after.html` | At the end of `<nav>` menu block |
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 |
| `layouts/partials/docs/inject/footer.html` | After page footer content |
| `layouts/partials/docs/inject/menu-before.html` | At the beginning of `<nav>` menu block |
| `layouts/partials/docs/inject/menu-after.html` | At the end of `<nav>` menu block |
| `layouts/partials/docs/inject/content-before.html` | Before page content |
| `layouts/partials/docs/inject/content-after.html` | After page content |
| `layouts/partials/docs/inject/toc-before.html` | At the beginning of table of contents block |
| `layouts/partials/docs/inject/toc-after.html` | At the end of table of contents block |
### Extra Customisation
| File | Description |
| --------------------- | ------------------------------------------------------------------------------------- |
| `static/favicon.png` | Override default favicon |
| `assets/_custom.scss` | Customise or override scss styles |
| `assets/_fonts.scss` | Replace default font with custom fonts (e.g. local files or remote like google fonts) |
| File | Description |
| ------------------------ | ------------------------------------------------------------------------------------- |
| `static/favicon.png` | Override default favicon |
| `assets/_custom.scss` | Customise or override scss styles |
| `assets/_variables.scss` | Override default SCSS variables |
| `assets/_fonts.scss` | Replace default font with custom fonts (e.g. local files or remote like google fonts) |
| `assets/mermaid.json` | Replace Mermaid initialization config |
### Plugins
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 |
| --------------------------------- | ----------------------------------------------------------- |
| `assets/plugins/_numbered.scss` | Makes headings in markdown numbered, e.g. `1.1`, `1.2` |
| `assets/plugins/_scrollbars.scss` | Overrides scrollbar styles to look similar across platforms |
To enable plugins, add `@import "plugins/{name}";` to `assets/_custom.scss` in your website root.
### Hugo Internal Templates
There are a few hugo templates inserted in `<head>`
- [Google Analytics](https://gohugo.io/templates/internal/#google-analytics)
- [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
### Expand
- [Buttons](https://hugo-book-demo.netlify.app/docs/shortcodes/buttons/)
- [Columns](https://hugo-book-demo.netlify.app/docs/shortcodes/columns/)
- [Details](https://hugo-book-demo.netlify.app/docs/shortcodes/details/)
- [Hints](https://hugo-book-demo.netlify.app/docs/shortcodes/hints/)
- [KaTeX](https://hugo-book-demo.netlify.app/docs/shortcodes/katex/)
- [Mermaid](https://hugo-book-demo.netlify.app/docs/shortcodes/mermaid/)
- [Tabs](https://hugo-book-demo.netlify.app/docs/shortcodes/tabs/)
Provides clickable panel that show extra hidden content.
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.
```
{{< expand >}}
## Markdown content
{{< /expand >}}
```toml
[markup.goldmark.renderer]
unsafe = true
```
### Tabs
If you are using `config.yaml` or `config.json`, consult the [configuration markup](https://gohugo.io/getting-started/configuration-markup/)
Useful if you want to show alternative information per platform or setting.
## Versioning
```
{{< tabs "uniqueid" >}}
{{< tab "MacOS" >}} # MacOS Content {{< /tab >}}
{{< tab "Linux" >}} # Linux Content {{< /tab >}}
{{< tab "Windows" >}} # Windows Content {{< /tab >}}
{{< /tabs >}}
```
This theme follows a simple incremental versioning. e.g. `v1`, `v2` and so on. There might be breaking changes between versions.
### Multi column text
Organize text in 2 or more columns to use space efficiently.
```html
{{< columns >}} <!-- begin columns block -->
# Left Content Lorem markdownum insigne...
<---> <!-- magic sparator, between columns -->
# Mid Content Lorem markdownum insigne...
<---> <!-- magic sparator, between columns -->
# Right Content Lorem markdownum insigne...
{{< /columns >}}
```
### Mermaid Chat
Render various charts with [mermaidjs](https://mermaidjs.github.io/)
```
{{< mermaid >}}
sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
{{< /mermaid >}}
```
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.
## Contributing
@ -268,8 +309,9 @@ sequenceDiagram
Contributions are welcome and I will review and consider pull requests.
Primary goals are:
- Keep it simple
- Keep minimal (or zero) default configuration
- Avoid interference with user-defined layouts
- Keep it simple.
- Keep minimal (or zero) default configuration.
- Avoid interference with user-defined layouts.
- Avoid using JS if it can be solved by CSS.
Feel free to open issue if you missing some configuration or customisation option.
Feel free to open issues if you find missing configuration or customisation options.

View File

@ -2,5 +2,9 @@
title: "{{ .Name | humanize | title }}"
weight: 1
# bookFlatSection: false
# bookShowToC: true
# bookToc: true
# bookHidden: false
# bookCollapseSection: false
# bookComments: false
# bookSearchExclude: false
---

View File

@ -1,4 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
title: "{{ .Name | humanize | title }}"
date: {{ .Date }}
# bookComments: false
# bookSearchExclude: false
---

View File

@ -1,2 +1,3 @@
/* To be overridden by theme user */
// @import "variables";
/* You can add custom styles here. */
// @import "plugins/numbered";

65
assets/_defaults.scss Normal file
View File

@ -0,0 +1,65 @@
// Used in layout
$padding-1: 1px !default;
$padding-4: 0.25rem !default;
$padding-8: 0.5rem !default;
$padding-16: 1rem !default;
$font-size-base: 16px !default;
$font-size-12: 0.75rem !default;
$font-size-14: 0.875rem !default;
$font-size-16: 1rem !default;
$border-radius: $padding-4 !default;
$body-font-weight: normal !default;
$body-min-width: 20rem !default;
$container-max-width: 80rem !default;
$menu-width: 16rem !default;
$toc-width: 16rem !default;
$mobile-breakpoint: $menu-width + $body-min-width * 1.2 + $toc-width !default;
$hint-colors: (
info: #6bf,
warning: #fd6,
danger: #f66,
) !default;
// Themes
@mixin theme-light {
--gray-100: #f8f9fa;
--gray-200: #e9ecef;
--gray-500: #adb5bd;
--color-link: #0055bb;
--color-visited-link: #8440f1;
--body-background: white;
--body-font-color: black;
--icon-filter: none;
--hint-color-info: #6bf;
--hint-color-warning: #fd6;
--hint-color-danger: #f66;
}
@mixin theme-dark {
--gray-100: #494e54;
--gray-200: #5c6165;
--gray-500: #999d9f;
--color-link: #84b2ff;
--color-visited-link: #b88dff;
--body-background: #343a40;
--body-font-color: #e9ecef;
--icon-filter: brightness(0) invert(1);
--hint-color-info: #6bf;
--hint-color-warning: #fd6;
--hint-color-danger: #f66;
}

View File

@ -1,39 +1,28 @@
/* roboto-300italic - latin */
@font-face {
font-family: 'Roboto';
font-style: italic;
font-weight: 300;
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 */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'),
url('fonts/roboto-v19-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+ */
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;
src: local('Roboto Bold'), local('Roboto-Bold'),
url('fonts/roboto-v19-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+ */
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;
src: local('Roboto Mono'), local('RobotoMono-Regular'),
url('fonts/roboto-mono-v6-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+ */
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;
}
body {

374
assets/_main.scss Normal file
View File

@ -0,0 +1,374 @@
html {
font-size: $font-size-base;
scroll-behavior: smooth;
touch-action: manipulation;
scrollbar-gutter: stable;
}
body {
min-width: $body-min-width;
color: var(--body-font-color);
background: var(--body-background);
// letter-spacing: 0.33px;
font-weight: $body-font-weight;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
box-sizing: border-box;
* {
box-sizing: inherit;
}
}
h1,
h2,
h3,
h4,
h5 {
font-weight: $body-font-weight;
}
a {
text-decoration: none;
color: var(--color-link);
}
img {
vertical-align: baseline;
}
:focus {
@include outline;
}
aside nav ul {
padding: 0;
margin: 0;
list-style: none;
li {
margin: 1em 0;
position: relative;
}
a {
display: block;
}
a:hover {
opacity: 0.5;
}
ul {
padding-inline-start: $padding-16;
}
}
ul.pagination {
display: flex;
justify-content: center;
list-style-type: none;
padding-inline-start: 0px;
.page-item a {
padding: $padding-16;
}
}
.container {
max-width: $container-max-width;
margin: 0 auto;
}
.book-icon {
filter: var(--icon-filter);
}
a .book-icon {
height: 1em;
width: 1em;
margin-inline-end: .5em;
}
.book-brand {
margin-top: 0;
margin-bottom: $padding-16;
img {
height: 1.5em;
width: 1.5em;
margin-inline-end: $padding-8;
}
}
.book-menu {
flex: 0 0 $menu-width;
font-size: $font-size-14;
.book-menu-content {
width: $menu-width;
padding: $padding-16;
background: var(--body-background);
@include fixed;
}
a,
label {
color: inherit;
cursor: pointer;
word-wrap: break-word;
}
a.active {
color: var(--color-link);
}
input.toggle + label + ul {
display: none;
}
input.toggle:checked + label + ul {
display: block;
}
input.toggle + label::after {
content: "";
}
input.toggle:checked + label::after {
content: "";
}
}
// for RTL support
body[dir="rtl"] .book-menu {
input.toggle + label::after {
content: "";
}
input.toggle:checked + label::after {
content: "";
}
}
.book-section-flat {
margin: $padding-16 * 2 0;
> a,
> span,
> label {
font-weight: bolder;
}
> ul {
padding-inline-start: 0;
}
}
.book-page {
min-width: $body-min-width;
flex-grow: 1;
padding: $padding-16;
}
.book-post {
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 {
display: none;
margin-bottom: $padding-16;
label {
line-height: 0;
}
h3 {
overflow: hidden;
text-overflow: ellipsis;
margin: 0 $padding-16;
}
img.book-icon {
height: 1.5em;
width: 1.5em;
}
}
.book-search {
position: relative;
margin: $padding-16 0;
border-bottom: 1px solid transparent;
input {
width: 100%;
padding: $padding-8;
border: 0;
border-radius: $border-radius;
background: var(--gray-100);
color: var(--body-font-color);
&:required + .book-search-spinner {
display: block;
}
}
.book-search-spinner {
position: absolute;
top: 0;
margin: $padding-8;
margin-inline-start: calc(100% - #{$padding-16 + $padding-8});
width: $padding-16;
height: $padding-16;
border: $padding-1 solid transparent;
border-top-color: var(--body-font-color);
border-radius: 50%;
@include spin(1s);
}
small {
opacity: 0.5;
}
}
.book-toc {
flex: 0 0 $toc-width;
font-size: $font-size-12;
.book-toc-content {
width: $toc-width;
padding: $padding-16;
@include fixed;
}
img {
height: 1em;
width: 1em;
}
nav > ul > li:first-child {
margin-top: 0;
}
}
.book-footer {
padding-top: $padding-16;
font-size: $font-size-14;
}
.book-comments {
margin-top: $padding-16;
}
.book-languages {
margin-block-end: $padding-16 * 2;
ul {
padding-inline-start: 1.5em;
}
}
// Responsive styles
.book-menu-content,
.book-toc-content,
.book-page,
.book-header aside,
.markdown {
transition: 0.2s ease-in-out;
transition-property: transform, margin, opacity, visibility;
will-change: transform, margin, opacity;
}
@media screen and (max-width: $mobile-breakpoint) {
#menu-control,
#toc-control {
display: inline;
}
.book-menu {
visibility: hidden;
margin-inline-start: -$menu-width;
z-index: 1;
}
.book-toc {
display: none;
}
.book-header {
display: block;
}
#menu-control:focus ~ main label[for="menu-control"] {
@include outline;
}
#menu-control:checked ~ main {
.book-menu {
visibility: initial;
}
.book-menu .book-menu-content {
transform: translateX($menu-width);
box-shadow: 0 0 $padding-8 rgba(0, 0, 0, 0.1);
}
.book-page {
opacity: 0.25;
}
.book-menu-overlay {
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
}
#toc-control:focus ~ main label[for="toc-control"] {
@include outline;
}
#toc-control:checked ~ main {
.book-header aside {
display: block;
}
}
// for RTL support
body[dir="rtl"] #menu-control:checked ~ main {
.book-menu .book-menu-content {
transform: translateX(-$menu-width);
}
}
}
// Extra space for big screens
@media screen and (min-width: $container-max-width) {
.book-page,
.book-menu .book-menu-content,
.book-toc .book-toc-content {
padding: $padding-16 * 2 $padding-16;
}
}

View File

@ -1,46 +1,87 @@
@import 'variables';
@import "variables";
.markdown {
line-height: 1.6;
h1, h2, h3, h4, h5 {
font-weight: normal;
line-height: 1;
margin-top: 1.5em;
margin-bottom: $padding-16;
}
// remove padding at the beginning of page
> :first-child {
margin-top: 0;
}
b, optgroup, strong {
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: normal;
line-height: 1;
margin-top: 1.5em;
margin-bottom: $padding-16;
a.anchor {
opacity: 0;
font-size: 0.75em;
vertical-align: middle;
text-decoration: none;
}
&:hover a.anchor,
a.anchor:focus {
opacity: initial;
}
}
h4,
h5,
h6 {
font-weight: bolder;
}
h5 {
font-size: 0.875em;
}
h6 {
font-size: 0.75em;
}
b,
optgroup,
strong {
font-weight: bolder;
}
a {
text-decoration: none;
&:hover {
text-decoration: underline;
}
&:visited {
color: var(--color-visited-link);
}
}
img {
max-width: 100%;
height: auto;
}
code {
direction: ltr;
unicode-bidi: embed;
padding: 0 $padding-4;
background: $gray-200;
background: var(--gray-200);
border-radius: $border-radius;
font-size: .875em;
font-size: 0.875em;
}
pre {
direction: ltr;
unicode-bidi: embed;
padding: $padding-16;
background: $gray-100;
background: var(--gray-100);
border-radius: $border-radius;
overflow-x: auto;
@ -50,53 +91,122 @@
}
}
p {
word-wrap: break-word;
}
blockquote {
margin: $padding-16 0;
padding: $padding-4 ($padding-16 - $padding-4); //to keep total left space 16dp
padding: $padding-8 $padding-16 $padding-8 ($padding-16 - $padding-4); //to keep total left space 16dp
border-left: $padding-4 solid $gray-200;
border-inline-start: $padding-4 solid var(--gray-200);
border-radius: $border-radius;
:first-child { margin-top: 0; }
:last-child { margin-bottom: 0; }
:first-child {
margin-top: 0;
}
:last-child {
margin-bottom: 0;
}
}
table {
overflow: auto;
display: block;
border-spacing: 0;
border-collapse: collapse;
margin-top: $padding-16;
margin-bottom: $padding-16;
tr th, tr td {
tr th,
tr td {
padding: $padding-8 $padding-16;
line-height: 1;
border: $padding-1 solid $gray-200;
border: $padding-1 solid var(--gray-200);
}
tr:nth-child(2n) {
background: $gray-100;
background: var(--gray-100);
}
}
hr {
height: $padding-1;
border: none;
background: $gray-200;
background: var(--gray-200);
}
ul, ol {
padding-left: $padding-16 * 2;
ul,
ol {
padding-inline-start: $padding-16 * 2;
word-wrap: break-word;
}
dl {
// padding-left: $padding-16;
dt {
font-weight: bolder;
margin-top: $padding-16;
}
dd {
margin-left: $padding-16 * 2;
margin-inline-start: 0;
margin-bottom: $padding-16;
}
}
// Special case for highlighted code with line numbers
.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;
}
td:nth-child(2) pre {
margin: 0;
padding-inline-start: 0;
}
}
}
details {
padding: $padding-16;
border: $padding-1 solid var(--gray-200);
border-radius: $border-radius;
summary {
line-height: 1;
padding: $padding-16;
margin: -$padding-16;
cursor: pointer;
}
&[open] summary {
margin-bottom: 0;
}
}
figure {
margin: $padding-16 0;
figcaption p {
margin-top: 0;
}
}
}
.markdown-inner {
// Util class to remove extra margin in nested markdown content
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
}

17
assets/_print.scss Normal file
View File

@ -0,0 +1,17 @@
@media print {
.book-menu,
.book-footer,
.book-toc {
display: none;
}
.book-header,
.book-header aside {
display: block;
}
main {
// Fix for https://bugzilla.mozilla.org/show_bug.cgi?id=939897
display: block !important;
}
}

View File

@ -1,99 +1,104 @@
@import "variables";
.markdown {
// {{< expand "Label" "icon" >}}
.book-expand {
margin-top: $padding-16;
margin-bottom: $padding-16;
.markdown-inner {
// Util class to remove extra margin in nested markdown content
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
}
border: $padding-1 solid var(--gray-200);
border-radius: $border-radius;
// {{< expand "Label" "icon" >}}
.book-expand {
margin-top: $padding-16;
margin-bottom: $padding-16;
overflow: hidden;
border: $padding-1 solid $gray-200;
border-radius: $border-radius;
.book-expand-head {
background: var(--gray-100);
padding: $padding-8 $padding-16;
cursor: pointer;
}
overflow: hidden;
.book-expand-content {
display: none;
padding: $padding-16;
}
.book-expand-head {
background: $gray-100;
padding: $padding-8 $padding-16;
cursor: pointer;
input[type="checkbox"]:checked + .book-expand-content {
display: block;
}
}
.book-expand-content {
display: none;
padding: $padding-16;
// {{< tabs >}}
.book-tabs {
margin-top: $padding-16;
margin-bottom: $padding-16;
border: $padding-1 solid var(--gray-200);
border-radius: $border-radius;
overflow: hidden;
display: flex;
flex-wrap: wrap;
label {
display: inline-block;
padding: $padding-8 $padding-16;
border-bottom: $padding-1 transparent;
cursor: pointer;
}
.book-tabs-content {
order: 999; //Move content blocks to the end
width: 100%;
border-top: $padding-1 solid var(--gray-100);
padding: $padding-16;
display: none;
}
input[type="radio"]:checked + label {
border-bottom: $padding-1 solid var(--color-link);
}
input[type="radio"]:checked + label + .book-tabs-content {
display: block;
}
input[type="radio"]:focus + label {
@include outline;
}
}
input[type="checkbox"]:checked + .book-expand-content {
display: block;
// {{< columns >}}
.book-columns {
margin-left: -$padding-16;
margin-right: -$padding-16;
> div {
margin: $padding-16 0;
min-width: $body-min-width * 0.66;
padding: 0 $padding-16;
}
}
}
// {{< tabs >}}
.book-tabs {
margin-top: $padding-16;
margin-bottom: $padding-16;
border: $padding-1 solid $gray-200;
border-radius: $border-radius;
overflow: hidden;
display: flex;
flex-wrap: wrap;
label {
// {{< button >}}
a.book-btn {
display: inline-block;
padding: $padding-8 $padding-16;
border-bottom: $padding-1 transparent;
cursor: pointer;
}
.book-tabs-content {
order: 999; //Move content blocks to the end
width: 100%;
border-top: $padding-1 solid $gray-100;
padding: $padding-16;
display: none;
}
input[type="radio"]:checked + label {
border-bottom: $padding-1 solid $color-link;
}
input[type="radio"]:checked + label + .book-tabs-content {
display: block;
}
}
// {{< columns >}}
.book-columns {
margin-left: -$padding-16;
margin-right: -$padding-16;
> div {
margin: $padding-16 0;
// max-width: 50%;
min-width: $body-min-width * 0.66;
font-size: $font-size-14;
color: var(--color-link);
line-height: $padding-16 * 2;
padding: 0 $padding-16;
border: $padding-1 solid var(--color-link);
border-radius: $border-radius;
cursor: pointer;
&:hover {
text-decoration: none;
}
}
// {{< hint >}}
.book-hint {
@each $name, $color in $hint-colors {
&.#{$name} {
border-color: $color;
background-color: rgba($color, 0.1);
}
}
}
}
// {{< button >}}
a.book-btn {
display: inline-block;
color: $color-link !important;
text-decoration: none !important;
border: $padding-1 solid $color-link;
border-radius: $border-radius;
padding: $padding-4 $padding-16;
margin-top: $padding-8;
margin-bottom: $padding-8;
cursor: pointer;
}

View File

@ -42,6 +42,45 @@
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-small {
font-size: .875em;
}
.hidden {
display: none;
}
input.toggle {
height: 0;
width: 0;
overflow: hidden;
opacity: 0;
position: absolute;
}
.clearfix::after {
content: "";
display: table;
clear: both;
}
@mixin spin($duration) {
animation: spin $duration ease infinite;
@keyframes spin {
100% {
transform: rotate(360deg);
}
}
}
@mixin fixed {
position: fixed;
top: 0;
@ -50,12 +89,8 @@
overflow-y: auto;
}
@mixin dark-links {
a {
color: $color-dark-link;
}
a.active {
color: $color-link;
}
@mixin outline {
outline-style: auto;
outline-color: currentColor;
outline-color: -webkit-focus-ring-color;
}

View File

@ -1,43 +1,3 @@
// Used in layout
$padding-1: 1px;
$padding-4: 0.25rem;
$padding-8: 0.5rem;
$padding-16: 1rem;
/* You can override SASS variables here. */
$font-size-base: 16px;
$font-size-12: 0.75rem;
$font-size-14: 0.875rem;
$font-size-16: 1rem;
$border-radius: 0.15rem;
// Grayscale
$white: #ffffff;
$gray-100: #f8f9fa;
$gray-200: #e9ecef;
$gray-300: #dee2e6;
$gray-400: #ced4da;
$gray-500: #adb5bd;
$gray-600: #868e96;
$gray-700: #495057;
$gray-800: #343a40;
$gray-900: #212529;
$black: #000;
$color-link: #004ed0;
$color-visited-link: #8440f1;
$color-dark-link: $gray-800;
$body-background: white;
$body-font-color: $gray-800;
$body-font-weight: normal;
$body-min-width: 20rem;
$container-max-width: 80rem;
$header-height: 3.5rem;
$menu-width: 16rem;
$toc-width: 16rem;
$md-breakpoint: $menu-width + $body-min-width * 1.25 + $toc-width;
$sm-breakpoint: $menu-width + $body-min-width;
// @import "plugins/dark";

View File

@ -1,250 +1,15 @@
@import "normalize";
@import "defaults";
@import "variables";
@import "themes/{{ default "light" .Site.Params.BookTheme }}";
@import "normalize";
@import "utils";
@import "main";
@import "fonts";
@import "print";
@import "markdown";
@import "shortcodes";
html {
font-size: $font-size-base;
letter-spacing: 0.33px;
scroll-behavior: smooth;
}
html,
body {
min-width: $body-min-width;
overflow-x: hidden;
}
body {
color: $body-font-color;
background: $body-background;
font-family: sans-serif;
font-weight: $body-font-weight;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
box-sizing: border-box;
* {
box-sizing: inherit;
}
}
h1,
h2,
h3,
h4,
h5 {
font-weight: $body-font-weight;
}
a {
text-decoration: none;
color: $color-link;
&:visited {
color: $color-visited-link;
}
}
img {
vertical-align: baseline;
}
aside nav ul {
padding: 0;
margin: 0;
list-style: none;
li {
margin: 1em 0;
}
a {
display: block;
}
a:hover {
opacity: 0.5;
}
ul {
padding-left: $padding-16;
}
}
ul.pagination {
display: flex;
justify-content: center;
.page-item a {
padding: $padding-16;
}
}
.container {
max-width: $container-max-width;
margin: 0 auto;
}
.book-brand {
margin-top: 0;
}
.book-menu {
flex: 0 0 $menu-width;
font-size: $font-size-14;
nav {
width: $menu-width;
padding: $padding-16;
@include fixed;
}
@include dark-links;
}
.book-section-flat {
margin-bottom: $padding-16 * 2;
&:not(:first-child) {
margin-top: $padding-16 * 2;
}
> a,
> span {
font-weight: bolder;
}
> ul {
padding-left: 0;
}
}
.book-page {
min-width: $body-min-width;
flex-grow: 1;
padding: $padding-16;
}
.book-header {
margin-bottom: $padding-16;
display: none;
}
.book-toc {
flex: 0 0 $toc-width;
font-size: $font-size-12;
nav {
width: $toc-width;
padding: $padding-16;
@include fixed;
}
img {
height: 1em;
}
nav > ul > li:first-child {
margin-top: 0;
}
// Classes to hide nested levels of ToC (can be replaced by @for, but it's more clear like this)
&.level-1 ul ul,
&.level-2 ul ul ul,
&.level-3 ul ul ul ul,
&.level-4 ul ul ul ul ul,
&.level-5 ul ul ul ul ul ul,
&.level-6 ul ul ul ul ul ul ul {
display: none;
}
}
.book-footer {
display: flex;
padding-top: $padding-16;
font-size: $font-size-14;
img {
height: 1em;
}
}
.book-posts {
min-width: $body-min-width;
max-width: $sm-breakpoint;
flex-grow: 1;
padding: $padding-16;
article {
padding-bottom: $padding-16;
}
}
.book-home {
padding: $padding-16;
}
// Responsive styles
aside nav,
.book-page,
.book-posts,
.markdown {
transition: 0.2s ease-in-out;
transition-property: transform, margin-left, opacity;
will-change: transform, margin-left;
}
@media screen and (max-width: $md-breakpoint) {
.book-toc {
display: none;
}
}
@media screen and (max-width: $sm-breakpoint) {
.book-menu {
margin-left: -$menu-width;
}
.book-header {
display: flex;
}
#menu-control:checked + main {
.book-menu nav,
.book-page,
.book-posts {
transform: translateX($menu-width);
}
.book-header label {
transform: rotate(90deg);
}
.markdown {
opacity: 0.25;
}
}
}
// Extra space for big screens
@media screen and (min-width: $container-max-width) {
.book-page,
.book-posts,
.book-menu nav,
.book-toc nav {
padding: $padding-16 * 2 $padding-16;
}
}
// Add fonts
@import "fonts";
// Add custom defined styles
// Custom defined styles
@import "custom";

24
assets/clipboard.js Normal file
View File

@ -0,0 +1,24 @@
(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) {
if (window.getSelection().toString()) {
return;
}
select(code.parentElement);
if (navigator.clipboard) {
navigator.clipboard.writeText(code.parentElement.textContent);
}
});
});
})();

15
assets/manifest.json Normal file
View File

@ -0,0 +1,15 @@
{
"name": "{{ .Site.Title }}",
"short_name": "{{ .Site.Title }}",
"start_url": "{{ "./" | relURL }}",
"scope": "{{ "./" | relURL }}",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#000000",
"icons": [
{
"src": "{{ "./favicon.svg" | relURL }}",
"sizes": "512x512"
}
]
}

7
assets/menu-reset.js Normal file
View File

@ -0,0 +1,7 @@
(function() {
var menu = document.querySelector("aside .book-menu-content");
addEventListener("beforeunload", function(event) {
localStorage.setItem("menu.scrollTop", menu.scrollTop);
});
menu.scrollTop = localStorage.getItem("menu.scrollTop");
})();

6
assets/mermaid.json Normal file
View File

@ -0,0 +1,6 @@
{
"flowchart": {
"useMaxWidth":true
},
"theme": "default"
}

View File

@ -0,0 +1,34 @@
$startLevel: 1;
$endLevel: 6;
.book-page .markdown.book-article {
@for $currentLevel from $startLevel through $endLevel {
h#{$currentLevel} {
counter-increment: h#{$currentLevel};
counter-reset: h#{$currentLevel + 1};
$content: "";
@for $n from $startLevel through $currentLevel {
$content: $content + 'counter(h#{$n})"."';
}
&::before {
content: unquote($content) " ";
}
}
}
}
.book-toc nav#TableOfContents ul {
counter-reset: item;
li {
counter-increment: item;
&:before {
content: counters(item, ".") ". ";
float: left;
margin-inline-end: $padding-4;
}
}
}

View File

@ -0,0 +1,26 @@
@import "defaults";
@import "variables";
// Webkit
::-webkit-scrollbar {
width: $padding-8;
}
::-webkit-scrollbar-thumb {
background: transparent;
border-radius: $padding-8;
}
:hover::-webkit-scrollbar-thumb {
background: var(--gray-500);
}
// MS
body {
-ms-overflow-style: -ms-autohiding-scrollbar;
}
// Future
.book-menu nav {
scrollbar-color: transparent var(--gray-500);
}

17
assets/search-data.json Normal file
View File

@ -0,0 +1,17 @@
[
{{- $pages := where .Site.Pages "Kind" "in" (slice "page" "section") -}}
{{- $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}} {
"id": {{ $index }},
"href": "{{ $page.RelPermalink }}",
"title": {{ (partial "docs/title" $page) | jsonify }},
"section": {{ (partial "docs/title" $page.Parent) | jsonify }},
"content": {{ $page.Plain | jsonify }}
}
{{- end -}}
]

113
assets/search.js Normal file
View File

@ -0,0 +1,113 @@
'use strict';
{{ $searchDataFile := printf "%s.search-data.json" .Language.Lang }}
{{ $searchData := resources.Get "search-data.json" | resources.ExecuteAsTemplate $searchDataFile . | resources.Minify | resources.Fingerprint }}
{{ $searchConfig := i18n "bookSearchConfig" | default "{}" }}
(function () {
const searchDataURL = '{{ $searchData.RelPermalink }}';
const indexConfig = Object.assign({{ $searchConfig }}, {
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');
const results = document.querySelector('#book-search-results');
if (!input) {
return
}
input.addEventListener('focus', init);
input.addEventListener('keyup', search);
document.addEventListener('keypress', focusSearchFieldOnKeyPress);
/**
* @param {Event} event
*/
function focusSearchFieldOnKeyPress(event) {
if (event.target.value !== undefined) {
return;
}
if (input === document.activeElement) {
return;
}
const characterPressed = String.fromCharCode(event.charCode);
if (!isHotkey(characterPressed)) {
return;
}
input.focus();
event.preventDefault();
}
/**
* @param {String} character
* @returns {Boolean}
*/
function isHotkey(character) {
const dataHotkeys = input.getAttribute('data-hotkeys') || '';
return dataHotkeys.indexOf(character) >= 0;
}
function init() {
input.removeEventListener('focus', init); // init once
input.required = true;
fetch(searchDataURL)
.then(pages => pages.json())
.then(pages => {
window.bookSearchIndex = new Fuse(pages, indexConfig);
})
.then(() => input.required = false)
.then(search);
}
function search() {
while (results.firstChild) {
results.removeChild(results.firstChild);
}
if (!input.value) {
return;
}
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.item.href;
a.textContent = page.item.title;
small.textContent = page.item.section;
results.appendChild(li);
});
}
/**
* @param {String} content
* @returns {Node}
*/
function element(content) {
const div = document.createElement('div');
div.innerHTML = content;
return div.firstChild;
}
})();

7
assets/sw-register.js Normal file
View File

@ -0,0 +1,7 @@
{{- $swJS := resources.Get "sw.js" | resources.ExecuteAsTemplate "sw.js" . -}}
if (navigator.serviceWorker) {
navigator.serviceWorker.register(
"{{ $swJS.RelPermalink }}",
{ scope: "{{ "./" | relURL }}" }
);
}

55
assets/sw.js Normal file
View File

@ -0,0 +1,55 @@
const cacheName = self.location.pathname
const pages = [
{{ if eq .Site.Params.BookServiceWorker "precache" }}
{{ range .Site.AllPages -}}
"{{ .RelPermalink }}",
{{ end -}}
{{ end }}
];
self.addEventListener("install", function (event) {
self.skipWaiting();
caches.open(cacheName).then((cache) => {
return cache.addAll(pages);
});
});
self.addEventListener("fetch", (event) => {
const request = event.request;
if (request.method !== "GET") {
return;
}
/**
* @param {Response} response
* @returns {Promise<Response>}
*/
function saveToCache(response) {
if (cacheable(response)) {
return caches
.open(cacheName)
.then((cache) => cache.put(request, response.clone()))
.then(() => response);
} else {
return response;
}
}
/**
* @param {Error} error
*/
function serveFromCache(error) {
return caches.open(cacheName).then((cache) => cache.match(request.url));
}
/**
* @param {Response} response
* @returns {Boolean}
*/
function cacheable(response) {
return response.type === "basic" && response.ok && !response.headers.has("Content-Disposition")
}
event.respondWith(fetch(request).then(saveToCache).catch(serveFromCache));
});

9
assets/themes/_auto.scss Normal file
View File

@ -0,0 +1,9 @@
:root {
@include theme-light;
}
@media (prefers-color-scheme: dark) {
:root {
@include theme-dark;
}
}

3
assets/themes/_dark.scss Normal file
View File

@ -0,0 +1,3 @@
:root {
@include theme-dark;
}

View File

@ -0,0 +1,3 @@
:root {
@include theme-light;
}

View File

@ -1 +1,4 @@
@import "variables";
/* You can add custom styles here. */
// @import "plugins/numbered";
// @import "plugins/scrollbars";

View File

@ -0,0 +1 @@
/* You can override SASS variables here. */

View File

@ -1,50 +0,0 @@
# hugo server --minify --themesDir ... --baseURL=http://0.0.0.0:1313/example
baseURL = 'https://example.com/'
title = 'Hugo Book'
theme = 'hugo-book'
disableKinds = ['taxonomy', 'taxonomyTerm']
# themesDir = '../..'
# Book configuration
disablePathToLower = true
enableGitInfo = true
# Code highlight
# pygmentsStyle = 'monokailight'
pygmentsCodeFences = true
[params]
# (Optional, default 6) Set how many table of contents levels to be showed on page.
# Use false to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/)
# You can also specify this parameter per page in front matter
BookToC = 3
# (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'
# This value is duplicate of $link-color for making active link highlight in menu bundle mode
# BookMenuBundleActiveLinkColor = '\#004ed0'
# Include JS scripts in pages. Disabled by default.
# - Keep side menu on same scroll position during navigation
BookEnableJS = true
# Set source repository location.
# Used for 'Last Modified' and 'Edit this page' links.
BookRepo = 'https://github.com/alex-shpak/hugo-book'
# Enable "Edit this page" links for 'doc' page type.
# Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
# Path must point to 'content' directory of repo.
BookEditPath = 'edit/master/exampleSite/content'
# Configure the date format used on the pages
# - In git information
# - In blog posts
BookDateFormat = 'Jan 2, 2006'

View File

@ -1,50 +0,0 @@
# hugo server --minify --themesDir ... --baseURL=http://0.0.0.0:1313/example
baseURL: https://example.com/
title: Hugo Book
theme: hugo-book
disableKinds: ['taxonomy', 'taxonomyTerm']
# themesDir: ../..
# Book configuration
disablePathToLower: true
enableGitInfo: true
# Code highlight
# pygmentsStyle: monokailight
pygmentsCodeFences: true
params:
# (Optional, default 6) Set how many table of contents levels to be showed on page.
# Use false/off to hide ToC, note that 0 will default to 6 (https://gohugo.io/functions/default/)
# You can also specify this parameter per page in front matter
BookToC: 3
# (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
# This value is duplicate of $link-color for making active link highlight in menu bundle mode
# BookMenuBundleActiveLinkColor: \#004ed0
# Include JS scripts in pages. Disabled by default.
# - Keep side menu on same scroll position during navigation
BookEnableJS: true
# Set source repository location.
# Used for 'Last Modified' and 'Edit this page' links.
BookRepo: https://github.com/alex-shpak/hugo-book
# Enable "Edit this page" links for 'doc' page type.
# Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
# Path must point to 'content' directory of repo.
BookEditPath: edit/master/exampleSite/content
# Configure the date format used on the pages
# - In git information
# - In blog posts
BookDateFormat: 'Jan 2, 2006'

View File

@ -0,0 +1,41 @@
---
title: Introduction
type: docs
---
# Acerbo datus maxime
{{% 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?

View File

@ -0,0 +1,71 @@
---
weight: 1
bookFlatSection: true
title: "Example Site"
---
# Introduction
## Ferre hinnitibus erat accipitrem dixi Troiae tollens
Lorem markdownum, a quoque nutu est *quodcumque mandasset* veluti. Passim
inportuna totidemque nympha fert; repetens pendent, poenarum guttura sed vacet
non, mortali undas. Omnis pharetramque gramen portentificisque membris servatum
novabis fallit de nubibus atque silvas mihi. **Dixit repetitaque Quid**; verrit
longa; sententia [mandat](http://pastor-ad.io/questussilvas) quascumque nescio
solebat [litore](http://lacrimas-ab.net/); noctes. *Hostem haerentem* circuit
[plenaque tamen](http://www.sine.io/in).
- Pedum ne indigenae finire invergens carpebat
- Velit posses summoque
- De fumos illa foret
## Est simul fameque tauri qua ad
Locum nullus nisi vomentes. Ab Persea sermone vela, miratur aratro; eandem
Argolicas gener.
## Me sol
Nec dis certa fuit socer, Nonacria **dies** manet tacitaque sibi? Sucis est
iactata Castrumque iudex, et iactato quoque terraeque es tandem et maternos
vittis. Lumina litus bene poenamque animos callem ne tuas in leones illam dea
cadunt genus, et pleno nunc in quod. Anumque crescentesque sanguinis
[progenies](http://www.late.net/alimentavirides) nuribus rustica tinguet. Pater
omnes liquido creditis noctem.
if (mirrored(icmp_dvd_pim, 3, smbMirroredHard) != lion(clickImportQueue,
viralItunesBalancing, bankruptcy_file_pptp)) {
file += ip_cybercrime_suffix;
}
if (runtimeSmartRom == netMarketingWord) {
virusBalancingWin *= scriptPromptBespoke + raster(post_drive,
windowsSli);
cd = address_hertz_trojan;
soap_ccd.pcbServerGigahertz(asp_hardware_isa, offlinePeopleware, nui);
} else {
megabyte.api = modem_flowchart - web + syntaxHalftoneAddress;
}
if (3 < mebibyteNetworkAnimated) {
pharming_regular_error *= jsp_ribbon + algorithm * recycleMediaKindle(
dvrSyntax, cdma);
adf_sla *= hoverCropDrive;
templateNtfs = -1 - vertical;
} else {
expressionCompressionVariable.bootMulti = white_eup_javascript(
table_suffix);
guidPpiPram.tracerouteLinux += rtfTerabyteQuicktime(1,
managementRosetta(webcamActivex), 740874);
}
var virusTweetSsl = nullGigo;
## Trepident sitimque
Sentiet et ferali errorem fessam, coercet superbus, Ascaniumque in pennis
mediis; dolor? Vidit imi **Aeacon** perfida propositos adde, tua Somni Fluctibus
errante lustrat non.
Tamen inde, vos videt e flammis Scythica parantem rupisque pectora umbras. Haec
ficta canistris repercusso simul ego aris Dixit! Esse Fama trepidare hunc
crescendo vigor ululasse vertice *exspatiantur* celer tepidique petita aversata
oculis iussa est me ferro.

View File

@ -0,0 +1,12 @@
# 4th Level of Menu
## Caesorum illa tu sentit micat vestes papyriferi
Inde aderam facti; Theseus vis de tauri illa peream. Oculos **uberaque** non
regisque vobis cursuque, opus venit quam vulnera. Et maiora necemque, lege modo;
gestanda nitidi, vero? Dum ne pectoraque testantur.
Venasque repulsa Samos qui, exspectatum eram animosque hinc, [aut
manes](http://www.creveratnon.net/apricaaetheriis), Assyrii. Cupiens auctoribus
pariter rubet, profana magni super nocens. Vos ius sibilat inpar turba visae
iusto! Sedes ante dum superest **extrema**.

View File

@ -0,0 +1,26 @@
# 3rd Level of Menu
Nefas discordemque domino montes numen tum humili nexilibusque exit, Iove. Quae
miror esse, scelerisque Melaneus viribus. Miseri laurus. Hoc est proposita me
ante aliquid, aura inponere candidioribus quidque accendit bella, sumpta.
Intravit quam erat figentem hunc, motus de fontes parvo tempestate.
iscsi_virus = pitch(json_in_on(eupViral),
northbridge_services_troubleshooting, personal(
firmware_rw.trash_rw_crm.device(interactive_gopher_personal,
software, -1), megabit, ergonomicsSoftware(cmyk_usb_panel,
mips_whitelist_duplex, cpa)));
if (5) {
managementNetwork += dma - boolean;
kilohertz_token = 2;
honeypot_affiliate_ergonomics = fiber;
}
mouseNorthbridge = byte(nybble_xmp_modem.horse_subnet(
analogThroughputService * graphicPoint, drop(daw_bit, dnsIntranet),
gateway_ospf), repository.domain_key.mouse(serverData(fileNetwork,
trim_duplex_file), cellTapeDirect, token_tooltip_mashup(
ripcordingMashup)));
module_it = honeypot_driver(client_cold_dvr(593902, ripping_frequency) +
coreLog.joystick(componentUdpLink), windows_expansion_touchscreen);
bashGigabit.external.reality(2, server_hardware_codec.flops.ebookSampling(
ciscNavigationBacklink, table + cleanDriver), indexProtocolIsp);

View File

@ -0,0 +1,4 @@
---
bookCollapseSection: true
weight: 20
---

View File

@ -1,3 +1,7 @@
---
weight: 10
---
# Ubi loqui
## Mentem genus facietque salire tempus bracchia
@ -78,4 +82,4 @@ gestanda nitidi, vero? Dum ne pectoraque testantur.
Venasque repulsa Samos qui, exspectatum eram animosque hinc, [aut
manes](http://www.creveratnon.net/apricaaetheriis), Assyrii. Cupiens auctoribus
pariter rubet, profana magni super nocens. Vos ius sibilat inpar turba visae
iusto! Sedes ante dum superest **extrema**.
iusto! Sedes ante dum superest **extrema**.

View File

@ -1,3 +1,7 @@
---
title: With ToC
weight: 1
---
# Caput vino delphine in tamen vias
## Cognita laeva illo fracta
@ -57,4 +61,4 @@ Leucothoen obitum?
Postibus mittam est *nubibus principium pluma*, exsecratur facta et. Iunge
Mnemonidas pallamque pars; vere restitit alis flumina quae **quoque**, est
ignara infestus Pyrrha. Di ducis terris maculatum At sede praemia manes
nullaque!
nullaque!

View File

@ -1,4 +1,6 @@
---
title: Without ToC
weight: 2
bookToc: false
---

View File

@ -0,0 +1,3 @@
---
bookFlatSection: true
---

View File

@ -0,0 +1,13 @@
# Buttons
Buttons are styled links that can lead to local page or external link.
## Example
```tpl
{{</* button relref="/" [class="..."] */>}}Get Home{{</* /button */>}}
{{</* button href="https://github.com/alex-shpak/hugo-book" */>}}Contribute{{</* /button */>}}
```
{{<button relref="/">}}Get Home{{</button>}}
{{<button href="https://github.com/alex-shpak/hugo-book">}}Contribute{{</button>}}

View 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 %}}

View File

@ -0,0 +1,22 @@
# Details
Details shortcode is a helper for `details` html5 element. It is going to replace `expand` shortcode.
## Example
```tpl
{{%/* details "Title" [open] */%}}
## Markdown content
Lorem markdownum insigne...
{{%/* /details */%}}
```
```tpl
{{%/* details title="Title" open=true */%}}
## Markdown content
Lorem markdownum insigne...
{{%/* /details */%}}
```
{{% details "Title" open %}}
## Markdown content
Lorem markdownum insigne...
{{% /details %}}

View File

@ -0,0 +1,32 @@
# Hints
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] */%}}
**Markdown content**
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
{{%/* /hint */%}}
```
## Example
{{% 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 warning %}}
**Markdown content**
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
{{% /hint %}}
{{% hint danger %}}
**Markdown content**
Lorem markdownum insigne. Olympo signis Delphis! Retexi Nereius nova develat
stringit, frustra Saturnius uteroque inter! Oculis non ritibus Telethusa
{{% /hint %}}

View File

@ -0,0 +1,31 @@
---
title: KaTeX
---
# KaTeX
KaTeX shortcode let you render math typesetting in markdown document. See [KaTeX](https://katex.org/)
## Example
{{% columns %}}
```latex
{{</* katex display=true >}}
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
{{< /katex */>}}
```
<--->
{{< katex display=true >}}
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
{{< /katex >}}
{{% /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=true >}}
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
{{< /katex >}}
Text continues here.

View File

@ -0,0 +1,42 @@
# Mermaid Chart
[MermaidJS](https://mermaid-js.github.io/) is library for generating svg charts and diagrams from text.
{{% 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 %}}
## Example
{{% columns %}}
```tpl
{{</* mermaid [class="..."] >}}
stateDiagram-v2
State1: The state with a note
note right of State1
Important information! You can write
notes.
end note
State1 --> State2
note left of State2 : This is the note to the left.
{{< /mermaid */>}}
```
<--->
{{<mermaid>}}
stateDiagram-v2
State1: The state with a note
note right of State1
Important information! You can write
notes.
end note
State1 --> State2
note left of State2 : This is the note to the left.
{{</mermaid>}}
{{% /columns %}}

View 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>}}

View File

@ -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.

View File

@ -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.

View File

@ -0,0 +1,50 @@
# Tabs
Tabs let you organize content by context, for example installation instructions for each supported platform.
```tpl
{{</* tabs "id" */>}}
{{%/* tab "MacOS" */%}} # MacOS Content {{%/* /tab */%}}
{{%/* tab "Linux" */%}} # Linux Content {{%/* /tab */%}}
{{%/* tab "Windows" */%}} # Windows Content {{%/* /tab */%}}
{{</* /tabs */>}}
```
## Example
{{< tabs >}}
{{% tab "MacOS" %}}
# MacOS
This is tab **MacOS** 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.
{{% /tab %}}
{{% tab "Linux" %}}
# Linux
This is tab **Linux** 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.
{{% /tab %}}
{{% tab "Windows" %}}
# Windows
This is tab **Windows** 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.
{{% /tab %}}
{{< /tabs >}}

View File

@ -0,0 +1,7 @@
---
menu:
after:
name: blog
weight: 5
title: Blog
---

View 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?

View File

@ -1,11 +1,11 @@
---
title: Introduction
title: 介绍
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

View File

@ -1,52 +0,0 @@
# Vagus elidunt
## Mole et vultus populifer quaque primoque non
Lorem **markdownum pignora pelle** est tota propiore conpellat pectoribus de
pectora summo. Redit teque digerit hominumque toris verebor lumina non cervice
subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc
caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis
lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum.
1. Exierant elisi ambit vivere dedere
2. Duce pollice
3. Eris modo
4. Spargitque ferrea quos palude
Rursus nulli murmur; hastile inridet ut ab gravi sententia! Nomine potitus
silentia flumen, sustinet placuit petis in dilapsa erat sunt. [Atria
tractus](http://agendo-dis.io/) malis.
1. Comas hunc haec pietate fetum procerum dixit
2. Post torum vates letum Tiresia
3. Flumen querellas
4. Arcanaque montibus omnes
5. Quidem et
## Mane refeci capiebant unda mulcebat
Victa caducifer, [malo vulnere](http://www.nec.org/iactorcolonos.php) contra
dicere aurato, ludit regale, voca! Retorsit colit est profanae esse virescere
furit nec; iaculi [matertera](http://iugis-thalamique.com/pecus) et visa est,
viribus. Divesque creatis, tecta novat collumque vulnus
[est](http://canentiet.net/lateri.php), parvas. **Faces illo pepulere** tempus
adest. Tendit flamma, ab opes virum sustinet, sidus sequendo urbis.
var multiplatform = cifs(illegal, zip, memory) / pcbPowerJavascript;
hdmi -= 3;
tunneling(constant(service_fi_hyper, avatarBar), matrixUmlMbps);
frequency /= nat(keyboardRecycle, programmingGnuPerl) + icfExbibyteCursor;
io_dithering(-5, markup / languageShortcut - driveHtml);
Iubar proles corpore raptos vero auctor imperium; sed et huic: manus caeli
Lelegas tu lux. Verbis obstitit intus oblectamina fixis linguisque ausus sperare
Echionides cornuaque tenent clausit possit. Omnia putatur. Praeteritae refert
ausus; ferebant e primus lora nutat, vici quae mea ipse. Et iter nil spectatae
vulnus haerentia iuste et exercebat, sui et.
Eurytus Hector, [materna](http://mandereevincitque.net/), ipsumque ut Politen,
nec, nate, ignari, vernum cohaesit sequitur. Vel **mitis temploque** vocatus,
inque alis, *oculos nomen* non silvis corpore coniunx ne displicet illa.
Crescunt non unus, vidit visa quantum inmiti flumina mortis facto sic: undique a
alios vincula sunt iactata abdita! Suspenderat ego fuit tendit: luna, ante urbem
Propoetides **parte**.

View File

@ -1,55 +0,0 @@
# Ista qua aera
## Tetigisse hac duc omnipotens urbis per sapiente
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.
var mnemonicPcmcia = file;
if (bookmarkMultiprocessing) {
core.intranetDigitize = menu(vdslWordart(enterprise,
dviRealityTeraflops));
} else {
portal_socket.jsp_shareware_digital = multicasting(component_uml);
memory.ppc_title_hit(lunWebFormat + fontSmartphoneView, tween *
default_hard, 5 + laptopMethod);
wddm_tablet_null.widgetFileRate(3, leakMaskResponsive);
}
var siteRjSoftware = installer;
html.text = address + nasSystemDns;
## Lac roratis Diomede
*Aut in vivitur* quam ibi is veniebat Herculis mihi hominem! In matrem gesserit
manus [coniuge silva](http://etinachus.org/cornibusalter.html) pectore simul nec
felix in haud ostendit lacrimavit mora. Digna adspice temptata, Palaestina armis
at crura centum tellus ni tibi Amphiona mansit, bello tibi pugnat fuit. Sidera
nec ambo temporis summe tempore, falsa committere, pater horrenda, erat ast
cadunt preces.
1. Ventorum pariturae cum discors fit dabat inguina
2. Armeniae viscera
3. Et monitusque boum misereri
4. Obliquaque primasque suae
## Ovaque in tendens tibi Iovis iuga
Vagatur laboribus vocandus [honorque segnior
inclinat](http://www.neve-tellus.io/) petentes manere ut terram fundit; sunt.
Pressit eodem inmotae quasque linguam, sub famem animos dei nocte futura
Laconide India. Posset iter nata negarit *limina latus postquam* serior, cum dic
area iamdudum non! Et curaque [me illo](http://testudine-est.com/): addidit
tuam, Cerealia, fila undae Ilithyiam proceresque tegens numero dominaeque
**regna** humanis. Multo [adstringit hirsutaque](http://www.e.org/est.php)
crimine postquam perfudit illis, a mutua, memorant.
## His nocte ipse cum oculorum recepta ignorat
Minos ad carmina exire studiosior Talia tamen, est a hi de quae ipsa et quoniam.
Se victus at unca tantae eurus Euippe Bacchumque vocantia.
Ullum frena statione de at praeferret classi Acarnanum iacuit lacertis gemino;
ad caperet **finiat**! Utque videt ingemuit Dulichium paravi portaque te et, tot
ab caesariem sumit, vias in rerum te.

View File

@ -1,51 +0,0 @@
# Nimium sacravere cetera exorata multifidasque satia
## Datum perierunt nato
Lorem markdownum. Sit en turpe, recessit nominibus et sanguis totis. Unaque
cognitius docuit sensimus mutasse terra flammas. Nec nunc sustinet Coeranon
figura Erecthida saepe *gestu vel*: quod mei. Docto interdum quasi labefactus
nocentius miserrimus pars cum missi matrem, ipse fletus
[illo](http://fuerit-cultus.net/) super.
1. Metuunt non paene iniectis licuit
2. Extemplo iugulum relictis reddidit caput
3. Frustra adspiceres viae
4. Non fluctibus civiliter pater procedit non
5. Deos spumis ille aderam semper Stygios quantum
6. Orgia hoc
## Dare hirtus cervice Cecropis
Si veteris alas proelia, sic remotis in portus nisi minimae acerris carina: et
ne. Crimina longis, visae, quae et cur innuba dabat Haedis non. **Multorumque**
damus qua, circumtulit teli, nec cum ait, o procul miserabile cursus. Tuam
Rhodanumque ipse **scelus** humum fratrem volucrumque tandem seque domus fuerat
quam per quidem ululasse ab aquas vocari.
1. Inperfecta frugum sed perennis deposuit
2. Quem cortice penthea venerisque perque perque deditque
3. Cerno impete
## Daedalon inguina mea Autolycus caeleste lumina et
Cupiere adulter parentum, semineces malit nec seu luce superos integer
inritaturque antro cum. Aegeus sic tabe nulla satyri notissima inmensa et aquas
et. Digiti quis addit *materna*, et arma tu aegide dixit. *Traxerat* ubera, fuit
se cacumine praeteritae corpore esse pendentem Diana gratissima dolor generi
clamoribus occupat; flavam arma. Ponat invidiosa honores.
var nybble_computer_market = client_sd_webmail.margin(romGamma(nui,
internet, 78) + p_malware_algorithm(thyristorCloneBare, backup,
multicastingHsf));
circuit(thickDesktopPpm, computer(protocol_alert(sla)));
if (integrated_memory_rich(array_printer.thermistor_lock_web(
camera.gnu_read_engine.third(4, rom_point_risc), piracy(
paste_analyst, os, multiprocessingKilohertz)))) {
click_samba = 1;
}
Liber virorum acervo quaecumque placabat Luna recessit utque, nox cum nymphae
licet? Arce tibi commissus letalis ambo fuit bis deus? Dixit mea, non [Quid
potentior osculaque](http://ibat.org/) factis opposuitque semel perspexerat
posuitque parte quas [sive](http://www.est.com/seanimos).

View File

@ -1,168 +0,0 @@
# Shortcodes
## Expand shortcode
### 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 >}}
## Buttons
```tpl
{{</* button relref="/" [class="..."] */>}}Get Home{{</* /button */>}}
{{</* button href="https://github.com/alex-shpak/hugo-book" */>}}Contribute{{</* /button */>}}
```
{{< button relref="/" >}}Get Home{{< /button >}}
{{< button href="https://github.com/alex-shpak/hugo-book" >}}Contribute{{< /button >}}
## Tabs
```tpl
{{</* tabs "uniqueid" */>}}
{{</* tab "MacOS" */>}} # MacOS Content {{</* /tab */>}}
{{</* tab "Linux" */>}} # Linux Content {{</* /tab */>}}
{{</* tab "Windows" */>}} # Windows Content {{</* /tab */>}}
{{</* /tabs */>}}
```
{{< tabs "uniqueid" >}}
{{< tab "MacOS" >}}
# MacOS
This is tab **MacOS** 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.
{{< /tab >}}
{{< tab "Linux" >}}
# Linux
This is tab **Linux** 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.
{{< /tab >}}
{{< tab "Windows" >}}
# Windows
This is tab **Windows** 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.
{{< /tab >}}
{{< /tabs >}}
## Columns
```html
{{</* columns */>}} <!-- begin columns block -->
# Left Content
Lorem markdownum insigne...
<---> <!-- magic sparator, between columns -->
# Mid Content
Lorem markdownum insigne...
<---> <!-- magic sparator, 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 >}}
## Mermaid Chart
{{< columns >}}
```tpl
{{</* mermaid [class="text-center"]*/>}}
sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
{{</* /mermaid */>}}
```
<--->
{{< mermaid >}}
sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
{{< /mermaid >}}
{{< /columns >}}

View File

@ -1,42 +0,0 @@
# Fida abluere audiat moram ferarum terram virgae
## Facere fluidove ab naides ut sic cornu
Lorem markdownum Lucifer est, ire tangit inposito terram. Ore et pes lavet nuper
longam, longa sub, erat nec Lemnicolae, in.
[Et](http://sumparvi.org/ossaquerecludit) nec tantaque sollicitive cognovi et ut
videbar verso **passis**, Epimethida tutos. Dedecus Desine morae.
Fervens esse et tenet cinisque per: et vir equus formaque superorum tollit,
vires meae magnum; Latona. Fundamine potitur genialis: imagine gaudet et herba
rura vates horrendum, laborum quis: potero aureus habitantque illos nox? E
factorum breve ad in verum Euboea templis volitat pompa aureus pallebant
videres, replet inque color? Capit et bipennem Finis sonuere magno nec pennis
exhortatur tenebat, ait.
## Gurgite caede Hippocoon auxilio furit
Freta amatos. [Saxum](http://horas-pericula.net/inprudens.php) vocanti Iovem sui
quicquam viro linguae minus, ara nec tu ipsa ars miserae, quam tetigit vacet
inque. Fuistis Deucalion, populi invidiae *indicat texere est* Helicon simul.
1. Hominum quantaque membra duos
2. Domum tela
3. Totus penna
4. Charaxi cogitis Hoc caelo est removit Anubis
5. Simulacra Delo posset insula
6. Infelix et nox fixa adhuc
## Trabes per coercet mittere toro
Cerae movit: patria quid, Alpheias **magicaeque** puer! Cum venit quidem, sors
erigor coniunctis sparsa carpe periuria in vultu temperat gradibus. Tutus
fecimus, caput; flamma mentis retia fuit Pallas.
> Arbore et agitasse partes patrem dumque ab, nec infans, sollemnia summis
> resque, de malles ille? Ultor fugaverat nemus, quaerenti nolle coniugis
> manibus contraque pace. Fuit verba ipse ignavi vulnus. Nam illud *inferius*
> iuvenale iuncta tandem.
Deus hostia Peneidas ad passu in venerat postes
[nymphae](http://ullo-herbae.org/). Sagittis tabo sibi marmoreum.

View File

@ -1,60 +0,0 @@
# Ego numen obest
## Mors curru Iove pedibus curva humano salutem
Lorem markdownum, mole, profugus. Madida ne quantus, pars verba lacrimis
memorique longius cupidi ipse attrahit et. Vota liberiore rector suos fallit
videor iustissimus barbara quod habet. Tantum patriaeque *omnia spectes* inimica
mari nec spemque ululare: nuper quodque, sic, quo.
var php_wireless = 4;
siteWinsock.switch_inbox += so_control_logic;
if (target_website.bugCopyrightIcs.cms_digital_method(mca_active) >
cloneScrollHttps) {
https_drop_hard(97, sshPayload + autoresponder_bmp_file);
hypertextCommercialBookmark = optical_impact;
}
architecture = userRate.unfriend(petabyteFile(irc, wave,
logic_tag.impact.cookie_favorites(5, 83)), listserv, malware_cad(
disk));
Populi annum deprendere suae recumbis in sedem starent! Super non accedat
percepitque negare inconcessisque habitare: puerum: picta. Haec natamque, in
rubentem auctore quantas oetaeas **certamine** levatae sollicitumque mecum vultu
obstructaque. Limina subtemen qui trepidare virgine! Enim rumor paenituit haec
**crimine Melampus** sidus.
## Partem robora herbae ilice hic exspectatus tepidique
Heu fugit carne, illo ex Iunonis ut tempora sacrata, adhaesi. Fallunt eque
amnes!
1. Vile ille res sidera gaudebat felicia auxilium
2. Sacra curam adfusique vasti progenitore omnia nutantem
3. Quod notum spesque extentam fores in voces
4. In qualia aequo
5. Auro commoda
6. Mearum huic volucres locorum formosus
## Invidiae fidemque cogamque esset potentia Minos
Sub silicem, semesaque nec, pone pariterque tendentem, in pactae suarum recurvas
et contra tu minister via. Subducere tangeris neque coniunxque utque. Virga
altam, mortemque: **ubi** procul, et vidi committit. Et
[Alpheos](http://nivea-pavens.io/ferroclara.html)! Perfide age magna per aequor
abstulerat, Boeotia sentit succincta ad linquit confugisse certae, de dignatur
et!
> Sic nacta saxo *crura*, iustis rorantia premens tempora lecte sumpsisse
> nusquam ulvam, apta! Sed sub plumas consueta quae; tibi mihi nec committi
> mundi?
Ipsa dea serpentum illic; aspicit reticere Aeaciden mitto; est novis exul.
Invidit senior vela, cava sed plumae vident ille ipse domo litus ac fallere
lumina, nisi famem cycno.
Nunc miserata admisitque [nata](http://mollibus.net/secessitnostrique), cum
loco, **iacerent**, te medullas matres. Fraude tamen, prorumpit puerum primo
polus regalia pampineis iungunt nec, aderis replent carituraque cervus.
Primusque lapides ad inpia pedibus; non fare praeterit penetralia in pedum uror.
Rapitur vivis lacrimis, vena et *dixit*.

View File

@ -1,48 +0,0 @@
# Natusque putat tu vero
## Scylaceaque neve coepisse
Lorem markdownum hostem et addit arbusta iacuit laetissimus medio, quae quoque
faciente. Belli et fuerant fuerat, curas Abas equos sacerdos iactasque videndo
tanto, sub. Et simulasse caedis, est nec acre addiderat, manet Phrygiae
quisquam, ater, aura sua **deique cornua**. Bacchi *dixi* cum tollit, ad
sinistra mirum, non se dis fraudare in decimo vocet. Ducunt **Acrisio sine
ratem**: enim illas venti, ferit nam ora.
> Crescente cernis ritusque et vertice potui, fugam conferat enim, quin te Iuno,
> Calydonia! Cursum est suo lassant quam cutis virgo urbe illa auras, finem.
> [Trabem est](http://www.tutus.io/) secedere Bybli laudant quercus tribuitque
> relinque et cornua ora, et quoniam maledicere viscera caelobracchia omne hoc.
> Metaque Arcas patet *intraverat tenet*.
Silvisque primae tulisset sive sonuere, incola visa veniat temptantes spernimur
et dictis se. Sub gerunt. Aqua [tantum templi](http://www.dextra.net/)
peregrinis ut *aevo cuique* falsi, ibat avidae transitus.
## Modo auctor imbres est
Clanis cernere monstravit illic quoque, in ignis male una deme? Alta sonanti
relatus Pindo: nisi Pico edidit data tamen rurigenae avoque. Quotiens vela petis
inposuit et parte utque, tempus pars contendere facturus tumidus. Flores
culpavit fera retinens, vita puer publica ferebat positas.
if (mashupTopologyMnemonic(70) >= domain_correction_schema) {
romTeraflops = log_android;
mms_vrml_alignment(keyboard, oop, computerCodec);
}
retina_samba_arp *= desktop_itunes_mainframe(leopard, 511935) * 88 /
direct_excel(-3, infringement_bespoke_apache, cmyk);
drivePowerPlay.registryAix += dma;
text_data.upsOdbc = error(user(processor_token_forum) * art_ajax_ldap);
Patriaque volvitur scire Naryciusque iuvenem dixit adfusique bicorni cupido.
Tecumque corpore sublato, mox hostibus et muneris, non. Draconum noscit dapibus
scopulis spondere lupum diro, illo ille victoque cibis; umentia spes.
Alumno est postquam gracili adnuimusque ore est praemia, ulla patitur: te disce
erat cruribus prosunt. Arboris illis neque, et erubuit Gallicus: iam remisit
adimuntque adsuerat nolit attonitus! Torvamque sensi ut fecundo fortuna bracchia
fuerant, semper de manet inseris.
Ictibus in cursus in, in isque Polyxena et Solis oris pressa exclamat *in tori*
lactente. [Locoque](http://est.net/et.html) iam fata Stygia lege transire.

View File

@ -1,14 +0,0 @@
---
headless: true
---
- [**Introduction**]({{< relref "/" >}})
- [Examples]({{< relref "/docs/examples.md" >}})
- [With Table of Contents]({{< relref "/docs/with-toc.md" >}})
- [Without Table of Contents]({{< relref "/docs/without-toc.md" >}})
- [Shortcodes]({{< relref "/docs/shortcodes.md" >}})
- **More Examples**
- [Server]({{< relref "/docs/server.md" >}})
- [Client]({{< relref "/docs/client.md" >}})
- [Advanced]({{< relref "/docs/advanced.md" >}})
- [**Blog**]({{< relref "/posts" >}})

119
exampleSite/hugo.toml Normal file
View File

@ -0,0 +1,119 @@
# hugo server --minify --themesDir ../.. --baseURL=http://0.0.0.0:1313/theme/hugo-book/
baseURL = 'https://example.com/'
title = 'Hugo Book'
theme = 'hugo-book'
# Book configuration
disablePathToLower = true
enableGitInfo = true
# Needed for mermaid/katex shortcodes
[markup]
[markup.goldmark.renderer]
unsafe = true
[markup.tableOfContents]
startLevel = 1
# Multi-lingual mode config
# There are different options to translate files
# See https://gohugo.io/content-management/multilingual/#translation-by-filename
# And https://gohugo.io/content-management/multilingual/#translation-by-content-directory
[languages]
[languages.en]
languageName = 'English'
contentDir = 'content.en'
weight = 1
[languages.zh]
languageName = 'Chinese'
contentDir = 'content.zh'
weight = 2
[languages.he]
languageName = 'Hebrew'
contentDir = 'content.he'
languageDirection = 'rtl'
weight = 3
[menu]
# [[menu.before]]
[[menu.after]]
name = "Github"
url = "https://github.com/alex-shpak/hugo-book"
weight = 10
[[menu.after]]
name = "Hugo Themes"
url = "https://themes.gohugo.io/themes/hugo-book/"
weight = 20
[params]
# (Optional, default light) Sets color theme: light, dark or auto.
# Theme 'auto' switches between dark and light modes based on browser/os preferences
BookTheme = 'light'
# (Optional, default true) Controls table of contents visibility on right side of pages.
# Start and end levels can be controlled with markup.tableOfContents setting.
# You can also specify this parameter per page in front matter.
BookToC = true
# (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 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/
# For backward compatibility you can set '*' to render all sections to menu. Acts same as '/'
BookSection = 'docs'
# Set source repository location.
# Used for 'Last Modified' and 'Edit this page' links.
BookRepo = 'https://github.com/alex-shpak/hugo-book'
# (Optional, default 'commit') Specifies commit portion of the link to the page's last modified
# commit hash for 'doc' page type.
# Requires 'BookRepo' param.
# Value used to construct a URL consisting of BookRepo/BookCommitPath/<commit-hash>
# Github uses 'commit', Bitbucket uses 'commits'
# BookCommitPath = 'commit'
# Enable "Edit this page" links for 'doc' page type.
# Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
# Edit path must point to root directory of repo.
BookEditPath = 'edit/main/exampleSite'
# Configure the date format used on the pages
# - In git information
# - In blog posts
BookDateFormat = 'January 2, 2006'
# (Optional, default true) Enables search function with flexsearch,
# Index is built on fly, therefore it might slowdown your website.
# Configuration for indexing can be adjusted in i18n folder per language.
BookSearch = true
# (Optional, default true) Enables comments template on pages
# By default partals/docs/comments.html includes Disqus template
# See https://gohugo.io/content-management/comments/#configure-disqus
# Can be overwritten by same param in page frontmatter
BookComments = true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
# Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
# Theme will print warning if page referenced in markdown does not exists.
BookPortableLinks = true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
BookServiceWorker = true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
BookTranslatedOnly = false

115
exampleSite/hugo.yaml Normal file
View File

@ -0,0 +1,115 @@
# hugo server --minify --themesDir ../.. --baseURL=http://0.0.0.0:1313/theme/hugo-book/
baseURL: https://example.com/
title: Hugo Book
theme: hugo-book
# Book configuration
disablePathToLower: true
enableGitInfo: true
# Needed for mermaid/katex shortcodes
markup:
goldmark:
renderer:
unsafe: true
tableOfContents:
startLevel: 1
# Multi-lingual mode config
# There are different options to translate files
# See https://gohugo.io/content-management/multilingual/#translation-by-filename
# And https://gohugo.io/content-management/multilingual/#translation-by-content-directory
languages:
en:
languageName: English
contentDir: content.en
weight: 1
zh:
languageName: Chinese
contentDir: content.zh
weight: 2
he:
languageName: Hebrew
contentDir: content.he
languageDirection: rtl
weight: 3
menu:
# before: []
after:
- name: "Github"
url: "https://github.com/alex-shpak/hugo-book"
weight: 10
- name: "Hugo Themes"
url: "https://themes.gohugo.io/themes/hugo-book/"
weight: 20
params:
# (Optional, default light) Sets color theme: light, dark or auto.
# Theme 'auto' switches between dark and light modes based on browser/os preferences
BookTheme: "light"
# (Optional, default true) Controls table of contents visibility on right side of pages.
# Start and end levels can be controlled with markup.tableOfContents setting.
# You can also specify this parameter per page in front matter.
BookToC: true
# (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 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/
# For backward compatibility you can set '*' to render all sections to menu. Acts same as '/'
BookSection: docs
# Set source repository location.
# Used for 'Last Modified' and 'Edit this page' links.
BookRepo: https://github.com/alex-shpak/hugo-book
# (Optional, default 'commit') Specifies commit portion of the link to the page's last modified
# commit hash for 'doc' page type.
# Requires 'BookRepo' param.
# Value used to construct a URL consisting of BookRepo/BookCommitPath/<commit-hash>
# Github uses 'commit', Bitbucket uses 'commits'
# BookCommitPath: commit
# Enable "Edit this page" links for 'doc' page type.
# Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
# Edit path must point to root directory of repo.
BookEditPath: edit/main/exampleSite
# Configure the date format used on the pages
# - In git information
# - In blog posts
BookDateFormat: "January 2, 2006"
# (Optional, default true) Enables search function with flexsearch,
# Index is built on fly, therefore it might slowdown your website.
# Configuration for indexing can be adjusted in i18n folder per language.
BookSearch: true
# (Optional, default true) Enables comments template on pages
# By default partals/docs/comments.html includes Disqus template
# See https://gohugo.io/content-management/comments/#configure-disqus
# Can be overwritten by same param in page frontmatter
BookComments: true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
# Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
# Theme will print warning if page referenced in markdown does not exists.
BookPortableLinks: true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
BookServiceWorker: true
# /!\ This is an experimental feature, might be removed or changed at any time
# (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present.
BookTranslatedOnly: false

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"Target":"book.min.6c8b9d2a1fc95075ed7da46ca81060b39add8fff6741ac51259f768929281e2c.css","MediaType":"text/css","Data":{"Integrity":"sha256-bIudKh/JUHXtfaRsqBBgs5rdj/9nQaxRJZ92iSkoHiw="}}

View File

@ -1 +0,0 @@
{"Target":"book.min.f4161f5e2de53a2e927f51df1611323a2a12cccb2681f23cb6fc3517852e8643.css","MediaType":"text/css","Data":{"Integrity":"sha256-9BYfXi3lOi6Sf1HfFhEyOioSzMsmgfI8tvw1F4UuhkM="}}

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module github.com/alex-shpak/hugo-book
go 1.16

14
i18n/am.yaml Normal file
View 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/bn.yaml Normal file
View 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 }'

21
i18n/cn.yaml Normal file
View File

@ -0,0 +1,21 @@
# This should be removed in future, 'cn' is moved to `zh'
- id: Search
translation: 搜索
- id: Edit this page
translation: 编辑本页
- id: Last modified by
translation: 最后修改者
- id: Expand
translation: 展开
- id: bookSearchConfig
translation: |
{
encode: false,
tokenize: function(str) {
return str.replace(/[\x00-\x7F]/g, '').split('');
}
}

14
i18n/cs.yaml Normal file
View File

@ -0,0 +1,14 @@
- id: Search
translation: Vyhledávat
- id: Edit this page
translation: Upravit tuto stránku
- id: Last modified by
translation: Autor poslední změny
- id: Expand
translation: Rozbalit
- id: bookSearchConfig
translation: '{ cache: true }'

14
i18n/de.yaml Normal file
View File

@ -0,0 +1,14 @@
- id: Search
translation: Suche
- id: Edit this page
translation: Seite bearbeiten
- id: Last modified by
translation: Zuletzt geändert von
- id: Expand
translation: Erweitern
- id: bookSearchConfig
translation: '{ cache: true }'

14
i18n/en.yaml Normal file
View File

@ -0,0 +1,14 @@
- id: Search
translation: Search
- id: Edit this page
translation: Edit this page
- id: Last modified by
translation: Last modified by
- id: Expand
translation: Expand
- id: bookSearchConfig
translation: '{ cache: true }'

14
i18n/es.yaml Normal file
View File

@ -0,0 +1,14 @@
- id: Search
translation: Buscar
- id: Edit this page
translation: Editar esta página
- id: Last modified by
translation: Última modificación por
- id: Expand
translation: Expandir
- id: bookSearchConfig
translation: '{ cache: true }'

20
i18n/fa.yaml Normal file
View File

@ -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"}'

14
i18n/fr.yaml Normal file
View File

@ -0,0 +1,14 @@
- id: Search
translation: Rechercher
- id: Edit this page
translation: Modifier cette page
- id: Last modified by
translation: Dernière modification par
- id: Expand
translation: Développer
- id: bookSearchConfig
translation: '{ cache: true }'

14
i18n/it.yaml Normal file
View File

@ -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 }'

20
i18n/ja.yaml Normal file
View File

@ -0,0 +1,20 @@
- id: Search
translation: 検索
- id: Edit this page
translation: このページを編集する
- id: Last modified by
translation: 最終更新者
- id: Expand
translation: 展開
- id: bookSearchConfig
translation: |
{
encode: false,
tokenize: function(str) {
return str.replace(/[\x00-\x7F]/g, '').split('');
}
}

21
i18n/jp.yaml Normal file
View File

@ -0,0 +1,21 @@
# This should be removed in future, 'jp' is moved to `ja'
- id: Search
translation: 検索
- id: Edit this page
translation: このページを編集する
- id: Last modified by
translation: 最終更新者
- id: Expand
translation: 展開
- id: bookSearchConfig
translation: |
{
encode: false,
tokenize: function(str) {
return str.replace(/[\x00-\x7F]/g, '').split('');
}
}

20
i18n/ko.yaml Normal file
View File

@ -0,0 +1,20 @@
- id: Search
translation: Search
- id: Edit this page
translation: Edit this page
- id: Last modified by
translation: Last modified by
- id: Expand
translation: Expand
- id: bookSearchConfig
translation: |
{
encode: false,
tokenize: function(str) {
return str.replace(/[\x00-\x7F]/g, '').split('');
}
}

14
i18n/nb.yaml Normal file
View File

@ -0,0 +1,14 @@
- id: Search
translation: Søk
- id: Edit this page
translation: Rediger denne siden
- id: Last modified by
translation: Sist endret av
- id: Expand
translation: Utvid
- id: bookSearchConfig
translation: '{ cache: true }'

14
i18n/nl.yaml Normal file
View 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
View 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
View 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.yaml Normal file
View 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 }'

14
i18n/ru.yaml Normal file
View File

@ -0,0 +1,14 @@
- id: Search
translation: Поиск
- id: Edit this page
translation: Редактировать эту страницу
- id: Last modified by
translation: Последнее изменение от
- id: Expand
translation: Развернуть
- id: bookSearchConfig
translation: '{ split: /[^a-zа-яё0-9\w]/gi }'

14
i18n/sv.yaml Normal file
View File

@ -0,0 +1,14 @@
- id: Search
translation: Sök
- id: Edit this page
translation: Redigera denna sida
- id: Last modified by
translation: Senast modifierad av
- id: Expand
translation: Expandera
- id: bookSearchConfig
translation: '{ cache: true }'

14
i18n/tr.yaml Normal file
View File

@ -0,0 +1,14 @@
- id: Search
translation: Arama
- id: Edit this page
translation: Bu sayfayı düzenle
- id: Last modified by
translation: Son düzenleyen
- id: Expand
translation: Genişlet
- id: bookSearchConfig
translation: '{ cache: true }'

14
i18n/uk.yaml Normal file
View File

@ -0,0 +1,14 @@
- id: Search
translation: Пошук
- id: Edit this page
translation: Редагувати цю сторінку
- id: Last modified by
translation: Остання зміна від
- id: Expand
translation: Розгорнути
- id: bookSearchConfig
translation: '{ split: /[^a-zа-яё0-9\w]/gi }'

20
i18n/zh-TW.yaml Normal file
View File

@ -0,0 +1,20 @@
- id: Search
translation: 搜索
- id: Edit this page
translation: 編輯頁面
- id: Last modified by
translation: 最後修改者
- id: Expand
translation: 展開
- id: bookSearchConfig
translation: |
{
encode: false,
tokenize: function(str) {
return str.replace(/[\x00-\x7F]/g, '').split('');
}
}

20
i18n/zh.yaml Normal file
View File

@ -0,0 +1,20 @@
- id: Search
translation: 搜索
- id: Edit this page
translation: 编辑本页
- id: Last modified by
translation: 最后修改者
- id: Expand
translation: 展开
- id: bookSearchConfig
translation: |
{
encode: false,
tokenize: function(str) {
return str.replace(/[\x00-\x7F]/g, '').split('');
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 185 KiB

Some files were not shown because too many files have changed in this diff Show More