├── .editorconfig ├── .gitignore ├── .grenrc.yml ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── archetypes ├── chapter.md └── default.md ├── exampleSite ├── LICENSE.md ├── config.toml ├── content │ ├── _index.en.md │ ├── _index.fr.md │ ├── basics │ │ ├── _index.en.md │ │ ├── _index.fr.md │ │ ├── _index.zh.md │ │ ├── configuration │ │ │ ├── _index.en.md │ │ │ ├── _index.fr.md │ │ │ └── images │ │ │ │ └── home_button_defaults.jpg │ │ ├── installation │ │ │ ├── _index.en.md │ │ │ ├── _index.fr.md │ │ │ └── images │ │ │ │ └── chapter.png │ │ ├── requirements │ │ │ ├── _index.en.md │ │ │ ├── _index.fr.md │ │ │ └── images │ │ │ │ └── magic.gif │ │ └── style-customization │ │ │ ├── _index.en.md │ │ │ ├── _index.fr.md │ │ │ └── images │ │ │ ├── blue-variant.png │ │ │ ├── green-variant.png │ │ │ └── red-variant.png │ ├── cont │ │ ├── _index.en.md │ │ ├── _index.fr.md │ │ ├── archetypes.en.md │ │ ├── archetypes.fr.md │ │ ├── i18n │ │ │ ├── _index.en.md │ │ │ ├── _index.fr.md │ │ │ └── images │ │ │ │ └── i18n-menu.gif │ │ ├── icons.en.md │ │ ├── markdown.en.md │ │ ├── markdown.fr.md │ │ ├── menushortcuts.en.md │ │ ├── menushortcuts.fr.md │ │ ├── pages │ │ │ ├── _index.en.md │ │ │ ├── _index.fr.md │ │ │ └── images │ │ │ │ ├── frontmatter-icon.png │ │ │ │ ├── pages-chapter.png │ │ │ │ └── pages-default.png │ │ ├── syntaxhighlight.en.md │ │ ├── tags.en.md │ │ └── tags.fr.md │ ├── credits.en.md │ ├── credits.fr.md │ ├── shortcodes │ │ ├── _index.en.md │ │ ├── _index.fr.md │ │ ├── attachments.en.files │ │ │ ├── BachGavotteShort.mp3 │ │ │ ├── Carroll_AliceAuPaysDesMerveilles.pdf │ │ │ ├── adivorciarsetoca00cape.pdf │ │ │ ├── hugo.png │ │ │ ├── movieselectricsheep-flock-244-32500-2.mp4 │ │ │ └── small_file.txt │ │ ├── attachments.en.md │ │ ├── attachments.fr.files │ │ │ ├── BachGavotteShort.mp3 │ │ │ ├── Carroll_AliceAuPaysDesMerveilles.pdf │ │ │ ├── adivorciarsetoca00cape.pdf │ │ │ ├── hugo.png │ │ │ ├── movieselectricsheep-flock-244-32500-2.mp4 │ │ │ └── small_file.txt │ │ ├── attachments.fr.md │ │ ├── button.en.md │ │ ├── button.fr.md │ │ ├── children │ │ │ ├── _index.en.md │ │ │ ├── _index.fr.md │ │ │ ├── children-1 │ │ │ │ ├── _index.en.md │ │ │ │ ├── _index.fr.md │ │ │ │ └── children-1-1 │ │ │ │ │ ├── _index.en.md │ │ │ │ │ ├── _index.fr.md │ │ │ │ │ └── children-1-1-1 │ │ │ │ │ ├── _index.en.md │ │ │ │ │ ├── _index.fr.md │ │ │ │ │ └── children-1-1-1-1 │ │ │ │ │ ├── _index.en.md │ │ │ │ │ ├── _index.fr.md │ │ │ │ │ └── children-1-1-1-1-1 │ │ │ │ │ ├── _index.en.md │ │ │ │ │ └── _index.fr.md │ │ │ ├── children-2 │ │ │ │ ├── _index.en.md │ │ │ │ ├── _index.fr.md │ │ │ │ ├── test3.en.md │ │ │ │ └── test3.fr.md │ │ │ ├── children-3 │ │ │ │ ├── _index.en.md │ │ │ │ └── _index.fr.md │ │ │ ├── children-4 │ │ │ │ ├── _index.en.md │ │ │ │ └── _index.fr.md │ │ │ ├── test.en.md │ │ │ └── test.fr.md │ │ ├── expand.en.md │ │ ├── expand.fr.md │ │ ├── mermaid.en.md │ │ ├── mermaid.fr.md │ │ ├── notice.en.md │ │ ├── notice.fr.md │ │ ├── siteparam.en.md │ │ ├── siteparam.fr.md │ │ └── tabs.en.md │ ├── showcase.en.md │ └── showcase.fr.md ├── layouts │ ├── partials │ │ ├── custom-footer.html │ │ ├── logo.html │ │ └── menu-footer.html │ └── shortcodes │ │ └── ghcontributors.html └── static │ ├── css │ └── theme-mine.css │ ├── fonts │ ├── monogramos-webfont.eot │ ├── monogramos-webfont.svg │ ├── monogramos-webfont.ttf │ ├── monogramos-webfont.woff │ └── monogramos-webfont.woff2 │ └── images │ └── showcase │ ├── inteliver_docs.png │ ├── tat.png │ └── tshark_dev.png ├── i18n ├── ar.toml ├── de.toml ├── en.toml ├── es.toml ├── fr.toml ├── hi.toml ├── id.toml ├── ja.toml ├── nl.toml ├── pt.toml ├── ru.toml ├── tr.toml ├── vn.toml └── zh-cn.toml ├── images ├── screenshot.png └── tn.png ├── layouts ├── 404.html ├── _default │ ├── list.html │ └── single.html ├── index.html ├── index.json ├── partials │ ├── custom-comments.html │ ├── custom-footer.html │ ├── custom-header.html │ ├── favicon.html │ ├── footer.html │ ├── header.html │ ├── logo.html │ ├── menu-footer.html │ ├── menu.html │ ├── meta.html │ ├── search.html │ ├── tags.html │ └── toc.html └── shortcodes │ ├── attachments.html │ ├── button.html │ ├── children.html │ ├── expand.html │ ├── mermaid.html │ ├── notice.html │ ├── ref.html │ ├── relref.html │ ├── siteparam.html │ ├── tab.html │ └── tabs.html ├── netlify.toml ├── static ├── css │ ├── atom-one-dark-reasonable.css │ ├── auto-complete.css │ ├── featherlight.min.css │ ├── fontawesome-all.min.css │ ├── hugo-theme.css │ ├── hybrid.css │ ├── nucleus.css │ ├── perfect-scrollbar.min.css │ ├── tabs.css │ ├── tags.css │ ├── theme-blue.css │ ├── theme-green.css │ ├── theme-red.css │ └── theme.css ├── fonts │ ├── Inconsolata.eot │ ├── Inconsolata.svg │ ├── Inconsolata.ttf │ ├── Inconsolata.woff │ ├── Novecentosanswide-Normal-webfont.eot │ ├── Novecentosanswide-Normal-webfont.svg │ ├── Novecentosanswide-Normal-webfont.ttf │ ├── Novecentosanswide-Normal-webfont.woff │ ├── Novecentosanswide-Normal-webfont.woff2 │ ├── Novecentosanswide-UltraLight-webfont.eot │ ├── Novecentosanswide-UltraLight-webfont.svg │ ├── Novecentosanswide-UltraLight-webfont.ttf │ ├── Novecentosanswide-UltraLight-webfont.woff │ ├── Novecentosanswide-UltraLight-webfont.woff2 │ ├── Work_Sans_200.eot │ ├── Work_Sans_200.svg │ ├── Work_Sans_200.ttf │ ├── Work_Sans_200.woff │ ├── Work_Sans_200.woff2 │ ├── Work_Sans_300.eot │ ├── Work_Sans_300.svg │ ├── Work_Sans_300.ttf │ ├── Work_Sans_300.woff │ ├── Work_Sans_300.woff2 │ ├── Work_Sans_500.eot │ ├── Work_Sans_500.svg │ ├── Work_Sans_500.ttf │ ├── Work_Sans_500.woff │ └── Work_Sans_500.woff2 ├── images │ ├── clippy.svg │ ├── favicon.png │ └── gopher-404.jpg ├── js │ ├── auto-complete.js │ ├── clipboard.min.js │ ├── featherlight.min.js │ ├── highlight.pack.js │ ├── hugo-learn.js │ ├── jquery-3.3.1.min.js │ ├── jquery.sticky.js │ ├── learn.js │ ├── lunr.min.js │ ├── modernizr.custom-3.6.0.js │ ├── perfect-scrollbar.jquery.min.js │ ├── perfect-scrollbar.min.js │ └── search.js ├── mermaid │ └── mermaid.js └── webfonts │ ├── fa-brands-400.eot │ ├── fa-brands-400.svg │ ├── fa-brands-400.ttf │ ├── fa-brands-400.woff │ ├── fa-brands-400.woff2 │ ├── fa-regular-400.eot │ ├── fa-regular-400.svg │ ├── fa-regular-400.ttf │ ├── fa-regular-400.woff │ ├── fa-regular-400.woff2 │ ├── fa-solid-900.eot │ ├── fa-solid-900.svg │ ├── fa-solid-900.ttf │ ├── fa-solid-900.woff │ └── fa-solid-900.woff2 ├── theme.toml └── wercker.yml /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_size = 2 9 | indent_style = space 10 | trim_trailing_whitespace = true 11 | 12 | [*.js] 13 | insert_final_newline = true 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | public/ 3 | exampleSite/public 4 | -------------------------------------------------------------------------------- /.grenrc.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dataSource: "prs" 3 | prefix: "v" 4 | onlyMilestones: false 5 | changelogFilename: "CHANGELOG.md" 6 | includeMessages: "all" 7 | ignoreIssuesWith: 8 | - "support" 9 | ignoreLabels: 10 | - "duplicate" 11 | - "invalid" 12 | - "wontfix" 13 | groupBy: 14 | New features: 15 | - "feature" 16 | Bug Fixes: 17 | - "bug" 18 | Enhancements: 19 | - "enhancement" 20 | Internationalisation: 21 | - "i18n" 22 | Theme Meta: 23 | - "meta" 24 | Uncategorised: 25 | - "closed" 26 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Grav 4 | Copyright (c) 2016 MATHIEU CORNIC 5 | Copyright (c) 2017 Valere JEANTET 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of 8 | this software and associated documentation files (the "Software"), to deal in 9 | the Software without restriction, including without limitation the rights to 10 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 11 | the Software, and to permit persons to whom the Software is furnished to do so, 12 | subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 19 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 20 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 21 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | THIS PROJECT IS DEPRECATED 2 | 3 | The project is not maintained anymore. Thanks everyone for helping me on building this theme at the time where there were no good Hugo theme for documentation. 4 | 5 | [Consider migrating to another theme](https://github.com/matcornic/hugo-theme-learn/issues/557) such as [Relearn](https://github.com/McShelby/hugo-theme-relearn) which seems to be a good maintained alternative. 6 | 7 | ---- 8 | 9 | # Hugo Learn Theme 10 | 11 | This repository contains a theme for [Hugo](https://gohugo.io/), based on great [Grav Learn Theme](https://learn.getgrav.org/). 12 | 13 | Visit the [theme documentation](https://learn.netlify.com/en/) to see what is going on. It is actually built with this theme. 14 | 15 | [![wercker status](https://app.wercker.com/status/233466a2be73fcea400e7dc02ef6adf9/s/master "wercker status")](https://app.wercker.com/project/byKey/233466a2be73fcea400e7dc02ef6adf9) 16 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmatcornic%2Fhugo-theme-learn.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmatcornic%2Fhugo-theme-learn?ref=badge_shield) 17 | 18 | ## Main features 19 | 20 | - Automatic Search 21 | - Multilingual mode 22 | - Unlimited menu levels 23 | - Automatic next/prev buttons to navigate through menu entries 24 | - Image resizing, shadow… 25 | - Attachments files 26 | - List child pages 27 | - Mermaid diagram (flowchart, sequence, gantt) 28 | - Customizable look and feel and themes variants 29 | - Buttons, Tip/Note/Info/Warning boxes, Expand 30 | 31 | ## Installation 32 | 33 | Navigate to your themes folder in your Hugo site and use the following commands: 34 | 35 | ```shell 36 | cd themes/ 37 | git clone https://github.com/matcornic/hugo-theme-learn.git 38 | ``` 39 | 40 | Check that your Hugo version is minimum `0.25` with `hugo version`. 41 | 42 | ![Overview](https://github.com/matcornic/hugo-theme-learn/raw/master/images/tn.png) 43 | 44 | ## Usage 45 | 46 | - [Visit the documentation](https://learn.netlify.com/en/) 47 | 48 | ## Download old versions (prior to 2.0.0) 49 | 50 | If you need old version for compatibility purpose, either download [theme source code from releases](https://github.com/matcornic/hugo-theme-learn/releases) or use the right git tag. For example, with `1.1.0` 51 | 52 | - Direct download way: https://github.com/matcornic/hugo-theme-learn/archive/1.1.0.zip 53 | - Git way: 54 | 55 | ```shell 56 | cd themes/hugo-theme-learn 57 | git checkout tags/1.1.0 58 | ``` 59 | 60 | For both solutions, the documentation is available at https://github.com/matcornic/hugo-theme-learn/releases/download/1.1.0/hugo-learn-doc-1.1.0.zip 61 | 62 | ## Credits 63 | 64 | Many thanks to [@vjeantet](https://github.com/vjeantet/) for the fork [docdock](https://github.com/vjeantet/hugo-theme-docdock). The v2 of this theme is mainly based on his work ! 65 | 66 | ## License 67 | 68 | [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmatcornic%2Fhugo-theme-learn.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmatcornic%2Fhugo-theme-learn?ref=badge_large) 69 | 70 | ## Releasing 71 | 72 | Somewhat work-in-progress steps to release with [gren](https://github.com/github-tools/github-release-notes) 73 | 74 | - Check all MRs assigned to the milestone are closed or pushed back to another release 75 | - Close the milestone 76 | - Check merged MRs on the milestone have a tag (Bug, Enhancement, etc.) 77 | - Tag and push the repo 78 | 79 | ```shell 80 | git tag 81 | git push origin 82 | ``` 83 | 84 | - Generate CHANGELOG.md with _gren_ 85 | 86 | ```shell 87 | gren changelog --override --generate --tags=all 88 | ``` 89 | 90 | - Fix the date for the current release in CHANGELOG.md 91 | - Add the changelog to git and update the tag 92 | 93 | ```shell 94 | git add CHANGELOG.md 95 | git commit -m "Ship tag " 96 | git push origin master 97 | git tag -f 98 | git push --force origin 99 | ``` 100 | 101 | - Generate release with _gren_ 102 | 103 | ```shell 104 | gren release -t 105 | ``` 106 | -------------------------------------------------------------------------------- /archetypes/chapter.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "{{ replace .Name "-" " " | title }}" 3 | date = {{ .Date }} 4 | weight = 5 5 | chapter = true 6 | pre = "X. " 7 | +++ 8 | 9 | ### Chapter X 10 | 11 | # Some Chapter title 12 | 13 | Lorem Ipsum. -------------------------------------------------------------------------------- /archetypes/default.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "{{ replace .Name "-" " " | title }}" 3 | date = {{ .Date }} 4 | weight = 5 5 | +++ 6 | 7 | Lorem Ipsum. -------------------------------------------------------------------------------- /exampleSite/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 MATHIEU CORNIC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /exampleSite/config.toml: -------------------------------------------------------------------------------- 1 | baseURL = "/" 2 | languageCode = "en-US" 3 | defaultContentLanguage = "en" 4 | 5 | title = "Hugo Learn Documentation" 6 | theme = "hugo-theme-learn" 7 | themesdir = "../.." 8 | metaDataFormat = "yaml" 9 | defaultContentLanguageInSubdir= true 10 | 11 | [params] 12 | editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/" 13 | description = "Documentation for Hugo Learn Theme" 14 | author = "Mathieu Cornic" 15 | showVisitedLinks = true 16 | disableBreadcrumb = false 17 | disableNextPrev = false 18 | disableLandingPageButton = true 19 | disableMermaid = false 20 | customMermaidURL = "https://unpkg.com/mermaid@8.8.0/dist/mermaid.min.js" 21 | titleSeparator = "::" 22 | 23 | [outputs] 24 | home = [ "HTML", "RSS", "JSON"] 25 | 26 | [Languages] 27 | [Languages.en] 28 | title = "Documentation for Hugo Learn Theme" 29 | weight = 1 30 | languageName = "English" 31 | landingPageURL = "/en" 32 | landingPageName = " Home" 33 | 34 | [[Languages.en.menu.shortcuts]] 35 | name = " GitHub repo" 36 | identifier = "ds" 37 | url = "https://github.com/matcornic/hugo-theme-learn" 38 | weight = 10 39 | 40 | [[Languages.en.menu.shortcuts]] 41 | name = " Showcases" 42 | url = "showcase" 43 | weight = 11 44 | 45 | [[Languages.en.menu.shortcuts]] 46 | name = " Hugo Documentation" 47 | identifier = "hugodoc" 48 | url = "https://gohugo.io/" 49 | weight = 20 50 | 51 | [[Languages.en.menu.shortcuts]] 52 | name = " Credits" 53 | url = "/credits" 54 | weight = 30 55 | 56 | [Languages.fr] 57 | title = "Documentation du thème Hugo Learn" 58 | weight = 2 59 | languageName = "Français" 60 | landingPageURL = "/fr" 61 | landingPageName = " Accueil" 62 | 63 | [[Languages.fr.menu.shortcuts]] 64 | name = " Repo GitHub" 65 | identifier = "ds" 66 | url = "https://github.com/matcornic/hugo-theme-learn" 67 | weight = 10 68 | 69 | [[Languages.fr.menu.shortcuts]] 70 | name = " Vitrine" 71 | url = "/showcase" 72 | weight = 11 73 | 74 | [[Languages.fr.menu.shortcuts]] 75 | name = " Documentation Hugo" 76 | identifier = "hugodoc" 77 | url = "https://gohugo.io/" 78 | weight = 20 79 | 80 | [[Languages.fr.menu.shortcuts]] 81 | name = " Crédits" 82 | url = "/credits" 83 | weight = 30 84 | 85 | [Languages.zh] 86 | title = "Hugo 主题的 Learn 文档" 87 | weight = 3 88 | languageName = "简体中文" 89 | landingPageURL = "/zh" 90 | landingPageName = " 家" 91 | 92 | [[Languages.zh.menu.shortcuts]] 93 | name = " GitHub 仓库" 94 | identifier = "ds" 95 | url = "https://github.com/matcornic/hugo-theme-learn" 96 | weight = 10 97 | 98 | [[Languages.zh.menu.shortcuts]] 99 | name = " 展示区" 100 | url = "/showcase" 101 | weight = 11 102 | 103 | [[Languages.zh.menu.shortcuts]] 104 | name = " Hugo 文档" 105 | identifier = "hugodoc" 106 | url = "https://gohugo.io/" 107 | weight = 20 108 | 109 | [[Languages.zh.menu.shortcuts]] 110 | name = " 鸣谢" 111 | url = "/credits" 112 | weight = 30 113 | -------------------------------------------------------------------------------- /exampleSite/content/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Learn Theme for Hugo" 3 | --- 4 | 5 | # Hugo learn theme 6 | 7 | [Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) is a theme for [Hugo](https://gohugo.io/), a fast and modern static website engine written in Go. Where Hugo is often used for blogs, this multilingual-ready theme is **fully designed for documentation**. 8 | 9 | This theme is a partial porting of the [Learn theme](http://learn.getgrav.org/) of [Grav](https://getgrav.org/), a modern flat-file CMS written in PHP. 10 | 11 | {{% notice tip %}}Learn theme works with a _page tree structure_ to organize content : All contents are pages, which belong to other pages. [read more about this]({{%relref "cont/pages/_index.md"%}}) 12 | {{% /notice %}} 13 | 14 | ## Main features 15 | 16 | * [Automatic Search]({{%relref "basics/configuration/_index.md#activate-search" %}}) 17 | * [Multilingual mode]({{%relref "cont/i18n/_index.md" %}}) 18 | * **Unlimited menu levels** 19 | * **Automatic next/prev buttons to navigate through menu entries** 20 | * [Image resizing, shadow...]({{%relref "cont/markdown.en.md#images" %}}) 21 | * [Attachments files]({{%relref "shortcodes/attachments.en.md" %}}) 22 | * [List child pages]({{%relref "shortcodes/children/_index.md" %}}) 23 | * [Mermaid diagram]({{%relref "shortcodes/mermaid.en.md" %}}) (flowchart, sequence, gantt) 24 | * [Customizable look and feel and themes variants]({{%relref "basics/style-customization/_index.md"%}}) 25 | * [Buttons]({{%relref "shortcodes/button.en.md" %}}), [Tip/Note/Info/Warning boxes]({{%relref "shortcodes/notice.en.md" %}}), [Expand]({{%relref "shortcodes/expand.en.md" %}}) 26 | 27 | ![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow) 28 | 29 | ## Contribute to this documentation 30 | Feel free to update this content, just click the **Edit this page** link displayed on top right of each page, and pullrequest it 31 | 32 | {{% notice info %}} 33 | Your modification will be deployed automatically when merged. 34 | {{% /notice %}} 35 | 36 | ## Documentation website 37 | This current documentation has been statically generated with Hugo with a simple command : `hugo -t hugo-theme-learn` -- source code is [available here at GitHub](https://github.com/matcornic/hugo-theme-learn) 38 | 39 | {{% notice note %}} 40 | Automatically published and hosted thanks to [Netlify](https://www.netlify.com/). Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/) 41 | {{% /notice %}} -------------------------------------------------------------------------------- /exampleSite/content/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Learn Theme for Hugo" 3 | --- 4 | 5 | # Thème Hugo learn 6 | 7 | [Hugo-theme-learn](http://github.com/matcornic/hugo-theme-learn) est un thème pour [Hugo](https://gohugo.io/), un générateur de site statique, rapide et modern, écrit en Go. Tandis que Hugo est souvent utilisé pour des blogs, ce thème multi-langue est **entièrement conçu pour la documentation**. 8 | 9 | Ce thème est un portage partiel du [thème Learn](http://learn.getgrav.org/) de [Grav](https://getgrav.org/), un CMS modern écrit en PHP. 10 | 11 | {{% notice tip %}}Le thème Learn fonctionne grâce à la structure de page aborescentes pour organiser le contenu: tous les contenus sont des pages qui appartiennent à d'autres pages. [Plus d'infos]({{%relref "cont/pages/_index.md"%}}) 12 | {{% /notice %}} 13 | 14 | ## Fonctionnalités principales 15 | 16 | * [Recherche automatique]({{%relref "basics/configuration/_index.md#activer-recherche" %}}) 17 | * [Mode multi-langue]({{%relref "cont/i18n/_index.md" %}}) 18 | * **Nombre de niveau infini dans le menu** 19 | * **Boutons suivant/précédent automatiquement générés pour naviguer entre les items du menu** 20 | * [Taille d'image, ombres...]({{%relref "cont/markdown.fr.md#images" %}}) 21 | * [Fichiers joints]({{%relref "shortcodes/attachments.fr.md" %}}) 22 | * [Lister les pages filles]({{%relref "shortcodes/children/_index.md" %}}) 23 | * [Diagrammes Mermaid]({{%relref "shortcodes/mermaid.fr.md" %}}) (flowchart, sequence, gantt) 24 | * [Style configurable and variantes de couleurs]({{%relref "basics/style-customization/_index.md"%}}) 25 | * [Boutons]({{%relref "shortcodes/button.fr.md" %}}), [Messages Astuce/Note/Info/Attention]({{%relref "shortcodes/notice.fr.md" %}}), [Expand]({{%relref "shortcodes/expand.fr.md" %}}) 26 | 27 | ![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow) 28 | 29 | ## Contribuer à cette documentation 30 | 31 | N'hésitez pas à mettre à jour ce contenu en cliquant sur le lien **Modifier cette page** en haut de chaque page, et créer la Pull Request associée. 32 | 33 | {{% notice info %}} 34 | Votre modification sera déployée automatiquement quand elle sera mergée. 35 | {{% /notice %}} 36 | 37 | ## Site de documentation 38 | 39 | Cette documentation statique a été générée avec Hugo avec une simple commande : `hugo -t hugo-theme-learn` -- le code source est [disponible sur Github](https://github.com/matcornic/hugo-theme-learn) 40 | 41 | {{% notice note %}} 42 | Le site est auomatiquement publié et hébergé par [Netlify](https://www.netlify.com/). Plus d'infos sur le [déploiement de site Hugo avec Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)(En anglais) 43 | {{% /notice %}} 44 | -------------------------------------------------------------------------------- /exampleSite/content/basics/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Basics 3 | weight: 5 4 | pre: "1. " 5 | chapter: true 6 | --- 7 | 8 | ### Chapter 1 9 | 10 | # Basics 11 | 12 | Discover what this Hugo theme is all about and the core-concepts behind it. 13 | -------------------------------------------------------------------------------- /exampleSite/content/basics/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Démarrage 3 | weight: 5 4 | pre: "1. " 5 | chapter: true 6 | --- 7 | 8 | ### Chapitre 1 9 | 10 | # Démarrage 11 | 12 | Découvrez comment utiliser ce thème Hugo et apprenez-en les concepts 13 | -------------------------------------------------------------------------------- /exampleSite/content/basics/_index.zh.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 基础 3 | weight: 5 4 | pre: "1. " 5 | chapter: true 6 | --- 7 | 8 | ### 章节 1 9 | 10 | # 基础 11 | 12 | 了解该 Hugo 主题的特点以及背后的核心概念。 13 | -------------------------------------------------------------------------------- /exampleSite/content/basics/configuration/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Configuration 4 | weight: 20 5 | --- 6 | 7 | ## Global site parameters 8 | 9 | On top of [Hugo global configuration](https://gohugo.io/overview/configuration/), **Hugo-theme-learn** lets you define the following parameters in your `config.toml` (here, values are default). 10 | 11 | Note that some of these parameters are explained in details in other sections of this documentation. 12 | 13 | ```toml 14 | [params] 15 | # Prefix URL to edit current page. Will display an "Edit this page" button on top right hand corner of every page. 16 | # Useful to give opportunity to people to create merge request for your doc. 17 | # See the config.toml file from this documentation site to have an example. 18 | editURL = "" 19 | # Author of the site, will be used in meta information 20 | author = "" 21 | # Description of the site, will be used in meta information 22 | description = "" 23 | # Shows a checkmark for visited pages on the menu 24 | showVisitedLinks = false 25 | # Disable search function. It will hide search bar 26 | disableSearch = false 27 | # Javascript and CSS cache are automatically busted when new version of site is generated. 28 | # Set this to true to disable this behavior (some proxies don't handle well this optimization) 29 | disableAssetsBusting = false 30 | # Set this to true to disable copy-to-clipboard button for inline code. 31 | disableInlineCopyToClipBoard = false 32 | # A title for shortcuts in menu is set by default. Set this to true to disable it. 33 | disableShortcutsTitle = false 34 | # If set to false, a Home button will appear below the search bar on the menu. 35 | # It is redirecting to the landing page of the current language if specified. (Default is "/") 36 | disableLandingPageButton = true 37 | # When using mulitlingual website, disable the switch language button. 38 | disableLanguageSwitchingButton = false 39 | # Hide breadcrumbs in the header and only show the current page title 40 | disableBreadcrumb = true 41 | # If set to true, prevents Hugo from including the mermaid module if not needed (will reduce load times and traffic) 42 | disableMermaid = false 43 | # Specifies the remote location of the mermaid js 44 | customMermaidURL = "https://unpkg.com/mermaid@8.8.0/dist/mermaid.min.js" 45 | # Hide Next and Previous page buttons normally displayed full height beside content 46 | disableNextPrev = true 47 | # Order sections in menu by "weight" or "title". Default to "weight" 48 | ordersectionsby = "weight" 49 | # Change default color scheme with a variant one. Can be "red", "blue", "green". 50 | themeVariant = "" 51 | # Provide a list of custom css files to load relative from the `static/` folder in the site root. 52 | custom_css = ["css/foo.css", "css/bar.css"] 53 | # Change the title separator. Default to "::". 54 | titleSeparator = "-" 55 | ``` 56 | 57 | ## Activate search 58 | 59 | If not already present, add the follow lines in the same `config.toml` file. 60 | 61 | ```toml 62 | [outputs] 63 | home = [ "HTML", "RSS", "JSON"] 64 | ``` 65 | 66 | Learn theme uses the last improvement available in hugo version 20+ to generate a json index file ready to be consumed by lunr.js javascript search engine. 67 | 68 | > Hugo generate lunrjs index.json at the root of public folder. 69 | > When you build the site with `hugo server`, hugo generates it internally and of course it doesn’t show up in the filesystem 70 | 71 | ## Mermaid 72 | 73 | The mermaid configuration parameters can also be set on a specific page. In this case, the global parameter would be overwritten by the local one. 74 | 75 | > Example: 76 | > 77 | > Mermaid is globally disabled. By default it won't be loaded by any page. 78 | > On page "Architecture" you need a class diagram. You can set the mermaid parameters locally to only load mermaid on this page (not on the others). 79 | 80 | You also can disable mermaid for specific pages while globally enabled. 81 | 82 | ## Home Button Configuration 83 | 84 | If the `disableLandingPage` option is set to `false`, an Home button will appear 85 | on the left menu. It is an alternative for clicking on the logo. To edit the 86 | appearance, you will have to configure two parameters for the defined languages: 87 | 88 | ```toml 89 | [Lanugages] 90 | [Lanugages.en] 91 | ... 92 | landingPageURL = "/en" 93 | landingPageName = " Redirect to Home" 94 | ... 95 | [Lanugages.fr] 96 | ... 97 | landingPageURL = "/fr" 98 | landingPageName = " Accueil" 99 | ... 100 | ``` 101 | 102 | If those params are not configured for a specific language, they will get their 103 | default values: 104 | 105 | ```toml 106 | landingPageURL = "/" 107 | landingPageName = " Home" 108 | ``` 109 | 110 | The home button is going to looks like this: 111 | 112 | ![Default Home Button](/en/basics/configuration/images/home_button_defaults.jpg?width=100%) 113 | -------------------------------------------------------------------------------- /exampleSite/content/basics/configuration/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Configuration 4 | weight: 20 5 | --- 6 | 7 | ## Paramètres globaux du site 8 | 9 | En plus de la [configuration globale d'Hugo](https://gohugo.io/overview/configuration/), **Hugo-theme-learn** vous permet de définir les paramètres suivant dans votre fichier `config.toml` (ci-dessous sont affichées les valeurs par défaut). 10 | 11 | Notez que certains de ces paramètres sont expliqués en détails dans d'autres sections de cette documentation. 12 | 13 | ```toml 14 | [params] 15 | # L'URL préfixe pour éditer la page courante. Ce paramètre affichera un bouton "Modifier cette page" on haut de de chacune des pages. 16 | # Pratique pour donner les possibilité à vos utilisateurs de créer une merge request pour votre doc. 17 | # Allez voir le fichier config.toml de cette documentation pour avoir un exemple. 18 | editURL = "" 19 | # Autheur du site, est utilisé dans les informations meta 20 | author = "" 21 | # Description du site, est utilisé dans les informations meta 22 | description = "" 23 | # Affiche une icône lorsque la page a été visitée 24 | showVisitedLinks = false 25 | # Désactive la fonction de recherche. Une valeur à true cache la barre de recherche. 26 | disableSearch = false 27 | # Par défaut, le cache Javascript et CSS est automatiquement vidé lorsqu'une nouvelle version du site est générée. 28 | # Utilisez ce paramètre lorsque vous voulez désactiver ce comportement (c'est parfois incompatible avec certains proxys) 29 | disableAssetsBusting = false 30 | # Utilisez ce paramètre pour désactiver le bouton copy-to-clipboard pour le code formatté sur une ligne. 31 | disableInlineCopyToClipBoard = false 32 | # Un titre est défini par défaut lorsque vous utilisez un raccourci dans le menu. Utilisez ce paramètre pour le cacher. 33 | disableShortcutsTitle = false 34 | # S'il est réglé sur faux, un bouton Accueil apparaîtra sous la barre de recherche dans le menu. 35 | # Il redirige vers la page d'accueil de la langue actuelle si cela est spécifié. (La valeur par défaut est "/") 36 | disableLandingPageButton = true 37 | # Si défini à true, empêche Hugo d'inclure le module "mermaid" s'il n'est pas nécessaire (réduira les temps de chargement et le trafic) 38 | disableMermaid = false 39 | # Spécifie l'emplacement distant du mermaid js 40 | customMermaidURL = "https://unpkg.com/mermaid@8.8.0/dist/mermaid.min.js" 41 | # Quand vous utilisez un site multi-langue, utilisez ce paramètre pour désactiver le bouton de changement de langue. 42 | disableLanguageSwitchingButton = false 43 | # Ordonne les sections dans menu par poids ("weight") ou titre ("title"). Défaut à "weight" 44 | ordersectionsby = "weight" 45 | # Utilisez ce paramètre pour modifier le schéma de couleur du site. Les valeurs par défaut sont "red", "blue", "green". 46 | themeVariant = "" 47 | # Fournissez une liste de fichiers css personnalisés à charger par rapport depuis le dossier `static/` à la racine du site. 48 | custom_css = ["css/foo.css", "css/bar.css"] 49 | ``` 50 | 51 | ## Activer la recherche {#activer-recherche} 52 | 53 | Si ce n'est pas déjà présent, ajoutez les lignes suivantes dans le fichier `config.toml`. 54 | 55 | ```toml 56 | [outputs] 57 | home = [ "HTML", "RSS", "JSON"] 58 | ``` 59 | 60 | Le thème *Learn* utilise les dernières améliorations d'Hugo pour générer un fichier d'index JSON, prêt à être consommé par le moteur de recherche lunr.js. 61 | 62 | > Hugo génère lunrjs index.json à la racine du dossier `public`. 63 | > Quand vous générez le site avec `hugo server`, Hugo génère le fichier en mémoire, il n'est donc pas disponible sur le disque. 64 | 65 | ## Mermaid 66 | 67 | Les paramètres de configuration du mermaid peuvent également être définis sur une page spécifique. Dans ce cas, le paramètre global sera écrasé par le paramètre local. 68 | 69 | > Exemple: 70 | > 71 | > Mermaid est globalement handicapé. Par défaut, elle ne sera chargée par aucune page. 72 | > À la page "Architecture", vous avez besoin d'un diagramme de classe. Vous pouvez régler les paramètres de mermaid localement pour ne charger que la sirène sur cette page (pas sur les autres). 73 | 74 | Vous pouvez également désactiver mermaid pour des pages spécifiques tout en l'activant globalement. 75 | <<<<<<< HEAD 76 | 77 | ## Configuration du bouton Accueil 78 | 79 | Si l'option `disableLandingPage` est définie sur `false`, un bouton 80 | "Accueil" apparaîtra dans le menu de gauche. C'est une alternative pour cliquer 81 | sur le logo. Pour modifier le vous devrez configurer deux paramètres pour les 82 | langues définies : 83 | 84 | ```toml 85 | [Lanugages] 86 | [Lanugages.en] 87 | ... 88 | landingPageURL = "/en" 89 | landingPageName = " Redirect to Home" 90 | ... 91 | [Lanugages.fr] 92 | ... 93 | landingPageURL = "/fr" 94 | landingPageName = " Accueil" 95 | ... 96 | ``` 97 | 98 | Si ces paramètres ne sont pas configurés pour une langue spécifique, ils 99 | obtiendront leur valeurs par défaut: 100 | 101 | ```toml 102 | landingPageURL = "/" 103 | landingPageName = " Home" 104 | ``` 105 | 106 | Le bouton d'accueil va ressembler à ceci: 107 | 108 | ![Default Home Button](/en/basics/configuration/images/home_button_defaults.jpg?width=100%) 109 | ======= 110 | >>>>>>> 023fe7ef2b4c45fe66ac932d9e25d09f30b74a4e 111 | -------------------------------------------------------------------------------- /exampleSite/content/basics/configuration/images/home_button_defaults.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/basics/configuration/images/home_button_defaults.jpg -------------------------------------------------------------------------------- /exampleSite/content/basics/installation/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installation 3 | weight: 15 4 | --- 5 | 6 | The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you learn more about it by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/). 7 | 8 | ## Create your project 9 | 10 | Hugo provides a `new` command to create a new website. 11 | 12 | ``` 13 | hugo new site 14 | ``` 15 | 16 | ## Install the theme 17 | 18 | Install the **Hugo-theme-learn** theme by following [this documentation](https://gohugo.io/getting-started/quick-start/#step-3-add-a-theme) 19 | 20 | This theme's repository is: https://github.com/matcornic/hugo-theme-learn.git 21 | 22 | Alternatively, you can [download the theme as .zip](https://github.com/matcornic/hugo-theme-learn/archive/master.zip) file and extract it in the `themes` directory 23 | 24 | {{% notice note %}} 25 | Google Analytics are added to `/layout/partials/custom-footer.html` remove the contents of that file to opt-out. 26 | {{% /notice %}} 27 | 28 | ## Basic configuration 29 | 30 | When building the website, you can set a theme by using `--theme` option. However, we suggest you modify the configuration file (`config.toml`) and set the theme as the default. You can also add the `[outputs]` section to enable the search functionality. 31 | 32 | ```toml 33 | # Change the default theme to be use when building the site with Hugo 34 | theme = "hugo-theme-learn" 35 | 36 | # For search functionality 37 | [outputs] 38 | home = [ "HTML", "RSS", "JSON"] 39 | ``` 40 | 41 | ## Create your first chapter page 42 | 43 | Chapters are pages that contain other child pages. It has a special layout style and usually just contains a _chapter name_, the _title_ and a _brief abstract_ of the section. 44 | 45 | ``` 46 | ### Chapter 1 47 | 48 | # Basics 49 | 50 | Discover what this Hugo theme is all about and the core concepts behind it. 51 | ``` 52 | 53 | renders as 54 | 55 | ![A Chapter](/en/basics/installation/images/chapter.png?classes=shadow&width=60pc) 56 | 57 | **Hugo-theme-learn** provides archetypes to create skeletons for your website. Begin by creating your first chapter page with the following command 58 | 59 | ``` 60 | hugo new --kind chapter basics/_index.md 61 | ``` 62 | 63 | By opening the given file, you should see the property `chapter=true` on top, meaning this page is a _chapter_. 64 | 65 | By default all chapters and pages are created as a draft. If you want to render these pages, remove the property `draft: true` from the metadata. 66 | 67 | ## Create your first content pages 68 | 69 | Then, create content pages inside the previously created chapter. Here are two ways to create content in the chapter: 70 | 71 | ``` 72 | hugo new basics/first-content.md 73 | hugo new basics/second-content/_index.md 74 | ``` 75 | 76 | Feel free to edit thoses files by adding some sample content and replacing the `title` value in the beginning of the files. 77 | 78 | ## Launching the website locally 79 | 80 | Launch by using the following command: 81 | 82 | ``` 83 | hugo serve 84 | ``` 85 | 86 | Go to `http://localhost:1313` 87 | 88 | You should notice three things: 89 | 90 | 1. You have a left-side **Basics** menu, containing two submenus with names equal to the `title` properties in the previously created files. 91 | 2. The home page explains how to customize it by following the instructions. 92 | 3. When you run `hugo serve`, when the contents of the files change, the page automatically refreshes with the changes. Neat! 93 | 94 | ## Build the website 95 | 96 | When your site is ready to deploy, run the following command: 97 | 98 | ``` 99 | hugo 100 | ``` 101 | 102 | A `public` folder will be generated, containing all static content and assets for your website. It can now be deployed on any web server. 103 | 104 | {{% notice note %}} 105 | This website can be automatically published and hosted with [Netlify](https://www.netlify.com/) (Read more about [Automated HUGO deployments with Netlify](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)). Alternatively, you can use [Github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/) 106 | {{% /notice %}} 107 | -------------------------------------------------------------------------------- /exampleSite/content/basics/installation/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installation 3 | weight: 15 4 | --- 5 | 6 | Les étapes suivantes sont là pour vous aider à initialiser votre site. Si vous ne connaissez pas du tout Hugo, il est fortement conseillé de vous entrainer en suivant ce [super tuto pour débutants](https://gohugo.io/overview/quickstart/). 7 | 8 | ## Créer votre projet 9 | 10 | Hugo fournit une commande `new` pour créer un nouveau site. 11 | 12 | ``` 13 | hugo new site 14 | ``` 15 | 16 | ## Installer le thème 17 | 18 | Installer le thème **Hugo-theme-learn** en suivant [cette documentation](https://gohugo.io/themes/installing/) 19 | 20 | Le repo du thème est : https://github.com/matcornic/hugo-theme-learn.git 21 | 22 | Sinon, vous pouvez [télécharger le thème sous forme d'un fichier .zip](https://github.com/matcornic/hugo-theme-learn/archive/master.zip) et extrayez le dans votre dossier de thèmes. 23 | 24 | ## Configuration simple 25 | 26 | Lorsque vous générez votre site, vous pouvez définir un thème en utilisant l'option `--theme`. Il est conseillé de modifier votre fichier de configuration `config.toml` and définir votre thème par défaut. En passant, ajoutez les prérequis à l'utilisation de la fonctionnalité de recherche. 27 | 28 | ```toml 29 | # Modifiez le thème pour qu'il soit utilisé par défaut à chaque génération de site. 30 | theme = "hugo-theme-learn" 31 | 32 | # Pour la fonctionnalité de recherche 33 | [outputs] 34 | home = [ "HTML", "RSS", "JSON"] 35 | ``` 36 | 37 | ## Créer votre première page chapitre 38 | 39 | Les *chapitres* sont des pages contenant d'autre pages filles. Elles ont un affichage spécial et contiennent habituellement juste un _nom_ de chapitre, le _titre_ et un _résumé_ de la section. 40 | 41 | ``` 42 | ### Chapitre 1 43 | 44 | # Démarrage 45 | 46 | Découvrez comment utiliser ce thème Hugo et apprenez en les concepts 47 | ``` 48 | 49 | s'affiche comme 50 | 51 | ![Un chapitre](/en/basics/installation/images/chapter.png?classes=shadow&width=60pc) 52 | 53 | **Hugo-theme-learn** fournit des archétypes pour créer des squelettes pour votre site. Commencez par créer votre premier chapitre avec la commande suivante: 54 | 55 | ``` 56 | hugo new --kind chapter basics/_index.md 57 | ``` 58 | 59 | En ouvrant le fichier généré, vous devriez voir la propriété `chapter=true` en haut, paramètre quit définit que le page est un _chapitre_. 60 | 61 | ## Créer votre première page 62 | 63 | Puis, créez votre premier page dans le chapitre précédent. Pour ce faire, il existe deux possibilités : 64 | 65 | ``` 66 | hugo new basics/first-content.md 67 | hugo new basics/second-content/_index.md 68 | ``` 69 | 70 | N'hésitez pas à éditer ces fichiers en ajoutant des exemple de contenu et en remplaçant le paramètre `title` au début du fichier. 71 | 72 | ## Lancer le site localement 73 | 74 | Lancez la commande suivante : 75 | 76 | ``` 77 | hugo serve 78 | ``` 79 | 80 | Se rendre sur `http://localhost:1313` 81 | 82 | Vous devriez voir trois choses: 83 | 84 | 1. Vous avez un menu **Basics** à gauche, qui contient deux sous-menu avec des noms égal au paramètre `title` des fichiers précédemment générés. 85 | 2. La page d'accueil vous explique comment la modifier. Suivez les instructions. 86 | 3. Avec la commande `hugo serve`, la page se rafraichit automatiquement à chaque fois que vous sauvegardez. Super ! 87 | 88 | ## Générez le site 89 | 90 | Quand votre site est prêt à être déployé, lancez la commande suivante: 91 | 92 | ``` 93 | hugo 94 | ``` 95 | 96 | Un dossier `public` a été généré. Il contient tout le contenu statique et les ressources nécessaires pour votre site. Votre site peut maintenant être déployé en utilisant n'importe quel serveur ! 97 | 98 | {{% notice note %}} 99 | Ce site peut être automatiquement publié et hébergé avec [Netlify](https://www.netlify.com/) ([Plus d'infos](https://www.netlify.com/blog/2015/07/30/hosting-hugo-on-netlifyinsanely-fast-deploys/)). Sinon, vous pouvez utiliser les [Github pages](https://gohugo.io/hosting-and-deployment/hosting-on-github/) 100 | {{% /notice %}} -------------------------------------------------------------------------------- /exampleSite/content/basics/installation/images/chapter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/basics/installation/images/chapter.png -------------------------------------------------------------------------------- /exampleSite/content/basics/requirements/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Requirements 3 | weight: 10 4 | disableToc: true 5 | --- 6 | 7 | Thanks to the simplicity of Hugo, this page is as empty as this theme needs requirements. 8 | 9 | Just download latest version of [Hugo binary (> 0.25)](https://gohugo.io/getting-started/installing/) for your OS (Windows, Linux, Mac) : it's that simple. 10 | 11 | ![Magic](/en/basics/requirements/images/magic.gif?classes=shadow) 12 | -------------------------------------------------------------------------------- /exampleSite/content/basics/requirements/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Prérequis 3 | weight: 10 4 | disableToc: true 5 | --- 6 | 7 | Grâce à la simplicité d'Hugo, cette page est vide car il n'y a quasi pas de prérequis pour utiliser le thème. 8 | 9 | Téléchargez la dernière version du [binaire Hugo (> 0.25)](https://gohugo.io/getting-started/installing/) pour votre Système d'exploitation (Windows, Linux, Mac) : et c'est tout ! 10 | 11 | ![Magic](/en/basics/requirements/images/magic.gif?classes=shadow) 12 | -------------------------------------------------------------------------------- /exampleSite/content/basics/requirements/images/magic.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/basics/requirements/images/magic.gif -------------------------------------------------------------------------------- /exampleSite/content/basics/style-customization/images/blue-variant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/basics/style-customization/images/blue-variant.png -------------------------------------------------------------------------------- /exampleSite/content/basics/style-customization/images/green-variant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/basics/style-customization/images/green-variant.png -------------------------------------------------------------------------------- /exampleSite/content/basics/style-customization/images/red-variant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/basics/style-customization/images/red-variant.png -------------------------------------------------------------------------------- /exampleSite/content/cont/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Content 3 | weight: 10 4 | chapter: true 5 | pre: "2. " 6 | --- 7 | 8 | ### Chapter 2 9 | 10 | # Content 11 | 12 | Find out how to create and organize your content quickly and intuitively. 13 | -------------------------------------------------------------------------------- /exampleSite/content/cont/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contenu 3 | weight: 10 4 | chapter: true 5 | pre: "2. " 6 | --- 7 | 8 | ### Chapitre 2 9 | 10 | # Contenu 11 | 12 | Découvrez comment créer et organiser votre contenu facilement et intuitivement. 13 | -------------------------------------------------------------------------------- /exampleSite/content/cont/archetypes.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Archetypes 3 | weight: 10 4 | --- 5 | 6 | Using the command: `hugo new [relative new content path]`, you can start a content file with the date and title automatically set. While this is a welcome feature, active writers need more: [archetypes](https://gohugo.io/content/archetypes/). 7 | 8 | It is pre-configured skeleton pages with default front matter. Please refer to the documentation for types of page to understand the differences. 9 | 10 | ## Chapter {#archetypes-chapter} 11 | 12 | To create a Chapter page, run the following commands 13 | 14 | ``` 15 | hugo new --kind chapter /_index.md 16 | ``` 17 | 18 | It will create a page with predefined Front-Matter: 19 | 20 | ```markdown 21 | +++ 22 | title = "{{ replace .Name "-" " " | title }}" 23 | date = {{ .Date }} 24 | weight = 5 25 | chapter = true 26 | pre = "X. " 27 | +++ 28 | 29 | ### Chapter X 30 | 31 | # Some Chapter title 32 | 33 | Lorem Ipsum. 34 | ``` 35 | 36 | ## Default 37 | 38 | To create a default page, run either one of the following commands 39 | 40 | ``` 41 | # Either 42 | hugo new //_index.md 43 | # Or 44 | hugo new /.md 45 | ``` 46 | 47 | It will create a page with predefined Front-Matter: 48 | 49 | ```markdown 50 | +++ 51 | title = "{{ replace .Name "-" " " | title }}" 52 | date = {{ .Date }} 53 | weight = 5 54 | +++ 55 | 56 | Lorem Ipsum. 57 | ``` 58 | -------------------------------------------------------------------------------- /exampleSite/content/cont/archetypes.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Archétypes 3 | weight: 10 4 | --- 5 | 6 | En utilisant la commande: `hugo new [chemin vers nouveau contenu]`, vous pouvez créer un nouveau fichier avec la date et le title automatiquement initialisé. Même si c'est une fonctionnalité intéressante, elle reste limitée pour les auteurs actifs qui ont besoin de mieux : les [archetypes](https://gohugo.io/content/archetypes/). 7 | 8 | Les archétypes sont des squelettes de pages préconfigurées avec un Front Matter par défaut. Merci de vous référer à la documentation pour connaitre les différents types de page. 9 | 10 | ## Chapitre {#archetypes-chapter} 11 | 12 | Pour créer un chapitre, lancez les commandes suivantes 13 | 14 | ``` 15 | hugo new --kind chapter /_index.md 16 | ``` 17 | 18 | Cela crééra une page avec le Front Matter suivant: 19 | 20 | ```markdown 21 | +++ 22 | title = "{{ replace .Name "-" " " | title }}" 23 | date = {{ .Date }} 24 | weight = 5 25 | chapter = true 26 | pre = "X. " 27 | +++ 28 | 29 | ### Chapter X 30 | 31 | # Some Chapter title 32 | 33 | Lorem Ipsum. 34 | ``` 35 | 36 | ## Défaut 37 | 38 | Pour créer une page classique, lancer l'une des deux commandes suivantes 39 | 40 | ``` 41 | # Soit 42 | hugo new //_index.md 43 | # Ou 44 | hugo new /.md 45 | ``` 46 | 47 | Cela crééra une page avec le Front Matter suivant: 48 | 49 | ```markdown 50 | +++ 51 | title = "{{ replace .Name "-" " " | title }}" 52 | date = {{ .Date }} 53 | weight = 5 54 | +++ 55 | 56 | Lorem Ipsum. 57 | ``` -------------------------------------------------------------------------------- /exampleSite/content/cont/i18n/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Multilingual and i18n 4 | weight: 30 5 | --- 6 | 7 | **Learn theme** is fully compatible with Hugo multilingual mode. 8 | 9 | It provides: 10 | 11 | - Translation strings for default values (English and French). Feel free to contribute ! 12 | - Automatic menu generation from multilingual content 13 | - In-browser language switching 14 | 15 | ![I18n menu](/en/cont/i18n/images/i18n-menu.gif) 16 | 17 | ## Basic configuration 18 | 19 | After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your `config.toml` file. 20 | 21 | For example with current French and English website. 22 | 23 | ```toml 24 | # English is the default language 25 | defaultContentLanguage = "en" 26 | # Force to have /en/my-page and /fr/my-page routes, even for default language. 27 | defaultContentLanguageInSubdir= true 28 | 29 | [Languages] 30 | [Languages.en] 31 | title = "Documentation for Hugo Learn Theme" 32 | weight = 1 33 | languageName = "English" 34 | 35 | [Languages.fr] 36 | title = "Documentation du thème Hugo Learn" 37 | weight = 2 38 | languageName = "Français" 39 | ``` 40 | 41 | Then, for each new page, append the *id* of the language to the file. 42 | 43 | - Single file `my-page.md` is split in two files: 44 | - in English: `my-page.en.md` 45 | - in French: `my-page.fr.md` 46 | - Single file `_index.md` is split in two files: 47 | - in English: `_index.en.md` 48 | - in French: `_index.fr.md` 49 | 50 | {{% notice info %}} 51 | Be aware that only translated pages are displayed in menu. It's not replaced with default language content. 52 | {{% /notice %}} 53 | 54 | {{% notice tip %}} 55 | Use [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) Front Matter parameter to translate urls too. 56 | {{% /notice %}} 57 | 58 | ## Overwrite translation strings 59 | 60 | Translations strings are used for common default values used in the theme (*Edit this page* button, *Search placeholder* and so on). Translations are available in french and english but you may use another language or want to override default values. 61 | 62 | To override these values, create a new file in your local i18n folder `i18n/.toml` and inspire yourself from the theme `themes/hugo-theme-learn/i18n/en.toml` 63 | 64 | By the way, as these translations could be used by other people, please take the time to propose a translation by [making a PR](https://github.com/matcornic/hugo-theme-learn/pulls) to the theme ! 65 | 66 | ## Disable language switching 67 | 68 | Switching the language in the browser is a great feature, but for some reasons you may want to disable it. 69 | 70 | Just set `disableLanguageSwitchingButton=true` in your `config.toml` 71 | 72 | ```toml 73 | [params] 74 | # When using mulitlingual website, disable the switch language button. 75 | disableLanguageSwitchingButton = true 76 | ``` 77 | 78 | ![I18n menu](/en/cont/i18n/images/i18n-menu.gif) -------------------------------------------------------------------------------- /exampleSite/content/cont/i18n/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Multi-langue et i18n 4 | weight: 30 5 | --- 6 | 7 | **Learn** est complètement compatible avec le mode multi-langue d'Hugo. 8 | 9 | Il fournit : 10 | 11 | - Des *translation strings* pour les valeurs par défaut utilisées par le thème (Anglais et Français). N'hésitez pas à contribuer ! 12 | - Génération automatique du menu avec le contenu multi-langue 13 | - Modification de la langue dans le navigateur 14 | 15 | ![I18n menu](/en/cont/i18n/images/i18n-menu.gif) 16 | 17 | ## Configuration simple 18 | 19 | Après avoir appris [comment Hugo gère les sites multi-langue](https://gohugo.io/content-management/multilingual), définissez vos langues dans votre fichier `config.toml`. 20 | 21 | Par exemple, pour ce site, avec du contenu en français et en anglais. 22 | 23 | ```toml 24 | # Anglais est la langue par défaut 25 | defaultContentLanguage = "en" 26 | # Force d'avoir /en/ma-page et /fr/ma-page routes, même avec la langue par défaut. 27 | defaultContentLanguageInSubdir= true 28 | 29 | [Languages] 30 | [Languages.en] 31 | title = "Documentation for Hugo Learn Theme" 32 | weight = 1 33 | languageName = "English" 34 | 35 | [Languages.fr] 36 | title = "Documentation du thème Hugo Learn" 37 | weight = 2 38 | languageName = "Français" 39 | ``` 40 | 41 | Puis, pour chaque nouvelle page, ajoutez *l'id* de la langue du fichier. 42 | 43 | - Le fichier `my-page.md` est découpé en deux fichiers : 44 | - en anglais : `my-page.en.md` 45 | - en français : `my-page.fr.md` 46 | - Le fichier `_index.md` est découpé en deux fichiers : 47 | - en anglais: `_index.en.md` 48 | - en français: `_index.fr.md` 49 | 50 | {{% notice info %}} 51 | Attention, seulement les pages traduites sont affichées dans le menu. Le contenu n'est pas remplacé par les pages de la langue par défaut. 52 | {{% /notice %}} 53 | 54 | {{% notice tip %}} 55 | Utilisez le paramètre du Front Matter [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) pour traduire également les URLs. 56 | {{% /notice %}} 57 | 58 | ## Surcharger les *translation strings* 59 | 60 | Les *Translations strings* sont utilisées comme valeurs par défaut dans le thème (Bouton *Modifier la page*, Element de subsitution *Recherche*, etc.). Les traductions sont disponibles en français et en anglais mais vous pouvez utiliser n'importe quelle autre langue et surcharger avec vos propres valeurs. 61 | 62 | Pour surcharger ces valeurs, créer un nouveau fichier dans votre dossier i18n local `i18n/.toml` et inspirez vous du thème `themes/hugo-theme-learn/i18n/en.toml` 63 | 64 | D'ailleurs, ces traductions pour servir à tout le monde, donc svp prenez le temps de [proposer une Pull Request](https://github.com/matcornic/hugo-theme-learn/pulls) ! 65 | 66 | ## Désactiver le changement de langue 67 | 68 | Vous pouvez changer de langue directement dans le navigateur. C'est une super fonctionnalité, mais vous avez peut-être besoin de la désactiver. 69 | 70 | Pour ce faire, ajouter le paramètre `disableLanguageSwitchingButton=true` dans votre `config.toml` 71 | 72 | ```toml 73 | [params] 74 | # Quand vous utilisez un site en multi-langue, désactive le bouton de changment de langue. 75 | disableLanguageSwitchingButton = true 76 | ``` 77 | 78 | ![I18n menu](/en/cont/i18n/images/i18n-menu.gif) -------------------------------------------------------------------------------- /exampleSite/content/cont/i18n/images/i18n-menu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/cont/i18n/images/i18n-menu.gif -------------------------------------------------------------------------------- /exampleSite/content/cont/icons.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Icons and logos 3 | weight: 27 4 | --- 5 | 6 | The Learn theme for Hugo loads the [**Font Awesome**](https://fontawesome.com) library, allowing you to easily display any icon or logo available in the Font Awesome free collection. 7 | 8 | ## Finding an icon 9 | 10 | Browse through the available icons in the [Font Awesome Gallery](https://fontawesome.com/icons?d=gallery&m=free). Notice that the **free** filter is enabled, as only the free icons are available by default. 11 | 12 | Once on the Font Awesome page for a specific icon, for example the page for the [heart](https://fontawesome.com/icons/heart?style=solid), copy the HTML reference and paste into the markdown content. 13 | 14 | The HTML to include the heart icon is: 15 | 16 | ``` 17 | 18 | ``` 19 | 20 | ## Including in markdown 21 | 22 | Paste the `` HTML into markup and Font Awesome will load the relevant icon. 23 | 24 | ``` 25 | Built with from Grav and Hugo 26 | ``` 27 | 28 | Which appears as 29 | 30 | Built with from Grav and Hugo 31 | 32 | ## Customising icons 33 | 34 | Font Awesome provides many ways to modify the icon 35 | 36 | * Change colour (by default the icon will inherit the parent colour) 37 | * Increase or decrease size 38 | * Rotate 39 | * Combine with other icons 40 | 41 | Check the full documentation on [web fonts with CSS](https://fontawesome.com/how-to-use/web-fonts-with-css) for more. 42 | -------------------------------------------------------------------------------- /exampleSite/content/cont/menushortcuts.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Menu extra shortcuts 4 | weight: 25 5 | --- 6 | 7 | You can define additional menu entries or shortcuts in the navigation menu without any link to content. 8 | 9 | ## Basic configuration 10 | 11 | Edit the website configuration `config.toml` and add a `[[menu.shortcuts]]` entry for each link your want to add. 12 | 13 | Example from the current website: 14 | 15 | [[menu.shortcuts]] 16 | name = " Github repo" 17 | identifier = "ds" 18 | url = "https://github.com/matcornic/hugo-theme-learn" 19 | weight = 10 20 | 21 | [[menu.shortcuts]] 22 | name = " Showcases" 23 | url = "/showcase" 24 | weight = 11 25 | 26 | [[menu.shortcuts]] 27 | name = " Hugo Documentation" 28 | identifier = "hugodoc" 29 | url = "https://gohugo.io/" 30 | weight = 20 31 | 32 | [[menu.shortcuts]] 33 | name = " Credits" 34 | url = "/credits" 35 | weight = 30 36 | 37 | By default, shortcuts are preceded by a title. This title can be disabled by setting `disableShortcutsTitle=true`. 38 | However, if you want to keep the title but change its value, it can be overriden by changing your local i18n translation string configuration. 39 | 40 | For example, in your local `i18n/en.toml` file, add the following content 41 | 42 | [Shortcuts-Title] 43 | other = "" 44 | 45 | Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo i18n translation strings](https://gohugo.io/content-management/multilingual/#translation-of-strings) 46 | 47 | ## Configuration for Multilingual mode {#i18n} 48 | 49 | When using a multilingual website, you can set different menus for each language. In the `config.toml` file, prefix your menu configuration by `Languages.`. 50 | 51 | 52 | Example from the current website: 53 | 54 | [Languages] 55 | [Languages.en] 56 | title = "Documentation for Hugo Learn Theme" 57 | weight = 1 58 | languageName = "English" 59 | 60 | [[Languages.en.menu.shortcuts]] 61 | name = " Github repo" 62 | identifier = "ds" 63 | url = "https://github.com/matcornic/hugo-theme-learn" 64 | weight = 10 65 | 66 | [[Languages.en.menu.shortcuts]] 67 | name = " Showcases" 68 | url = "/showcase" 69 | weight = 11 70 | 71 | [[Languages.en.menu.shortcuts]] 72 | name = " Hugo Documentation" 73 | identifier = "hugodoc" 74 | url = "https://gohugo.io/" 75 | weight = 20 76 | 77 | [[Languages.en.menu.shortcuts]] 78 | name = " Credits" 79 | url = "/credits" 80 | weight = 30 81 | 82 | [Languages.fr] 83 | title = "Documentation du thème Hugo Learn" 84 | weight = 2 85 | languageName = "Français" 86 | 87 | [[Languages.fr.menu.shortcuts]] 88 | name = " Repo Github" 89 | identifier = "ds" 90 | url = "https://github.com/matcornic/hugo-theme-learn" 91 | weight = 10 92 | 93 | [[Languages.fr.menu.shortcuts]] 94 | name = " Vitrine" 95 | url = "/showcase" 96 | weight = 11 97 | 98 | [[Languages.fr.menu.shortcuts]] 99 | name = " Documentation Hugo" 100 | identifier = "hugodoc" 101 | url = "https://gohugo.io/" 102 | weight = 20 103 | 104 | [[Languages.fr.menu.shortcuts]] 105 | name = " Crédits" 106 | url = "/credits" 107 | weight = 30 108 | 109 | Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo multilingual menus](https://gohugo.io/content-management/multilingual/#menus) -------------------------------------------------------------------------------- /exampleSite/content/cont/menushortcuts.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Raccourcis du menu 4 | weight: 25 5 | --- 6 | 7 | Vous pouvez définir des entrées ou raccourcis supplémentaires dans le menu sans avoir besoin d'être lié à un contenu du site. 8 | 9 | ## Configuration simple 10 | 11 | Editez le fichier de configuration `config.toml` et ajoutez une entrée `[[menu.shortcuts]]` pour chaque lien que vous voulez ajouter. 12 | 13 | Exemple pour ce site: 14 | 15 | [[menu.shortcuts]] 16 | name = " Github repo" 17 | identifier = "ds" 18 | url = "https://github.com/matcornic/hugo-theme-learn" 19 | weight = 10 20 | 21 | [[menu.shortcuts]] 22 | name = " Showcases" 23 | url = "/showcase" 24 | weight = 11 25 | 26 | [[menu.shortcuts]] 27 | name = " Hugo Documentation" 28 | identifier = "hugodoc" 29 | url = "https://gohugo.io/" 30 | weight = 20 31 | 32 | [[menu.shortcuts]] 33 | name = " Credits" 34 | url = "/credits" 35 | weight = 30 36 | 37 | Par défaut, les raccourcis sont précédés par un titre. Ce titre peut être désactivé en ajouter le paramètre `disableShortcutsTitle=true` dans la section `params` de votre `config.toml`. 38 | Cependant, si vous voulez garder le titre mais changer sa valeur, vous pouvez modifier votre configuration multilangue locale en changeant les *translation string*. 39 | 40 | Par exemple, dans votre fichier local `i18n/en.toml`, ajouter le contenu 41 | 42 | [Shortcuts-Title] 43 | other = "" 44 | 45 | Plus d'infos sur [les menus Hugo](https://gohugo.io/extras/menus/) et sur [les translations strings](https://gohugo.io/content-management/multilingual/#translation-of-strings) 46 | 47 | ## Configuration pour le mode multi-langue {#i18n} 48 | 49 | Quand vous utilisez un site multi-langue, vous pouvez avoir des menus différents pour chaque langage. Dans le fichier de configuration `config.toml`, préfixez votre configuration par `Languages.`. 50 | 51 | 52 | Par exemple, avec ce site : 53 | 54 | [Languages] 55 | [Languages.en] 56 | title = "Documentation for Hugo Learn Theme" 57 | weight = 1 58 | languageName = "English" 59 | 60 | [[Languages.en.menu.shortcuts]] 61 | name = " Github repo" 62 | identifier = "ds" 63 | url = "https://github.com/matcornic/hugo-theme-learn" 64 | weight = 10 65 | 66 | [[Languages.en.menu.shortcuts]] 67 | name = " Showcases" 68 | url = "/showcase" 69 | weight = 11 70 | 71 | [[Languages.en.menu.shortcuts]] 72 | name = " Hugo Documentation" 73 | identifier = "hugodoc" 74 | url = "https://gohugo.io/" 75 | weight = 20 76 | 77 | [[Languages.en.menu.shortcuts]] 78 | name = " Credits" 79 | url = "/credits" 80 | weight = 30 81 | 82 | [Languages.fr] 83 | title = "Documentation du thème Hugo Learn" 84 | weight = 2 85 | languageName = "Français" 86 | 87 | [[Languages.fr.menu.shortcuts]] 88 | name = " Repo Github" 89 | identifier = "ds" 90 | url = "https://github.com/matcornic/hugo-theme-learn" 91 | weight = 10 92 | 93 | [[Languages.fr.menu.shortcuts]] 94 | name = " Vitrine" 95 | url = "/showcase" 96 | weight = 11 97 | 98 | [[Languages.fr.menu.shortcuts]] 99 | name = " Documentation Hugo" 100 | identifier = "hugodoc" 101 | url = "https://gohugo.io/" 102 | weight = 20 103 | 104 | [[Languages.fr.menu.shortcuts]] 105 | name = " Crédits" 106 | url = "/credits" 107 | weight = 30 108 | 109 | Plus d'infos sur [les menus Hugo](https://gohugo.io/extras/menus/) et les [menus multi-langue Hugo](https://gohugo.io/content-management/multilingual/#menus) -------------------------------------------------------------------------------- /exampleSite/content/cont/pages/images/frontmatter-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/cont/pages/images/frontmatter-icon.png -------------------------------------------------------------------------------- /exampleSite/content/cont/pages/images/pages-chapter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/cont/pages/images/pages-chapter.png -------------------------------------------------------------------------------- /exampleSite/content/cont/pages/images/pages-default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/cont/pages/images/pages-default.png -------------------------------------------------------------------------------- /exampleSite/content/cont/syntaxhighlight.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2020-06-01T13:31:12+01:00 3 | title: Code highlighting 4 | weight: 16 5 | --- 6 | 7 | Learn theme uses [highlight.js](https://highlightjs.org/) to provide code syntax highlighting. 8 | 9 | ## Markdown syntax 10 | 11 | Wrap the code block with three backticks and the name of the language. Highlight will try to auto detect the language if one is not provided. 12 | 13 | 14 | ```plaintext 15 | ```json 16 | [ 17 | { 18 | "title": "apples", 19 | "count": [12000, 20000], 20 | "description": {"text": "...", "sensitive": false} 21 | }, 22 | { 23 | "title": "oranges", 24 | "count": [17500, null], 25 | "description": {"text": "...", "sensitive": false} 26 | } 27 | ] 28 | ``` 29 | ``` 30 | 31 | 32 | Renders to: 33 | 34 | ```json 35 | [ 36 | { 37 | "title": "apples", 38 | "count": [12000, 20000], 39 | "description": {"text": "...", "sensitive": false} 40 | }, 41 | { 42 | "title": "oranges", 43 | "count": [17500, null], 44 | "description": {"text": "...", "sensitive": false} 45 | } 46 | ] 47 | ``` 48 | 49 | ## Supported languages 50 | 51 | Learn theme ships with its own version of highlight.js to support offline browsing. The included package supports 38 common languages, as described on the [highlight.js download page](https://highlightjs.org/download/). 52 | 53 | ## Identifying failed language detection 54 | 55 | Highlight will write a warning to the browser console if a requested language was not found. For example, the following code block references an imaginary language `foo`. An error will be output to the console on this page. 56 | 57 | ```plaintext 58 | ```foo 59 | bar 60 | ``` 61 | ``` 62 | 63 | ```nohighlight 64 | Could not find the language 'foo', did you forget to load/include a language module?(anonymous) @ highlight.pack.js 65 | ``` 66 | 67 | ## Supporting additional languages 68 | 69 | To support languages other than the 38 common languages included in the default highlight.js you will need to download your own version of highlight.js and add it to your site content. 70 | 71 | ### Download custom highlight.js 72 | 73 | Visit [https://highlightjs.org/download/](https://highlightjs.org/download/) and select your desired language support. Note that more languages means greater package size. 74 | 75 | ### Add custom highlight.js to static resources 76 | 77 | Inside the zip archive downloaded from highlight.js extract the file named `highlight.pack.js`. Move this file to the **new** location 78 | 79 | ```nohighlight 80 | static/js/highlight.pack.js 81 | ``` 82 | 83 | **Do not** replace the existing file at `themes/hugo-theme-learn/static/js/highlight.pack.js`. 84 | 85 | Including the file in the correct path will override the theme default highlight.pack.js and prevent issues caused in the future if the theme default file is updated. 86 | 87 | ## Further usage information 88 | 89 | See [https://highlightjs.org/usage/](https://highlightjs.org/usage/) 90 | -------------------------------------------------------------------------------- /exampleSite/content/cont/tags.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2018-11-29T08:41:44+01:00 3 | title: Tags 4 | weight: 40 5 | tags: ["documentation", "tutorial"] 6 | --- 7 | 8 | *Learn theme* support one default taxonomy of gohugo: the *tag* feature. 9 | 10 | ## Configuration 11 | 12 | Just add tags to any page: 13 | 14 | ```markdown 15 | --- 16 | date: 2018-11-29T08:41:44+01:00 17 | title: Theme tutorial 18 | weight: 15 19 | tags: ["tutorial", "theme"] 20 | --- 21 | ``` 22 | 23 | ## Behavior 24 | 25 | 26 | The tags are displayed at the top of the page, in their insertion order. 27 | 28 | Each tag is a link to a *Taxonomy* page displaying all the articles with the given tag. 29 | 30 | ## List all the tags 31 | 32 | In the `config.toml` file you can add a shortcut to display all the tags 33 | 34 | ```toml 35 | [[menu.shortcuts]] 36 | name = " Tags" 37 | url = "/tags" 38 | weight = 30 39 | ``` -------------------------------------------------------------------------------- /exampleSite/content/cont/tags.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2018-11-29T08:41:44+01:00 3 | title: Tags 4 | weight: 40 5 | tags: ["documentation", "tutorial"] 6 | --- 7 | 8 | 9 | Le *thème Learn* supporte une des taxonomy par défaut de GoHugo : les tags. 10 | 11 | ## Configuration 12 | 13 | Il suffit d'ajouter un tableau de tags sur la page : 14 | 15 | ```markdown 16 | --- 17 | date: 2018-11-29T08:41:44+01:00 18 | title: Tutoriel pour le thème 19 | weight: 15 20 | tags: ["tutoriel", "theme"] 21 | --- 22 | ``` 23 | 24 | ## Comportement 25 | 26 | Les tags sont affichés en haut de la page, dans l'ordre dans lequel ils ont été saisis. 27 | 28 | Chaque tag est un lien vers une page *Taxonomy*, qui affiche tous les article avec ce tag. 29 | 30 | 31 | ## Liste des tags 32 | 33 | Il est possible de rajouter un raccourci dans le fichier `config.toml` afin d'afficher une page listant tous les tags 34 | 35 | ```toml 36 | [[menu.shortcuts]] 37 | name = " Tags" 38 | url = "/tags" 39 | weight = 30 40 | ``` -------------------------------------------------------------------------------- /exampleSite/content/credits.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Credits 3 | disableToc: true 4 | --- 5 | 6 | ## Contributors 7 | 8 | Thanks to them for making Open Source Software a better place ! 9 | 10 | {{% ghcontributors "https://api.github.com/repos/matcornic/hugo-theme-learn/contributors?per_page=100" %}} 11 | 12 | And a special thanks to [@vjeantet](https://github.com/vjeantet) for his work on [docdock](https://github.com/vjeantet/hugo-theme-docdock), a fork of hugo-theme-learn. v2.0.0 of this theme is inspired by his work. 13 | 14 | ## Packages and libraries 15 | * [mermaid](https://mermaid-js.github.io/) - generation of diagram and flowchart from text in a similar manner as markdown 16 | * [font awesome](http://fontawesome.io/) - the iconic font and CSS framework 17 | * [jQuery](https://jquery.com) - The Write Less, Do More, JavaScript Library 18 | * [lunr](https://lunrjs.com) - Lunr enables you to provide a great search experience without the need for external, server-side, search services... 19 | * [horsey](https://bevacqua.github.io/horsey/) - Progressive and customizable autocomplete component 20 | * [clipboard.js](https://zenorocha.github.io/clipboard.js) - copy text to clipboard 21 | * [highlight.js](https://highlightjs.org) - Javascript syntax highlighter 22 | * [modernizr](https://modernizr.com) - A JavaScript toolkit that allows web developers to use new CSS3 and HTML5 features while maintaining a fine level of control over browsers that don't support 23 | 24 | ## Tooling 25 | 26 | * [Netlify](https://www.netlify.com) - Continuous deployement and hosting of this documentation 27 | * [Hugo](https://gohugo.io/) 28 | 29 | -------------------------------------------------------------------------------- /exampleSite/content/credits.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Crédits 3 | disableToc: true 4 | --- 5 | 6 | ## Contributeurs 7 | 8 | Merci à eux de rendre le monde Open Source meilleur ! 9 | 10 | {{% ghcontributors "https://api.github.com/repos/matcornic/hugo-theme-learn/contributors?per_page=100" %}} 11 | 12 | Et un grand merci à [@vjeantet](https://github.com/vjeantet) pour son travail sur [docdock](https://github.com/vjeantet/hugo-theme-docdock), un fork de _hugo-theme-learn_. La v2.0.0 du thème est en grande partie inspirée de son travail. 13 | 14 | ## Packages et librairies 15 | * [mermaid](https://mermaid-js.github.io/) - géneration de diagrames et graphiques à partir de texte similaire à Markdown 16 | * [font awesome](http://fontawesome.io/) - Le framework de polices iconiques 17 | * [jQuery](https://jquery.com) - La plus connue des librairies Javascript 18 | * [lunr](https://lunrjs.com) - Lunr fournit des fonctions de recherche sans service externe 19 | * [horsey](https://bevacqua.github.io/horsey/) - Autocomplétion de composants (utiliser pour les suggestions de recherche) 20 | * [clipboard.js](https://zenorocha.github.io/clipboard.js) - Copier le texte dans le presse-papier 21 | * [highlight.js](https://highlightjs.org) - Mise en valeur de syntaxes 22 | * [modernizr](https://modernizr.com) - Une boite à outil Javascript qui permet aux développeurs d'utiliser les dernières fonctionnalités de CSS et HTML5, même sur de vieux navigateurs. 23 | 24 | ## Outils 25 | 26 | * [Netlify](https://www.netlify.com) - Déploiement continue et hébergement de cette documentation 27 | * [Hugo](https://gohugo.io/) 28 | 29 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Shortcodes 4 | pre: "3. " 5 | weight: 15 6 | --- 7 | 8 | Hugo uses Markdown for its simple content format. However, there are a lot of things that Markdown doesn’t support well. You could use pure HTML to expand possibilities. 9 | 10 | But this happens to be a bad idea. Everyone uses Markdown because it's pure and simple to read even non-rendered. You should avoid HTML to keep it as simple as possible. 11 | 12 | To avoid this limitations, Hugo created [shortcodes](https://gohugo.io/extras/shortcodes/). A shortcode is a simple snippet inside a page. 13 | 14 | **Hugo-theme-learn** provides multiple shortcodes on top of existing ones. 15 | 16 | {{%children style="h2" description="true" %}} 17 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2016-04-09T16:50:16+02:00 3 | title: Shortcodes 4 | pre: "3. " 5 | weight: 15 6 | --- 7 | 8 | Hugo utilise Markdown pour son format simple. Cependant, il y a beaucoup de chose que Markdown ne supporte pas bien. On pourrait utiliser du HTML pur pour améliorer les capacité du Markdown. 9 | 10 | Mais c'est probablement une mauvaise idée. Tout le monde utilise le Markdown parce que c'est pur et simple à lire même lorsqu'il est affiché en texte brut. Vous devez éviter le HTML autant que possible pour garder le contenu simple. 11 | 12 | Cependant, pour éviter les limitations, Hugo a créé les [shortcodes](https://gohugo.io/extras/shortcodes/). Un shortcode est un bout de code (*snippet*) dans une page. 13 | 14 | **Hugo-theme-learn** fournit de multiple shortcodes en plus de ceux existant. 15 | 16 | {{%children style="h2" description="true" %}} 17 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/shortcodes/attachments.en.files/BachGavotteShort.mp3 -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/shortcodes/attachments.en.files/Carroll_AliceAuPaysDesMerveilles.pdf -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/shortcodes/attachments.en.files/adivorciarsetoca00cape.pdf -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.en.files/hugo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/shortcodes/attachments.en.files/hugo.png -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/shortcodes/attachments.en.files/movieselectricsheep-flock-244-32500-2.mp4 -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.en.files/small_file.txt: -------------------------------------------------------------------------------- 1 | This file was downloaded from Hugo Learn Theme. 2 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Attachments 3 | description : "The Attachments shortcode displays a list of files attached to a page." 4 | --- 5 | 6 | The Attachments shortcode displays a list of files attached to a page. 7 | 8 | {{% attachments /%}} 9 | 10 | ## Usage 11 | 12 | The shortcurt lists files found in a **specific folder**. 13 | Currently, it support two implementations for pages 14 | 15 | 1. If your page is a markdown file, attachements must be placed in a **folder** named like your page and ending with **.files**. 16 | 17 | > * content 18 | > * _index.md 19 | > * page.files 20 | > * attachment.pdf 21 | > * page.md 22 | 23 | 2. If your page is a **folder**, attachements must be placed in a nested **'files'** folder. 24 | 25 | > * content 26 | > * _index.md 27 | > * page 28 | > * index.md 29 | > * files 30 | > * attachment.pdf 31 | 32 | Be aware that if you use a multilingual website, you will need to have as many folders as languages. 33 | 34 | That's all! 35 | 36 | ### Parameters 37 | 38 | | Parameter | Default | Description | 39 | |:--|:--|:--| 40 | | title | "Attachments" | List's title | 41 | | style | "" | Choose between "orange", "grey", "blue" and "green" for nice style | 42 | | pattern | ".*" | A regular expression, used to filter the attachments by file name. The **pattern** parameter value must be a [regular expression](https://en.wikipedia.org/wiki/Regular_expression). | 43 | 44 | For example: 45 | 46 | * To match a file suffix of '.jpg', use `.*\.jpg$` (not `*.jpg`). 47 | * To match file names ending in '.jpg' or '.png', use `.*\.(jpg|png)$`. 48 | 49 | ### Examples 50 | 51 | #### List of attachments ending in pdf or mp4 52 | 53 | 54 | {{%/*attachments title="Related files" pattern=".*\.(pdf|mp4)$"/*/%}} 55 | 56 | renders as 57 | 58 | {{%attachments title="Related files" pattern=".*\.(pdf|mp4)$"/%}} 59 | 60 | #### Colored styled box 61 | 62 | {{%/*attachments style="orange" /*/%}} 63 | 64 | renders as 65 | 66 | {{% attachments style="orange" /%}} 67 | 68 | 69 | {{%/*attachments style="grey" /*/%}} 70 | 71 | renders as 72 | 73 | {{% attachments style="grey" /%}} 74 | 75 | {{%/*attachments style="blue" /*/%}} 76 | 77 | renders as 78 | 79 | {{% attachments style="blue" /%}} 80 | 81 | {{%/*attachments style="green" /*/%}} 82 | 83 | renders as 84 | 85 | {{% attachments style="green" /%}} 86 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/shortcodes/attachments.fr.files/BachGavotteShort.mp3 -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/shortcodes/attachments.fr.files/Carroll_AliceAuPaysDesMerveilles.pdf -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/shortcodes/attachments.fr.files/adivorciarsetoca00cape.pdf -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.fr.files/hugo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/shortcodes/attachments.fr.files/hugo.png -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/content/shortcodes/attachments.fr.files/movieselectricsheep-flock-244-32500-2.mp4 -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.fr.files/small_file.txt: -------------------------------------------------------------------------------- 1 | Ce fichier a été téléchargé à partir du Hugo Learn Theme. 2 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/attachments.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Attachments (Pièces jointes) 3 | description : "The Attachments shortcode displays a list of files attached to a page." 4 | --- 5 | 6 | Le shortcode *Attachments* affiche une liste de pièces jointes d'une page. 7 | 8 | {{% attachments /%}} 9 | 10 | ## Utilisation 11 | 12 | Le shortcode affiche la liste de fichiers trouvés dans un **dossier spécifique** 13 | A l'heure actuelle, il supporte deux implémentations 14 | 15 | 1. Si votre page est un fichier Markdown, les pièces jointes doivent être placée dans un **dossier** nommé comme le nom de la page et suffixé par **.files**. 16 | 17 | > * content 18 | > * _index.md 19 | > * page.files 20 | > * attachment.pdf 21 | > * page.md 22 | 23 | 2. Si votre page est un **dossier**, les pièces jointes doivent être placées dans un dossier fils **'files'**. 24 | 25 | > * content 26 | > * _index.md 27 | > * page 28 | > * index.md 29 | > * files 30 | > * attachment.pdf 31 | 32 | Attention, si votre site est multi-langue, vous devrez avec autant de dossier qu'il y a de langues. 33 | 34 | C'est tout ! 35 | 36 | ### Paramètres 37 | 38 | | Paramètre | Défaut | Description | 39 | |:--|:--|:--| 40 | | title | "Pièces jointes" | Titre de la liste | 41 | | style | "" | Choisir entre "orange", "grey", "blue" et "green" pour un style plus sympa | 42 | | pattern | ".*" | Une expression régulière, utilisée pour filtrer les pièces jointes par leur nom de fichier. Le paramètre **pattern** doit être une [expression régulière](https://en.wikipedia.org/wiki/Regular_expression). | 43 | 44 | Par exemple: 45 | 46 | * Pour trouver les fichiers avec le suffixe '.jpg', utilisez `.*\.jpg$` (pas `*.jpg`). 47 | * Pour trouver les fichiers avec les suffixe '.jpg' ou '.png', utilisez `.*\.(jpg|png)$`. 48 | 49 | ### Exemples 50 | 51 | #### Lister les pièces jointes de type pdf ou mp4 52 | 53 | 54 | {{%/*attachments title="Fichiers associés" pattern=".*\.(pdf|mp4)$"/*/%}} 55 | 56 | s'affiche comme 57 | 58 | {{%attachments title="Fichiers associés" pattern=".*\.(pdf|mp4)$"/%}} 59 | 60 | #### Modifier le style 61 | 62 | {{%/*attachments style="orange" /*/%}} 63 | 64 | s'affiche comme 65 | 66 | {{% attachments style="orange" /%}} 67 | 68 | 69 | {{%/*attachments style="grey" /*/%}} 70 | 71 | s'affiche comme 72 | 73 | {{% attachments style="grey" /%}} 74 | 75 | {{%/*attachments style="blue" /*/%}} 76 | 77 | s'affiche comme 78 | 79 | {{% attachments style="blue" /%}} 80 | 81 | {{%/*attachments style="green" /*/%}} 82 | 83 | s'affiche comme 84 | 85 | {{% attachments style="green" /%}} -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/button.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Button 3 | description : "Nice buttons on your page." 4 | --- 5 | 6 | A button is a just a clickable button with optional icon. 7 | 8 | ``` 9 | {{%/* button href="https://getgrav.org/" */%}}Get Grav{{%/* /button */%}} 10 | {{%/* button href="https://getgrav.org/" icon="fas fa-download" */%}}Get Grav with icon{{%/* /button */%}} 11 | {{%/* button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" */%}}Get Grav with icon right{{%/* /button */%}} 12 | ``` 13 | 14 | {{% button href="https://getgrav.org/" %}}Get Grav{{% /button %}} 15 | {{% button href="https://getgrav.org/" icon="fas fa-download" %}}Get Grav with icon{{% /button %}} 16 | {{% button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" %}}Get Grav with icon right{{% /button %}} 17 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/button.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Button (Bouton) 3 | description : "De beaux boutons sur votre page." 4 | --- 5 | 6 | Le shortcode *button* est simplement un bouton cliquable avec une icône optionnelle. 7 | 8 | ``` 9 | {{%/* button href="https://getgrav.org/" */%}}Téléchargez Grav{{%/* /button */%}} 10 | {{%/* button href="https://getgrav.org/" icon="fas fa-download" */%}}Téléchargez Grav avec icône{{%/* /button */%}} 11 | {{%/* button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" */%}}Téléchargez Grav avec icône à droite{{%/* /button */%}} 12 | ``` 13 | 14 | {{% button href="https://getgrav.org/" %}}Téléchargez Grav{{% /button %}} 15 | {{% button href="https://getgrav.org/" icon="fas fa-download" %}}Téléchargez Grav avec icône{{% /button %}} 16 | {{% button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" %}}Téléchargez Grav avec icône à droite{{% /button %}} 17 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/_index.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title : Children 3 | description : List the child pages of a page 4 | --- 5 | 6 | Use the children shortcode to list the child pages of a page and the further descendants (children's children). By default, the shortcode displays links to the child pages. 7 | 8 | ## Usage 9 | 10 | | Parameter | Default | Description | 11 | |:--|:--|:--| 12 | | page | _current_ | Specify the page name (section name) to display children for | 13 | | style | "li" | Choose the style used to display descendants. It could be any HTML tag name | 14 | | showhidden | "false" | When true, child pages hidden from the menu will be displayed | 15 | | description | "false" | Allows you to include a short text under each page in the list. When no description exists for the page, children shortcode takes the first 70 words of your content. [Read more info about summaries on gohugo.io](https://gohugo.io/content/summaries/) | 16 | | depth | 1 | Enter a number to specify the depth of descendants to display. For example, if the value is 2, the shortcode will display 2 levels of child pages. **Tips:** set 999 to get all descendants | 17 | | sort | none | Sort children by **Weight** - to sort on menu order, **Name** - to sort alphabetically on menu label, **Identifier** - to sort alphabetically on identifier set in frontmatter, and **URL** - to sort by URL | 18 | 19 | ## Demo 20 | 21 | {{%/* children */%}} 22 | 23 | {{% children %}} 24 | 25 | {{%/* children description="true" */%}} 26 | 27 | {{%children description="true" %}} 28 | 29 | {{%/* children depth="3" showhidden="true" */%}} 30 | 31 | {{% children depth="3" showhidden="true" %}} 32 | 33 | {{%/* children style="h2" depth="3" description="true" */%}} 34 | 35 | {{% children style="h2" depth="3" description="true" %}} 36 | 37 | {{%/* children style="div" depth="999" */%}} 38 | 39 | {{% children style="div" depth="999" %}} 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/_index.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title : Children (Pages filles) 3 | description : Liste les pages filles de la page 4 | --- 5 | 6 | Utilisez le shortcode *children* pour lister les pages filles de la page et tous ses déscendants (pages filles de pages filles). Par défaut, le shortcode affiche des liens vers les pages filles. 7 | 8 | ## Utilisation 9 | 10 | | Paramètre | Défaut | Description | 11 | |:--|:--|:--| 12 | | page | _current_ | Spécifie le nom de la page (nom de la section) à afficher | 13 | | style | "li" | Choisi le style à utiliser pour afficher les descendants. Cela peut être n'importe quel balise HTML | 14 | | showhidden | "false" | Quand *true*, pages filles cachées dans le menu seront affichées quand même | 15 | | description | "false" | Permet d'inclure le texte de la description de la page sous chaque entré de la liste.
quand aucune description existe pour la page, le shortcode prend les 70 premiers mots du contenu. [plus d'infos sur gohugo.io](https://gohugo.io/content/summaries/) | 16 | | depth | 1 | Nombre de descendants à afficher. Par exemple, si la valeur est 2, le shortcode va afficher 2 niveaux de pages filels.
**Astuce:** Utilisez 999 pour avoir tous les descendants| 17 | | sort | | Tri les pages filles par
  • Weight - Poids
  • Name - Nom
  • Identifier - Trier alphabétiquement par identifiant configuré dans le front matter
  • URL - URL
  • | 18 | 19 | ## Démo 20 | 21 | {{%/* children */%}} 22 | 23 | {{% children %}} 24 | 25 | {{%/* children description="true" */%}} 26 | 27 | {{%children description="true" %}} 28 | 29 | {{%/* children depth="3" showhidden="true" */%}} 30 | 31 | {{% children depth="3" showhidden="true" %}} 32 | 33 | {{%/* children style="h2" depth="3" description="true" */%}} 34 | 35 | {{% children style="h2" depth="3" description="true" %}} 36 | 37 | {{%/* children style="div" depth="999" */%}} 38 | 39 | {{% children style="div" depth="999" %}} 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-1/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-1/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-1/children-1-1/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-1/children-1-1/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1-1" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1-1" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1-1-1" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-1/children-1-1/children-1-1-1/children-1-1-1-1/children-1-1-1-1-1/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 1-1-1-1-1" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-2/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 2" 3 | description = "" 4 | +++ 5 | 6 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 7 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 8 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 9 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 10 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 11 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-2/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 2" 3 | description = "" 4 | +++ 5 | 6 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 7 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 8 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 9 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 10 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 11 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-2/test3.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page test 3" 3 | description = "This is a page test" 4 | +++ 5 | 6 | This is a test 3 demo child page -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-2/test3.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page test 3" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo test 3 -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-3/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 3" 3 | description = "This is a demo child page" 4 | +++ 5 | 6 | This is a demo child page, not displayed in the menu -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-3/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 3" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-4/_index.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 4" 3 | description = "This is a demo child page" 4 | hidden = true 5 | +++ 6 | 7 | This is a demo child page, not displayed in the menu -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/children-4/_index.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page 4" 3 | description = "Ceci est une page test" 4 | hidden = true 5 | +++ 6 | 7 | Ceci est une page de demo -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/test.en.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page test" 3 | description = "This is a page test" 4 | +++ 5 | 6 | This is a test demo child page -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/children/test.fr.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "page test" 3 | description = "Ceci est une page test" 4 | +++ 5 | 6 | Ceci est une page de demo -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/expand.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title : Expand 3 | description : "Displays an expandable/collapsible section of text on your page" 4 | --- 5 | 6 | The Expand shortcode displays an expandable/collapsible section of text on your page. 7 | Here is an example 8 | 9 | {{%expand%}} 10 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 11 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 12 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 13 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 14 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 15 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 16 | {{%/expand%}} 17 | 18 | 19 | ## Usage 20 | 21 | 22 | this shortcode takes exactly one optional parameter to define the text that appears next to the expand/collapse icon. (default is "Expand me...") 23 | 24 | {{%/*expand "Is this learn theme rocks ?" */%}}Yes !.{{%/* /expand*/%}} 25 | 26 | {{%expand "Is this learn theme rocks ?" %}}Yes !{{% /expand%}} 27 | 28 | # Demo 29 | 30 | {{%/*expand*/%}} 31 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 32 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 33 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 34 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 35 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 36 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 37 | {{%/* /expand*/%}} 38 | 39 | 40 | {{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 41 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 42 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 43 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 44 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 45 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}} -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/expand.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title : Expand 3 | description : "Affiche une section de texte qui se plie et se déplie" 4 | --- 5 | 6 | Le shortcode *Expand* affiche une section de texte qui se plie et se déplie. 7 | Ci-dessous un exemple. 8 | 9 | {{%expand%}} 10 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 11 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 12 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 13 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 14 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 15 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 16 | {{%/expand%}} 17 | 18 | 19 | ## Utilisation 20 | 21 | 22 | Ce shortcode prends exactement un paramètre optionel pour définir le texte à côté de l'icone. (valeur par défaut est "Déroulez-moi...") 23 | 24 | {{%/*expand "Est-ce que ce thème envoie du pâté ?" */%}}Oui !.{{%/* /expand*/%}} 25 | 26 | {{%expand "Est-ce que ce thème envoie du pâté ?" %}}Oui !{{% /expand%}} 27 | 28 | # Demo 29 | 30 | {{%/*expand*/%}} 31 | Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 32 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 33 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 34 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 35 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 36 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 37 | {{%/* /expand*/%}} 38 | 39 | 40 | {{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 41 | tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 42 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo 43 | consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse 44 | cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non 45 | proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}} -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/notice.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Notice 3 | description : "Disclaimers to help you structure your page" 4 | --- 5 | 6 | The notice shortcode shows 4 types of disclaimers to help you structure your page. 7 | 8 | ### Note 9 | 10 | ``` 11 | {{%/* notice note */%}} 12 | A notice disclaimer 13 | {{%/* /notice */%}} 14 | ``` 15 | 16 | renders as 17 | 18 | {{% notice note %}} 19 | A notice disclaimer 20 | {{% /notice %}} 21 | 22 | ### Info 23 | 24 | ``` 25 | {{%/* notice info */%}} 26 | An information disclaimer 27 | {{%/* /notice */%}} 28 | ``` 29 | 30 | renders as 31 | 32 | {{% notice info %}} 33 | An information disclaimer 34 | {{% /notice %}} 35 | 36 | ### Tip 37 | 38 | ``` 39 | {{%/* notice tip */%}} 40 | A tip disclaimer 41 | {{%/* /notice */%}} 42 | ``` 43 | 44 | renders as 45 | 46 | {{% notice tip %}} 47 | A tip disclaimer 48 | {{% /notice %}} 49 | 50 | ### Warning 51 | 52 | ``` 53 | {{%/* notice warning */%}} 54 | A warning disclaimer 55 | {{%/* /notice */%}} 56 | ``` 57 | 58 | renders as 59 | 60 | {{% notice warning %}} 61 | A warning disclaimer 62 | {{% /notice %}} 63 | -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/notice.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Notice 3 | description : "Message pour vous aider à structurer votre contenu" 4 | --- 5 | 6 | Le shortcode *Notice* permet d'afficher 4 types de message pour vous aider à structurer votre contenu. 7 | 8 | ### Note 9 | 10 | ``` 11 | {{%/* notice note */%}} 12 | Une notice de type *note* 13 | {{%/* /notice */%}} 14 | ``` 15 | 16 | s'affiche comme 17 | 18 | {{% notice note %}} 19 | Une notice de type *note* 20 | {{% /notice %}} 21 | 22 | ### Info 23 | 24 | ``` 25 | {{%/* notice info */%}} 26 | Une notice de type *info* 27 | {{%/* /notice */%}} 28 | ``` 29 | 30 | s'affiche comme 31 | 32 | {{% notice info %}} 33 | Une notice de type *info* 34 | {{% /notice %}} 35 | 36 | ### Tip 37 | 38 | ``` 39 | {{%/* notice tip */%}} 40 | Une notice de type *tip* 41 | {{%/* /notice */%}} 42 | ``` 43 | 44 | s'affiche comme 45 | 46 | {{% notice tip %}} 47 | Une notice de type *tip* 48 | {{% /notice %}} 49 | 50 | ### Warning 51 | 52 | ``` 53 | {{%/* notice warning */%}} 54 | Une notice de type *warning* 55 | {{%/* /notice */%}} 56 | ``` 57 | 58 | s'affiche comme 59 | 60 | {{% notice warning %}} 61 | Une notice de type *warning* 62 | {{% /notice %}} -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/siteparam.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Site param 3 | description : "Get value of site params variables in your page." 4 | --- 5 | 6 | `siteparam` shortcode is used to help you print values of site params. 7 | 8 | For instance, in this current site, the `editURL` variable is used in `config.toml` 9 | 10 | ```toml 11 | [params] 12 | editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/" 13 | ``` 14 | 15 | Use the `siteparam` shortcode to display its value. 16 | 17 | ``` 18 | `editURL` Value : {{%/* siteparam "editURL" */%}} 19 | ``` 20 | 21 | is displayed as 22 | 23 | `editURL` Value : {{% siteparam "editURL" %}} -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/siteparam.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Site param 3 | description : "Afficher la valeur d'un paramètre global du site dans votre page" 4 | --- 5 | 6 | Les shortcode `siteparam` est utilisé pour vous aider à afficher des valeurs provenant des paramètres globaux du site. 7 | 8 | Par exemple, dans ce site, le paramètre `editURL` est utilisé dans le fichier `config.toml` 9 | 10 | ```toml 11 | [params] 12 | editURL = "https://github.com/matcornic/hugo-theme-learn/edit/master/exampleSite/content/" 13 | ``` 14 | 15 | Utilisez le shortcode `siteparam` pour affichier sa valeur. 16 | 17 | ``` 18 | Valeur de `editURL` : {{%/* siteparam "editURL" */%}} 19 | ``` 20 | 21 | s'affiche comme 22 | 23 | Valeur de `editURL` : {{% siteparam "editURL" %}} -------------------------------------------------------------------------------- /exampleSite/content/shortcodes/tabs.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tabbed views 3 | description : "Synchronize selection of content in different tabbed views" 4 | --- 5 | 6 | Choose which content to see across the page. Very handy for providing code 7 | snippets for multiple languages or providing configuration in different formats. 8 | 9 | ## Code example 10 | 11 | {{}} 12 | {{%/* tab name="python" */%}} 13 | ```python 14 | print("Hello World!") 15 | ``` 16 | {{%/* /tab */%}} 17 | {{%/* tab name="R" */%}} 18 | ```R 19 | > print("Hello World!") 20 | ``` 21 | {{%/* /tab */%}} 22 | {{%/* tab name="Bash" */%}} 23 | ```Bash 24 | echo "Hello World!" 25 | ``` 26 | {{%/* /tab */%}} 27 | {{}} 28 | 29 | Renders as: 30 | 31 | {{< tabs >}} 32 | {{% tab name="python" %}} 33 | ```python 34 | print("Hello World!") 35 | ``` 36 | {{% /tab %}} 37 | {{% tab name="R" %}} 38 | ```R 39 | > print("Hello World!") 40 | ``` 41 | {{% /tab %}} 42 | {{% tab name="Bash" %}} 43 | ```Bash 44 | echo "Hello World!" 45 | ``` 46 | {{% /tab %}} 47 | {{< /tabs >}} 48 | 49 | Tab views with the same tabs that belong to the same group sychronize their selection: 50 | 51 | {{< tabs >}} 52 | {{% tab name="python" %}} 53 | ```python 54 | print("Hello World!") 55 | ``` 56 | {{% /tab %}} 57 | {{% tab name="R" %}} 58 | ```R 59 | > print("Hello World!") 60 | ``` 61 | {{% /tab %}} 62 | {{% tab name="Bash" %}} 63 | ```Bash 64 | echo "Hello World!" 65 | ``` 66 | {{% /tab %}} 67 | {{< /tabs >}} 68 | 69 | ## Config example 70 | 71 | {{}} 72 | {{%/* tab name="json" */%}} 73 | ```json 74 | { 75 | "Hello": "World" 76 | } 77 | ``` 78 | {{%/* /tab */%}} 79 | {{%/* tab name="XML" */%}} 80 | ```xml 81 | World 82 | ``` 83 | {{%/* /tab */%}} 84 | {{%/* tab name="properties" */%}} 85 | ```properties 86 | Hello = World 87 | ``` 88 | {{%/* /tab */%}} 89 | {{}} 90 | 91 | Renders as: 92 | 93 | {{< tabs groupId="config" >}} 94 | {{% tab name="json" %}} 95 | ```json 96 | { 97 | "Hello": "World" 98 | } 99 | ``` 100 | {{% /tab %}} 101 | {{% tab name="XML" %}} 102 | ```xml 103 | World 104 | ``` 105 | {{% /tab %}} 106 | {{% tab name="properties" %}} 107 | ```properties 108 | Hello = World 109 | ``` 110 | {{% /tab %}} 111 | {{< /tabs >}} 112 | 113 | {{% notice warning %}} 114 | When using tab views with different content sets, make sure to use a common `groupId` for equal sets but distinct 115 | `groupId` for different sets. The `groupId` defaults to `'default'`. 116 | **Take this into account across the whole site!** 117 | The tab selection is restored automatically based on the `groupId` and if it cannot find a tab item because it came 118 | from the `'default'` group on a different page then all tabs will be empty at first. 119 | {{% /notice %}} 120 | -------------------------------------------------------------------------------- /exampleSite/content/showcase.en.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Showcase 3 | disableToc: true 4 | --- 5 | 6 | #### [TAT](https://ovh.github.io/tat/overview/) by OVH 7 | ![TAT image](/images/showcase/tat.png?width=50pc) 8 | 9 | #### [Tshark.dev](https://tshark.dev) by Ross Jacobs 10 | ![Tshark.dev image](/images/showcase/tshark_dev.png?width=50pc) 11 | 12 | #### [inteliver](https://docs.inteliver.com) by Amir Lavasani 13 | ![docs.inteliver.com image](/images/showcase/inteliver_docs.png?width=50pc) -------------------------------------------------------------------------------- /exampleSite/content/showcase.fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Vitrine 3 | disableToc: true 4 | slug: vitrine 5 | --- 6 | 7 | #### [TAT](https://ovh.github.io/tat/overview/) par OVH 8 | ![TAT image](/images/showcase/tat.png?width=50pc) 9 | 10 | #### [Tshark.dev](https://tshark.dev) par Ross Jacobs 11 | ![Tshark.dev image](/images/showcase/tshark_dev.png?width=50pc) 12 | 13 | #### [inteliver](https://docs.inteliver.com) by Amir Lavasani 14 | ![docs.inteliver.com image](/images/showcase/inteliver_docs.png?width=50pc) -------------------------------------------------------------------------------- /exampleSite/layouts/partials/custom-footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /exampleSite/layouts/partials/logo.html: -------------------------------------------------------------------------------- 1 | 40 | -------------------------------------------------------------------------------- /exampleSite/layouts/partials/menu-footer.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | Download 4 | 5 | 6 | Star 7 | 8 | 9 | Fork 10 | 11 |

    Built with from Grav and Hugo

    12 |
    13 | 14 | 15 | -------------------------------------------------------------------------------- /exampleSite/layouts/shortcodes/ghcontributors.html: -------------------------------------------------------------------------------- 1 | 22 |
    23 | {{ $url := .Get 0 }} 24 | {{ range getJSON $url }} 25 |
    26 | 27 | 28 | {{.contributions}} commits 29 |
    30 | {{ end }} 31 |
    -------------------------------------------------------------------------------- /exampleSite/static/css/theme-mine.css: -------------------------------------------------------------------------------- 1 | 2 | :root{ 3 | 4 | --MAIN-TEXT-color:#323232; /* Color of text by default */ 5 | --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ 6 | --MAIN-LINK-color:#599a3e; /* Color of links */ 7 | --MAIN-LINK-HOVER-color:#3f6d2c; /* Color of hovered links */ 8 | --MAIN-ANCHOR-color: #599a3e; /* color of anchors on titles */ 9 | 10 | --MENU-HEADER-BG-color:#74b559; /* Background color of menu header */ 11 | --MENU-HEADER-BORDER-color:#9cd484; /*Color of menu header border */ 12 | 13 | --MENU-SEARCH-BG-color:#599a3e; /* Search field background color (by default borders + icons) */ 14 | --MENU-SEARCH-BOX-color: #84c767; /* Override search field border color */ 15 | --MENU-SEARCH-BOX-ICONS-color: #c7f7c4; /* Override search field icons color */ 16 | 17 | --MENU-SECTIONS-ACTIVE-BG-color:#1b211c; /* Background color of the active section and its childs */ 18 | --MENU-SECTIONS-BG-color:#222723; /* Background color of other sections */ 19 | --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ 20 | --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ 21 | --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ 22 | --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ 23 | 24 | --MENU-VISITED-color: #599a3e; /* Color of 'page visited' icons in menu */ 25 | --MENU-SECTION-HR-color: #18211c; /* Color of
    separator in menu */ 26 | 27 | } 28 | 29 | body { 30 | color: var(--MAIN-TEXT-color) !important; 31 | } 32 | 33 | textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { 34 | border-color: none; 35 | box-shadow: none; 36 | } 37 | 38 | h2, h3, h4, h5 { 39 | color: var(--MAIN-TITLES-TEXT-color) !important; 40 | } 41 | 42 | a { 43 | color: var(--MAIN-LINK-color); 44 | } 45 | 46 | .anchor { 47 | color: var(--MAIN-ANCHOR-color); 48 | } 49 | 50 | a:hover { 51 | color: var(--MAIN-LINK-HOVER-color); 52 | } 53 | 54 | #sidebar ul li.visited > a .read-icon { 55 | color: var(--MENU-VISITED-color); 56 | } 57 | 58 | #body a.highlight:after { 59 | display: block; 60 | content: ""; 61 | height: 1px; 62 | width: 0%; 63 | -webkit-transition: width 0.5s ease; 64 | -moz-transition: width 0.5s ease; 65 | -ms-transition: width 0.5s ease; 66 | transition: width 0.5s ease; 67 | background-color: var(--MAIN-LINK-HOVER-color); 68 | } 69 | #sidebar { 70 | background-color: var(--MENU-SECTIONS-BG-color); 71 | } 72 | #sidebar #header-wrapper { 73 | background: var(--MENU-HEADER-BG-color); 74 | color: var(--MENU-SEARCH-BOX-color); 75 | border-color: var(--MENU-HEADER-BORDER-color); 76 | } 77 | #sidebar .searchbox { 78 | border-color: var(--MENU-SEARCH-BOX-color); 79 | background: var(--MENU-SEARCH-BG-color); 80 | } 81 | #sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { 82 | background: var(--MENU-SECTIONS-ACTIVE-BG-color); 83 | } 84 | #sidebar .searchbox * { 85 | color: var(--MENU-SEARCH-BOX-ICONS-color); 86 | } 87 | 88 | #sidebar a { 89 | color: var(--MENU-SECTIONS-LINK-color); 90 | } 91 | 92 | #sidebar a:hover { 93 | color: var(--MENU-SECTIONS-LINK-HOVER-color); 94 | } 95 | 96 | #sidebar ul li.active > a { 97 | background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); 98 | color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; 99 | } 100 | 101 | #sidebar hr { 102 | border-color: var(--MENU-SECTION-HR-color); 103 | } 104 | 105 | -------------------------------------------------------------------------------- /exampleSite/static/fonts/monogramos-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/static/fonts/monogramos-webfont.eot -------------------------------------------------------------------------------- /exampleSite/static/fonts/monogramos-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/static/fonts/monogramos-webfont.ttf -------------------------------------------------------------------------------- /exampleSite/static/fonts/monogramos-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/static/fonts/monogramos-webfont.woff -------------------------------------------------------------------------------- /exampleSite/static/fonts/monogramos-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/static/fonts/monogramos-webfont.woff2 -------------------------------------------------------------------------------- /exampleSite/static/images/showcase/inteliver_docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/static/images/showcase/inteliver_docs.png -------------------------------------------------------------------------------- /exampleSite/static/images/showcase/tat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/static/images/showcase/tat.png -------------------------------------------------------------------------------- /exampleSite/static/images/showcase/tshark_dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/exampleSite/static/images/showcase/tshark_dev.png -------------------------------------------------------------------------------- /i18n/ar.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "...البحث" 3 | 4 | [Clear-History] 5 | other = "مسح السجل" 6 | 7 | [Attachments-label] 8 | other = "مرفقات" 9 | 10 | [title-404] 11 | other = "خطأ" 12 | 13 | [message-404] 14 | other = ".¯\\_(ツ)_/¯أوبس. يبدو أن هذه الصفحة غير موجودة" 15 | 16 | [Go-to-homepage] 17 | other = "الذهاب إلى الصفحة الرئيسية" 18 | 19 | [Edit-this-page] 20 | other = "تعديل هذه الصفحة" 21 | 22 | [Shortcuts-Title] 23 | other = "المزيد" 24 | 25 | [Expand-title] 26 | other = "...قم بتوسيع" 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /i18n/de.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Suchen..." 3 | 4 | [Clear-History] 5 | other = "Verlauf löschen" 6 | 7 | [Attachments-label] 8 | other = "Anhänge" 9 | 10 | [title-404] 11 | other = "Fehler" 12 | 13 | [message-404] 14 | other = "Huch. Diese Seite scheint nicht zu existieren ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Gehe zur Homepage" 18 | 19 | [Edit-this-page] 20 | other = "Bearbeite diese Seite" 21 | 22 | [Shortcuts-Title] 23 | other = "Mehr" 24 | 25 | [Expand-title] 26 | other = "Erweitere mich..." 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /i18n/en.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Search..." 3 | 4 | [Clear-History] 5 | other = "Clear History" 6 | 7 | [Attachments-label] 8 | other = "Attachments" 9 | 10 | [title-404] 11 | other = "Error" 12 | 13 | [message-404] 14 | other = "Woops. Looks like this page doesn't exist ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Go to homepage" 18 | 19 | [Edit-this-page] 20 | other = "Edit this page" 21 | 22 | [Shortcuts-Title] 23 | other = "More" 24 | 25 | [Expand-title] 26 | other = "Expand me..." 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /i18n/es.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Buscar..." 3 | 4 | [Clear-History] 5 | other = "Borrar Historial" 6 | 7 | [Attachments-label] 8 | other = "Adjuntos" 9 | 10 | [title-404] 11 | other = "Error" 12 | 13 | [message-404] 14 | other = "Ups. Parece que la página no existe ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Ir al inicio" 18 | 19 | [Edit-this-page] 20 | other = "Editar esta página" 21 | 22 | [Shortcuts-Title] 23 | other = "Más" 24 | 25 | [Expand-title] 26 | other = "Expandir..." 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /i18n/fr.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Rechercher..." 3 | 4 | [Clear-History] 5 | other = "Supprimer l'historique" 6 | 7 | [Attachments-label] 8 | other = "Pièces jointes" 9 | 10 | [title-404] 11 | other = "Erreur" 12 | 13 | [message-404] 14 | other = "Oups. On dirait que cette page n'existe pas ¯\\_(ツ)_/¯" 15 | 16 | [Go-to-homepage] 17 | other = "Vers la page d'accueil" 18 | 19 | [Edit-this-page] 20 | other = "Modifier la page" 21 | 22 | [Shortcuts-Title] 23 | other = "Aller plus loin" 24 | 25 | [Expand-title] 26 | other = "Déroulez-moi..." 27 | 28 | [Byte-symbol] 29 | other = "o" 30 | 31 | [Kilobyte-symbol] 32 | other = "ko" 33 | 34 | [Megabyte-symbol] 35 | other = "Mo" 36 | -------------------------------------------------------------------------------- /i18n/hi.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "खोजे..." 3 | 4 | [Clear-History] 5 | other = "इतिहास मिटाएँ" 6 | 7 | [Attachments-label] 8 | other = "संलग्नंक (अटैचमेंट)" 9 | 10 | [title-404] 11 | other = "त्रुटि" 12 | 13 | [message-404] 14 | other = "यह पृष्ठ अभि अनुपलब्ध है!" 15 | 16 | [Go-to-homepage] 17 | other = "मुख्य पृष्ठ पर जाऐ" 18 | 19 | [Edit-this-page] 20 | other = "यह पृष्ठ संपादित करें" 21 | 22 | [Shortcuts-Title] 23 | other = "अधिक सामग्री दिखाएं" 24 | 25 | [Expand-title] 26 | other = "विस्तार करे..." 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /i18n/id.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Telusuri..." 3 | 4 | [Clear-History] 5 | other = "Bersihkan Riwayat" 6 | 7 | [Attachments-label] 8 | other = "Lampiran" 9 | 10 | [title-404] 11 | other = "Kesalahan" 12 | 13 | [message-404] 14 | other = "Oops. Sepertinya halaman ini tidak ada ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Ke halaman depan" 18 | 19 | [Edit-this-page] 20 | other = "Edit halaman ini" 21 | 22 | [Shortcuts-Title] 23 | other = "Lainnya" 24 | 25 | [Expand-title] 26 | other = "Bentangkan..." 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /i18n/ja.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "検索..." 3 | 4 | [Clear-History] 5 | other = "履歴削除" 6 | 7 | [Attachments-label] 8 | other = "添付" 9 | 10 | [title-404] 11 | other = "エラー" 12 | 13 | [message-404] 14 | other = "おっと。ページが見当たりません。 ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "ホームページへ行く" 18 | 19 | [Edit-this-page] 20 | other = "このページを編集" 21 | 22 | [Shortcuts-Title] 23 | other = "更に" 24 | 25 | [Expand-title] 26 | other = "開く..." 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /i18n/nl.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Zoeken..." 3 | 4 | [Clear-History] 5 | other = "Wis geschiedenis" 6 | 7 | [Attachments-label] 8 | other = "Bijlagen" 9 | 10 | [title-404] 11 | other = "Error" 12 | 13 | [message-404] 14 | other = "Blijkbaar bestaat deze pagina niet ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Naar startpagina" 18 | 19 | [Edit-this-page] 20 | other = "Deze pagina bewerken" 21 | 22 | [Shortcuts-Title] 23 | other = "Snelkoppelingen" 24 | 25 | [Expand-title] 26 | other = "Lees meer..." 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /i18n/pt.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Procurar..." 3 | 4 | [Clear-History] 5 | other = "Limpar Histórico" 6 | 7 | [Attachments-label] 8 | other = "Anexos" 9 | 10 | [title-404] 11 | other = "Erro" 12 | 13 | [message-404] 14 | other = "Ops. Parece que a página não existe ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Ir para o início" 18 | 19 | [Edit-this-page] 20 | other = "Editar esta página" 21 | 22 | [Shortcuts-Title] 23 | other = "Mais" 24 | 25 | [Expand-title] 26 | other = "Expandir..." 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /i18n/ru.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Поиск..." 3 | 4 | [Clear-History] 5 | other = "Очистить историю" 6 | 7 | [Attachments-label] 8 | other = "Присоединенные файлы" 9 | 10 | [title-404] 11 | other = "Ошибка" 12 | 13 | [message-404] 14 | other = "Упс. Выглядит будто такой страницы нет ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Перейти на главную" 18 | 19 | [Edit-this-page] 20 | other = "Редактировать" 21 | 22 | [Shortcuts-Title] 23 | other = "Еще" 24 | 25 | [Expand-title] 26 | other = "Развернуть..." 27 | 28 | [Byte-symbol] 29 | other = "Б" 30 | 31 | [Kilobyte-symbol] 32 | other = "КБ" 33 | 34 | [Megabyte-symbol] 35 | other = "МБ" 36 | -------------------------------------------------------------------------------- /i18n/tr.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Ara..." 3 | 4 | [Clear-History] 5 | other = "Geçmişi Temizle" 6 | 7 | [Attachments-label] 8 | other = "Ekler" 9 | 10 | [title-404] 11 | other = "Hata" 12 | 13 | [message-404] 14 | other = "Uups. Görünüşe göre böyle bir sayfa yok ¯\\_(ツ)_/¯" 15 | 16 | [Go-to-homepage] 17 | other = "Anasayfaya dön" 18 | 19 | [Edit-this-page] 20 | other = "Sayfayı düzenle" 21 | 22 | [Shortcuts-Title] 23 | other = "Dahası Var" 24 | 25 | [Expand-title] 26 | other = "Genişlet..." 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /i18n/vn.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "Tìm kiếm..." 3 | 4 | [Clear-History] 5 | other = "Xóa lịch sử.." 6 | 7 | [Attachments-label] 8 | other = "Tập tin đính kèm" 9 | 10 | [title-404] 11 | other = "Lỗi" 12 | 13 | [message-404] 14 | other = "Tiếc quá! Có vẻ như trang này không tồn tại ¯\\_(ツ)_/¯." 15 | 16 | [Go-to-homepage] 17 | other = "Đi đến trang chủ" 18 | 19 | [Edit-this-page] 20 | other = "Chỉnh sửa trang này" 21 | 22 | [Shortcuts-Title] 23 | other = "Nội dung khác" 24 | 25 | [Expand-title] 26 | other = "Mở rộng..." 27 | 28 | [BinaryPrefix-kilobyte] 29 | other = "kb" 30 | 31 | [Byte-symbol] 32 | other = "B" 33 | 34 | [Kilobyte-symbol] 35 | other = "KB" 36 | 37 | [Megabyte-symbol] 38 | other = "MB" 39 | 40 | [note] 41 | other = "Ghi chú" 42 | 43 | [info] 44 | other = "Thông tin" 45 | 46 | [tip] 47 | other = "Mẹo vặt" 48 | 49 | [warning] 50 | other = "Cảnh báo" 51 | -------------------------------------------------------------------------------- /i18n/zh-cn.toml: -------------------------------------------------------------------------------- 1 | [Search-placeholder] 2 | other = "搜索..." 3 | 4 | [Clear-History] 5 | other = "清理历史记录" 6 | 7 | [Attachments-label] 8 | other = "附件" 9 | 10 | [title-404] 11 | other = "错误" 12 | 13 | [message-404] 14 | other = "哎哟。 看起来这个页面不存在 ¯\\_(ツ)_/¯。" 15 | 16 | [Go-to-homepage] 17 | other = "转到主页" 18 | 19 | [Edit-this-page] 20 | other = "编辑当前页" 21 | 22 | [Shortcuts-Title] 23 | other = "更多" 24 | 25 | [Expand-title] 26 | other = "展开" 27 | 28 | [Byte-symbol] 29 | other = "B" 30 | 31 | [Kilobyte-symbol] 32 | other = "KB" 33 | 34 | [Megabyte-symbol] 35 | other = "MB" 36 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/images/screenshot.png -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/images/tn.png -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ partial "meta.html" . }} {{ partial "favicon.html" . }} {{ .Scratch.Add "title" "" }}{{ if eq .Site.Data.titles .Title }}{{ .Scratch.Set "title" (index .Site.Data.titles .Title).title }}{{ else }}{{ .Scratch.Set "title" .Title}}{{end}} 6 | {{ .Scratch.Get "title" }} 7 | 8 | {{ $assetBusting := not .Site.Params.disableAssetsBusting }} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{with .Site.Params.themeVariant}} 17 | 18 | {{end}} 19 | 34 | {{ partial "custom-header.html" . }} 35 | 36 | 37 | 38 | 39 |
    40 |
    41 |
    42 |
    43 |

    {{T "title-404"}}

    44 |

    45 |

    46 |

    {{T "message-404"}}

    47 |

    48 |

    {{T "Go-to-homepage"}}

    49 |

    Page not found!

    50 |
    51 |
    52 | 53 |
    54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 | {{ if eq .Kind "section" }} 4 | {{ .Content }} 5 | {{end}} 6 | 7 | {{ if or (eq .Kind "taxonomy") (eq .Kind "term") }} 8 |
      9 | {{ range .Pages }} 10 |
    • {{.Title}}
    • 11 | {{ end }} 12 |
    13 | {{end}} 14 | 15 |
    16 | {{with .Params.LastModifierDisplayName}} 17 | {{ . }} {{with $.Date}} {{ .Format "02/01/2006" }}{{end}} 18 | 19 | {{end}} 20 |
    21 | 22 | {{ partial "footer.html" . }} -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 | {{ .Content }} 4 | 5 |
    6 | {{with .Params.LastModifierDisplayName}} 7 | {{ . }} {{with $.Date}} {{ .Format "02/01/2006" }}{{end}} 8 | 9 | {{end}} 10 |
    11 | 12 | {{ partial "footer.html" . }} 13 | -------------------------------------------------------------------------------- /layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 | navigation 4 | 5 | 6 | {{if .Site.Home.Content }} 7 | {{.Site.Home.Content}} 8 | {{else}} 9 | {{if eq .Site.Language.Lang "fr"}} 10 |

    Personaliser la page d'accueil

    11 |

    12 | Le site fonctionne. Ne pas oublier de personaliser cette page avec votre propre contenu. 3 manières de faire : 13 |

    14 |
      15 |
    • 1. Créer un fichier _index.md dans le dossier content et le remplir de Markdown
    • 16 |
    • 2. Créer un fichier index.html dans le dossier static et le remplir de code HTML
    • 17 |
    • 3. Configurer le serveur http pour rediriger automatiquement la homepage vers la page de votre choix dans le site
    • 18 |
    19 | {{else}} 20 |

    Customize your own home page

    21 |

    22 | The site is working. Don't forget to customize this homepage with your own. You typically have 3 choices : 23 |

    24 |
      25 |
    • 1. Create an _index.md document in content folder and fill it with Markdown content
    • 26 |
    • 2. Create an index.html file in the static folder and fill the file with HTML content
    • 27 |
    • 3. Configure your server to automatically redirect home page to one your documentation page
    • 28 |
    29 | {{end}} 30 | {{ end }} 31 | {{ partial "footer.html" . }} 32 | -------------------------------------------------------------------------------- /layouts/index.json: -------------------------------------------------------------------------------- 1 | [{{ range $index, $page := .Site.Pages }} 2 | {{- if ne $page.Type "json" -}} 3 | {{- if and $index (gt $index 0) -}},{{- end }} 4 | { 5 | "uri": "{{ $page.Permalink }}", 6 | "title": "{{ htmlEscape $page.Title}}", 7 | "tags": [{{ range $tindex, $tag := $page.Params.tags }}{{ if $tindex }}, {{ end }}"{{ $tag| htmlEscape }}"{{ end }}], 8 | "description": "{{ htmlEscape .Description}}", 9 | "content": {{$page.Plain | jsonify}} 10 | } 11 | {{- end -}} 12 | {{- end -}}] -------------------------------------------------------------------------------- /layouts/partials/custom-comments.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /layouts/partials/custom-footer.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /layouts/partials/custom-header.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /layouts/partials/favicon.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | {{ if .Params.chapter }} 2 | 3 | {{ end }} 4 | 5 | {{ partial "custom-comments.html" . }} 6 | 7 | 8 | 53 | 54 | 55 | 56 |
    57 |
    58 |
    59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | {{ if (or (and (ne .Params.disableMermaid nil) (not .Params.disableMermaid)) (not .Site.Params.disableMermaid)) }} 70 | {{ if isset .Params "custommermaidurl" }} 71 | 72 | {{ else if isset .Site.Params "custommermaidurl" }} 73 | 74 | {{ else }} 75 | 76 | {{ end }} 77 | 80 | {{ end }} 81 | {{ partial "custom-footer.html" . }} 82 | 83 | 84 | -------------------------------------------------------------------------------- /layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ hugo.Generator }} 7 | {{ partial "meta.html" . }} 8 | {{ partial "favicon.html" . }} 9 | {{ .Title }} {{ default "::" .Site.Params.titleSeparator }} {{ .Site.Title }} 10 | 11 | {{ $assetBusting := not .Site.Params.disableAssetsBusting }} 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | {{with .Site.Params.themeVariant}} 23 | 24 | {{end}} 25 | {{ range .Site.Params.custom_css -}} 26 | 27 | {{- end }} 28 | 29 | 30 | 31 | 41 | {{ partial "custom-header.html" . }} 42 | 43 | 44 | {{ partial "menu.html" . }} 45 |
    46 |
    47 |
    48 | {{if not .IsHome}} 49 |
    50 |
    51 | {{ if and (or .IsPage .IsSection) .Site.Params.editURL }} 52 | {{ $File := .File }} 53 | {{ $Site := .Site }} 54 | {{with $File.Path }} 55 | 61 | {{ end }} 62 | {{ end }} 63 | {{$toc := (and (not .Params.disableToc) (not .Params.chapter))}} 64 | 82 | {{ if $toc }} 83 | {{ partial "toc.html" . }} 84 | {{ end }} 85 |
    86 |
    87 | {{ end }} 88 |
    89 | {{ partial "tags.html" . }} 90 |
    91 | {{ if .Params.chapter }} 92 |
    93 | {{ end }} 94 |
    95 | {{if and (not .IsHome) (not .Params.chapter) }} 96 |

    97 | {{ if or (eq .Kind "taxonomy") (eq .Kind "term") }} 98 | {{.Data.Singular}} :: 99 | {{ end }} 100 | {{.Title}} 101 |

    102 | {{end}} 103 | 104 | {{define "breadcrumb"}} 105 | {{$parent := .page.Parent }} 106 | {{ if $parent }} 107 | {{ $value := (printf "%s > %s" $parent.RelPermalink $parent.Title .value) }} 108 | {{ template "breadcrumb" dict "page" $parent "value" $value }} 109 | {{else}} 110 | {{.value|safeHTML}} 111 | {{end}} 112 | {{end}} 113 | -------------------------------------------------------------------------------- /layouts/partials/menu-footer.html: -------------------------------------------------------------------------------- 1 |

    Built with from Grav and Hugo

    2 | -------------------------------------------------------------------------------- /layouts/partials/meta.html: -------------------------------------------------------------------------------- 1 | 2 | {{ with .Site.Params.author }}{{ end }} 3 | -------------------------------------------------------------------------------- /layouts/partials/search.html: -------------------------------------------------------------------------------- 1 | 6 | {{ $assetBusting := not .Site.Params.disableAssetsBusting }} 7 | 8 | 9 | 16 | 17 | -------------------------------------------------------------------------------- /layouts/partials/tags.html: -------------------------------------------------------------------------------- 1 | {{ if .Params.tags }} 2 |
    3 | {{range .Params.tags}} 4 | {{ . }} 5 | {{end}} 6 |
    7 | {{end}} -------------------------------------------------------------------------------- /layouts/partials/toc.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | {{ .TableOfContents }} 4 |
    5 |
    6 | -------------------------------------------------------------------------------- /layouts/shortcodes/attachments.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` -}} 2 |
    3 | 7 |
    8 | {{- $filesName := "files" }} 9 | {{- if ne .Page.File.BaseFileName "index" }} 10 | {{- $filesName = printf "%s.files" .Page.File.BaseFileName }} 11 | {{- end}} 12 | {{- $fileDir := replace .Page.File.Dir "\\" "/" }} 13 | {{- $pattern := .Get "pattern" | default "" }} 14 | {{- range (readDir (printf "content/%s%s" .Page.File.Dir $filesName) ) }} 15 | {{- if findRE $pattern .Name}} 16 | {{- $size := .Size }} 17 | {{- $unit := "Byte" }} 18 | {{- if ge $size 1024 }} 19 | {{- $size = div $size 1024 }} 20 | {{- $unit = "Kilobyte" }} 21 | {{- end}} 22 | {{- if ge $size 1024 }} 23 | {{- $size = div $size 1024 }} 24 | {{- $unit = "Megabyte" }} 25 | {{- end}} 26 |
  • 27 | {{.Name}} 28 | ({{$size}} {{T (print $unit "-symbol")}}) 29 |
  • 30 | {{- end}} 31 | {{- end}} 32 |
    33 | {{- .Inner}} 34 |
    35 | -------------------------------------------------------------------------------- /layouts/shortcodes/button.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | 3 | {{ $icon := .Get "icon" }} 4 | {{ $iconposition := .Get "icon-position" }} 5 | {{ if ($icon) }} 6 | {{ if or (not ($iconposition)) (eq $iconposition "left") }} 7 | 8 | {{ end }} 9 | {{ end }} 10 | {{ .Inner }} 11 | {{ if and ($icon) (eq $iconposition "right")}} 12 | 13 | {{ end }} 14 | 15 | -------------------------------------------------------------------------------- /layouts/shortcodes/children.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 | {{ $showhidden := .Get "showhidden"}} 3 | {{ $style := .Get "style" | default "li" }} 4 | {{ $depth := .Get "depth" | default 1 }} 5 | {{ $withDescription := .Get "description" | default false }} 6 | {{ $sortTerm := .Get "sort" | default "Weight" }} 7 | 8 |
      9 | {{ .Scratch.Set "pages" .Page.Pages }} 10 | 11 | {{if .Page.IsHome}} 12 | 13 | {{ $rootPage := where .Page.Pages "Dir" "" }} 14 | {{ .Scratch.Set "pages" (.Page.Sections | union $rootPage)}} 15 | {{else}} 16 | {{ if .Page.Sections}} 17 | {{ .Scratch.Set "pages" (.Page.Pages | union .Page.Sections) }} 18 | {{end}} 19 | {{end}} 20 | 21 | {{ $pages := (.Scratch.Get "pages") }} 22 | 23 | {{if eq $sortTerm "Weight"}} 24 | {{template "childs" dict "menu" $pages.ByWeight "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} 25 | {{else if eq $sortTerm "Name"}} 26 | {{template "childs" dict "menu" $pages.ByTitle "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} 27 | {{else if eq $sortTerm "PublishDate"}} 28 | {{template "childs" dict "menu" $pages.ByPublishDate "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} 29 | {{else if eq $sortTerm "Date"}} 30 | {{template "childs" dict "menu" $pages.ByDate "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} 31 | {{else if eq $sortTerm "Length"}} 32 | {{template "childs" dict "menu" $pages.ByLength "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} 33 | {{else}} 34 | {{template "childs" dict "menu" $pages "style" $style "showhidden" $showhidden "count" 1 "depth" $depth "pages" .Site.Pages "description" $withDescription "sortTerm" $sortTerm}} 35 | {{end}} 36 |
    37 | 38 | {{ define "childs" }} 39 | {{ range .menu }} 40 | {{ if and .Params.hidden (not $.showhidden) }} 41 | {{else}} 42 | {{if not .IsHome}} 43 | {{if hasPrefix $.style "h"}} 44 | {{$num := sub ( int (trim $.style "h") ) 1 }} 45 | {{$numn := add $num $.count }} 46 | 47 | {{(printf "" $numn)|safeHTML}} 48 | {{ .Title }} 49 | {{(printf "" $numn)|safeHTML}} 50 | 51 | {{else}} 52 | {{(printf "<%s>" $.style)|safeHTML}} 53 | {{ .Title }} 54 | {{(printf "" $.style)|safeHTML}} 55 | {{end}} 56 | 57 | {{if $.description}} 58 | {{if .Description}} 59 |

    {{.Description}}

    60 | {{else}} 61 |

    {{.Summary}}

    62 | {{end}} 63 | {{end}} 64 | {{end}} 65 | {{ if lt $.count $.depth}} 66 | 67 | {{if eq $.style "li"}} 68 |
      69 | {{end}} 70 | 71 | {{ if .Sections}} 72 | {{ .Scratch.Set "pages" (.Pages | union .Sections) }} 73 | {{else}} 74 | {{ .Scratch.Set "pages" .Pages }} 75 | {{end}} 76 | 77 | {{ $pages := (.Scratch.Get "pages") }} 78 | 79 | {{if eq $.sortTerm "Weight"}} 80 | {{template "childs" dict "menu" $pages.ByWeight "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} 81 | {{else if eq $.sortTerm "Name"}} 82 | {{template "childs" dict "menu" $pages.ByTitle "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} 83 | {{else if eq $.sortTerm "PublishDate"}} 84 | {{template "childs" dict "menu" $pages.ByPublishDate "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} 85 | {{else if eq $.sortTerm "Date"}} 86 | {{template "childs" dict "menu" $pages.ByDate "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} 87 | {{else if eq $.sortTerm "Length"}} 88 | {{template "childs" dict "menu" $pages.ByLength "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} 89 | {{else}} 90 | {{template "childs" dict "menu" $pages "style" $.style "showhidden" $.showhidden "count" (add $.count 1) "depth" $.depth "pages" $.pages "description" $.description "sortTerm" $.sortTerm}} 91 | {{end}} 92 | 93 | {{if eq $.style "li"}} 94 |
    95 | {{end}} 96 | {{end}} 97 | {{end}} 98 | {{end}} 99 | {{end}} -------------------------------------------------------------------------------- /layouts/shortcodes/expand.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 |
    3 |
    4 | 5 | 6 | {{$expandMessage := T "Expand-title"}} 7 | {{ if .IsNamedParams }} 8 | {{.Get "default" | default $expandMessage}} 9 | {{else}} 10 | {{.Get 0 | default $expandMessage}} 11 | {{end}} 12 | 13 |
    14 | 17 |
    -------------------------------------------------------------------------------- /layouts/shortcodes/mermaid.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 |
    {{ safeHTML .Inner }}
    3 | -------------------------------------------------------------------------------- /layouts/shortcodes/notice.html: -------------------------------------------------------------------------------- 1 | {{ $_hugo_config := `{ "version": 1 }` }} 2 |
    {{ .Inner }}
    3 | -------------------------------------------------------------------------------- /layouts/shortcodes/ref.html: -------------------------------------------------------------------------------- 1 | {{- if in (.Get 0) "/_index.md" -}} 2 | {{- $paths := (split (.Get 0) "_index.md") -}} 3 | {{- $pagepath := index $paths 0 -}} 4 | {{- $anchor := index $paths 1 -}} 5 | {{- with .Site.GetPage "section" (trim $pagepath "/") -}} 6 | {{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}} 7 | {{- end -}} 8 | {{- else -}} 9 | {{- with .Site.GetPage "section" (.Get 0) }} 10 | {{- .RelPermalink -}} 11 | {{- else -}} 12 | {{- .Get 0 | relref .Page -}} 13 | {{- end -}} 14 | {{- end -}} -------------------------------------------------------------------------------- /layouts/shortcodes/relref.html: -------------------------------------------------------------------------------- 1 | {{- if in (.Get 0) "/_index.md" -}} 2 | {{- $paths := (split (.Get 0) "_index.md") -}} 3 | {{- $pagepath := index $paths 0 -}} 4 | {{- $anchor := index $paths 1 -}} 5 | {{- with .Site.GetPage "section" (trim $pagepath "/") -}} 6 | {{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}} 7 | {{- end -}} 8 | {{- else -}} 9 | {{- with .Site.GetPage "section" (.Get 0) }} 10 | {{- .RelPermalink -}} 11 | {{- else -}} 12 | {{- .Get 0 | relref .Page -}} 13 | {{- end -}} 14 | {{- end -}} -------------------------------------------------------------------------------- /layouts/shortcodes/siteparam.html: -------------------------------------------------------------------------------- 1 | {{- $paramName := (.Get 0) -}} 2 | {{- $siteParams := .Site.Params -}} 3 | {{- with $paramName -}} 4 | {{- with $siteParams -}} 5 | {{- index . (lower $paramName) -}} 6 | {{- end -}} 7 | {{- end -}} -------------------------------------------------------------------------------- /layouts/shortcodes/tab.html: -------------------------------------------------------------------------------- 1 | {{ if .Parent }} 2 | {{ $name := trim (.Get "name") " " }} 3 | {{ if not (.Parent.Scratch.Get "tabs") }} 4 | {{ .Parent.Scratch.Set "tabs" slice }} 5 | {{ end }} 6 | {{ with .Inner }} 7 | {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }} 8 | {{ end }} 9 | {{ else }} 10 | {{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}} 11 | {{ end}} 12 | 13 | -------------------------------------------------------------------------------- /layouts/shortcodes/tabs.html: -------------------------------------------------------------------------------- 1 | {{ with .Inner }}{{/* don't do anything, just call it */}}{{ end }} 2 | {{ $groupId := default "default" (.Get "groupId") }} 3 |
    4 |
    5 | {{ range $idx, $tab := .Scratch.Get "tabs" }} 6 | 12 | {{ end }} 13 |
    14 |
    15 | {{ range $idx, $tab := .Scratch.Get "tabs" }} 16 |
    17 | {{ .content }} 18 |
    19 | {{ end }} 20 |
    21 |
    22 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | publish = "exampleSite/public" 3 | command = "hugo -s exampleSite" 4 | 5 | [build.environment] 6 | HUGO_THEME = "repo" 7 | HUGO_THEMESDIR = "/opt/build" 8 | HUGO_VERSION = "0.72.0" 9 | 10 | [context.production.environment] 11 | HUGO_BASEURL = "https://learn.netlify.app/" 12 | 13 | [context.deploy-preview] 14 | command = "hugo -s exampleSite -b $DEPLOY_PRIME_URL" 15 | 16 | [context.deploy-preview.environment] 17 | HUGO_ENABLEGITINFO = "true" 18 | 19 | [context.branch-deplpy] 20 | command = "hugo -s exampleSite -b $DEPLOY_PRIME_URL" 21 | 22 | [context.branch-deploy.environment] 23 | HUGO_ENABLEGITINFO = "true" 24 | -------------------------------------------------------------------------------- /static/css/atom-one-dark-reasonable.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Atom One Dark With support for ReasonML by Gidi Morris, based off work by Daniel Gamage 4 | 5 | Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax 6 | 7 | */ 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | line-height: 1.3em; 13 | color: #abb2bf; 14 | background: #282c34; 15 | border-radius: 5px; 16 | } 17 | .hljs-keyword, .hljs-operator { 18 | color: #F92672; 19 | } 20 | .hljs-pattern-match { 21 | color: #F92672; 22 | } 23 | .hljs-pattern-match .hljs-constructor { 24 | color: #61aeee; 25 | } 26 | .hljs-function { 27 | color: #61aeee; 28 | } 29 | .hljs-function .hljs-params { 30 | color: #A6E22E; 31 | } 32 | .hljs-function .hljs-params .hljs-typing { 33 | color: #FD971F; 34 | } 35 | .hljs-module-access .hljs-module { 36 | color: #7e57c2; 37 | } 38 | .hljs-constructor { 39 | color: #e2b93d; 40 | } 41 | .hljs-constructor .hljs-string { 42 | color: #9CCC65; 43 | } 44 | .hljs-comment, .hljs-quote { 45 | color: #b18eb1; 46 | font-style: italic; 47 | } 48 | .hljs-doctag, .hljs-formula { 49 | color: #c678dd; 50 | } 51 | .hljs-section, .hljs-name, .hljs-selector-tag, .hljs-deletion, .hljs-subst { 52 | color: #e06c75; 53 | } 54 | .hljs-literal { 55 | color: #56b6c2; 56 | } 57 | .hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-meta-string { 58 | color: #98c379; 59 | } 60 | .hljs-built_in, .hljs-class .hljs-title { 61 | color: #e6c07b; 62 | } 63 | .hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-type, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo, .hljs-number { 64 | color: #d19a66; 65 | } 66 | .hljs-symbol, .hljs-bullet, .hljs-link, .hljs-meta, .hljs-selector-id, .hljs-title { 67 | color: #61aeee; 68 | } 69 | .hljs-emphasis { 70 | font-style: italic; 71 | } 72 | .hljs-strong { 73 | font-weight: bold; 74 | } 75 | .hljs-link { 76 | text-decoration: underline; 77 | } 78 | -------------------------------------------------------------------------------- /static/css/auto-complete.css: -------------------------------------------------------------------------------- 1 | .autocomplete-suggestions { 2 | text-align: left; 3 | cursor: default; 4 | border: 1px solid #ccc; 5 | border-top: 0; 6 | background: #fff; 7 | box-shadow: -1px 1px 3px rgba(0,0,0,.1); 8 | 9 | /* core styles should not be changed */ 10 | position: absolute; 11 | display: none; 12 | z-index: 9999; 13 | max-height: 254px; 14 | overflow: hidden; 15 | overflow-y: auto; 16 | box-sizing: border-box; 17 | 18 | } 19 | .autocomplete-suggestion { 20 | position: relative; 21 | cursor: pointer; 22 | padding: 7px; 23 | line-height: 23px; 24 | white-space: nowrap; 25 | overflow: hidden; 26 | text-overflow: ellipsis; 27 | color: #333; 28 | } 29 | 30 | .autocomplete-suggestion b { 31 | font-weight: normal; 32 | color: #1f8dd6; 33 | } 34 | 35 | .autocomplete-suggestion.selected { 36 | background: #333; 37 | color: #fff; 38 | } 39 | 40 | .autocomplete-suggestion:hover { 41 | background: #444; 42 | color: #fff; 43 | } 44 | 45 | .autocomplete-suggestion > .context { 46 | font-size: 12px; 47 | } 48 | -------------------------------------------------------------------------------- /static/css/featherlight.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Featherlight - ultra slim jQuery lightbox 3 | * Version 1.7.13 - http://noelboss.github.io/featherlight/ 4 | * 5 | * Copyright 2018, Noël Raoul Bossart (http://www.noelboss.com) 6 | * MIT Licensed. 7 | **/ 8 | html.with-featherlight{overflow:hidden}.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:rgba(0,0,0,0)}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:'';display:inline-block;height:100%;vertical-align:middle}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:25px 25px 0;border-bottom:25px solid transparent;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight link.featherlight-inner,.featherlight script.featherlight-inner,.featherlight style.featherlight-inner{display:none}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font-family:Arial,sans-serif;background:#fff;background:rgba(255,255,255,.3);color:#000;border:0;padding:0}.featherlight .featherlight-close-icon::-moz-focus-inner{border:0;padding:0}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0;-webkit-overflow-scrolling:touch}.featherlight iframe{border:0}.featherlight *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:0;margin-right:0;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}}@media print{html.with-featherlight>*>:not(.featherlight){display:none}} -------------------------------------------------------------------------------- /static/css/hugo-theme.css: -------------------------------------------------------------------------------- 1 | /* Insert here special css for hugo theme, on top of any other imported css */ 2 | 3 | 4 | /* Table of contents */ 5 | 6 | .progress ul { 7 | list-style: none; 8 | margin: 0; 9 | padding: 0 15px; 10 | } 11 | 12 | #TableOfContents { 13 | font-size: 13px !important; 14 | max-height: 85vh; 15 | overflow: auto; 16 | padding: 15px 5px !important; 17 | } 18 | 19 | #TableOfContents > ul > li > a { 20 | font-weight: bold; 21 | } 22 | 23 | body { 24 | font-size: 16px !important; 25 | color: #323232 !important; 26 | } 27 | 28 | #body a.highlight, #body a.highlight:hover, #body a.highlight:focus { 29 | text-decoration: none; 30 | outline: none; 31 | outline: 0; 32 | } 33 | #body a.highlight { 34 | line-height: 1.1; 35 | display: inline-block; 36 | } 37 | #body a.highlight:after { 38 | display: block; 39 | content: ""; 40 | height: 1px; 41 | width: 0%; 42 | background-color: #0082a7; /*#CE3B2F*/ 43 | -webkit-transition: width 0.5s ease; 44 | -moz-transition: width 0.5s ease; 45 | -ms-transition: width 0.5s ease; 46 | transition: width 0.5s ease; 47 | } 48 | #body a.highlight:hover:after, #body a.highlight:focus:after { 49 | width: 100%; 50 | } 51 | .progress { 52 | position:absolute; 53 | background-color: rgba(246, 246, 246, 0.97); 54 | width: auto; 55 | border: thin solid #ECECEC; 56 | display:none; 57 | z-index:200; 58 | } 59 | 60 | #toc-menu { 61 | border-right: thin solid #DAD8D8 !important; 62 | padding-right: 1rem !important; 63 | margin-right: 0.5rem !important; 64 | } 65 | 66 | #sidebar-toggle-span { 67 | border-right: thin solid #DAD8D8 !important; 68 | padding-right: 0.5rem !important; 69 | margin-right: 1rem !important; 70 | } 71 | 72 | .btn { 73 | display: inline-block !important; 74 | padding: 6px 12px !important; 75 | margin-bottom: 0 !important; 76 | font-size: 14px !important; 77 | font-weight: normal !important; 78 | line-height: 1.42857143 !important; 79 | text-align: center !important; 80 | white-space: nowrap !important; 81 | vertical-align: middle !important; 82 | -ms-touch-action: manipulation !important; 83 | touch-action: manipulation !important; 84 | cursor: pointer !important; 85 | -webkit-user-select: none !important; 86 | -moz-user-select: none !important; 87 | -ms-user-select: none !important; 88 | user-select: none !important; 89 | background-image: none !important; 90 | border: 1px solid transparent !important; 91 | border-radius: 4px !important; 92 | -webkit-transition: all 0.15s !important; 93 | -moz-transition: all 0.15s !important; 94 | transition: all 0.15s !important; 95 | } 96 | .btn:focus { 97 | /*outline: thin dotted; 98 | outline: 5px auto -webkit-focus-ring-color; 99 | outline-offset: -2px;*/ 100 | outline: none !important; 101 | } 102 | .btn:hover, 103 | .btn:focus { 104 | color: #2b2b2b !important; 105 | text-decoration: none !important; 106 | } 107 | 108 | .btn-default { 109 | color: #333 !important; 110 | background-color: #fff !important; 111 | border-color: #ccc !important; 112 | } 113 | .btn-default:hover, 114 | .btn-default:focus, 115 | .btn-default:active { 116 | color: #fff !important; 117 | background-color: #9e9e9e !important; 118 | border-color: #9e9e9e !important; 119 | } 120 | .btn-default:active { 121 | background-image: none !important; 122 | } 123 | 124 | /* anchors */ 125 | .anchor { 126 | color: #00bdf3; 127 | font-size: 0.5em; 128 | cursor:pointer; 129 | visibility:hidden; 130 | margin-left: 0.5em; 131 | position: absolute; 132 | margin-top:0.1em; 133 | } 134 | 135 | h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, h5:hover .anchor, h6:hover .anchor { 136 | visibility:visible; 137 | } 138 | 139 | /* Redfines headers style */ 140 | 141 | h2, h3, h4, h5, h6 { 142 | font-weight: 400; 143 | line-height: 1.1; 144 | } 145 | 146 | h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { 147 | font-weight: inherit; 148 | } 149 | 150 | h2 { 151 | font-size: 2.5rem; 152 | line-height: 110% !important; 153 | margin: 2.5rem 0 1.5rem 0; 154 | } 155 | 156 | h3 { 157 | font-size: 2rem; 158 | line-height: 110% !important; 159 | margin: 2rem 0 1rem 0; 160 | } 161 | 162 | h4 { 163 | font-size: 1.5rem; 164 | line-height: 110% !important; 165 | margin: 1.5rem 0 0.75rem 0; 166 | } 167 | 168 | h5 { 169 | font-size: 1rem; 170 | line-height: 110% !important; 171 | margin: 1rem 0 0.2rem 0; 172 | } 173 | 174 | h6 { 175 | font-size: 0.5rem; 176 | line-height: 110% !important; 177 | margin: 0.5rem 0 0.2rem 0; 178 | } 179 | 180 | p { 181 | margin: 1rem 0; 182 | } 183 | 184 | figcaption h4 { 185 | font-weight: 300 !important; 186 | opacity: .85; 187 | font-size: 1em; 188 | text-align: center; 189 | margin-top: -1.5em; 190 | } 191 | 192 | .select-style { 193 | border: 0; 194 | width: 150px; 195 | border-radius: 0px; 196 | overflow: hidden; 197 | display: inline-flex; 198 | } 199 | 200 | .select-style svg { 201 | fill: #ccc; 202 | width: 14px; 203 | height: 14px; 204 | pointer-events: none; 205 | margin: auto; 206 | } 207 | 208 | .select-style svg:hover { 209 | fill: #e6e6e6; 210 | } 211 | 212 | .select-style select { 213 | padding: 0; 214 | width: 130%; 215 | border: none; 216 | box-shadow: none; 217 | background: transparent; 218 | background-image: none; 219 | -webkit-appearance: none; 220 | margin: auto; 221 | margin-left: 0px; 222 | margin-right: -20px; 223 | } 224 | 225 | .select-style select:focus { 226 | outline: none; 227 | } 228 | 229 | .select-style :hover { 230 | cursor: pointer; 231 | } 232 | 233 | @media only all and (max-width: 47.938em) { 234 | #breadcrumbs .links, #top-github-link-text { 235 | display: none; 236 | } 237 | } 238 | 239 | .is-sticky #top-bar { 240 | box-shadow: -1px 2px 5px 1px rgba(0, 0, 0, 0.1); 241 | } -------------------------------------------------------------------------------- /static/css/hybrid.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid) 4 | 5 | */ 6 | 7 | /*background color*/ 8 | .hljs { 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | background: #1d1f21; 13 | } 14 | 15 | /*selection color*/ 16 | .hljs::selection, 17 | .hljs span::selection { 18 | background: #373b41; 19 | } 20 | 21 | .hljs::-moz-selection, 22 | .hljs span::-moz-selection { 23 | background: #373b41; 24 | } 25 | 26 | /*foreground color*/ 27 | .hljs { 28 | color: #c5c8c6; 29 | } 30 | 31 | /*color: fg_yellow*/ 32 | .hljs-title, 33 | .hljs-name { 34 | color: #f0c674; 35 | } 36 | 37 | /*color: fg_comment*/ 38 | .hljs-comment, 39 | .hljs-meta, 40 | .hljs-meta .hljs-keyword { 41 | color: #707880; 42 | } 43 | 44 | /*color: fg_red*/ 45 | .hljs-number, 46 | .hljs-symbol, 47 | .hljs-literal, 48 | .hljs-deletion, 49 | .hljs-link { 50 | color: #cc6666 51 | } 52 | 53 | /*color: fg_green*/ 54 | .hljs-string, 55 | .hljs-doctag, 56 | .hljs-addition, 57 | .hljs-regexp, 58 | .hljs-selector-attr, 59 | .hljs-selector-pseudo { 60 | color: #b5bd68; 61 | } 62 | 63 | /*color: fg_purple*/ 64 | .hljs-attribute, 65 | .hljs-code, 66 | .hljs-selector-id { 67 | color: #b294bb; 68 | } 69 | 70 | /*color: fg_blue*/ 71 | .hljs-keyword, 72 | .hljs-selector-tag, 73 | .hljs-bullet, 74 | .hljs-tag { 75 | color: #81a2be; 76 | } 77 | 78 | /*color: fg_aqua*/ 79 | .hljs-subst, 80 | .hljs-variable, 81 | .hljs-template-tag, 82 | .hljs-template-variable { 83 | color: #8abeb7; 84 | } 85 | 86 | /*color: fg_orange*/ 87 | .hljs-type, 88 | .hljs-built_in, 89 | .hljs-builtin-name, 90 | .hljs-quote, 91 | .hljs-section, 92 | .hljs-selector-class { 93 | color: #de935f; 94 | } 95 | 96 | .hljs-emphasis { 97 | font-style: italic; 98 | } 99 | 100 | .hljs-strong { 101 | font-weight: bold; 102 | } 103 | -------------------------------------------------------------------------------- /static/css/perfect-scrollbar.min.css: -------------------------------------------------------------------------------- 1 | /* perfect-scrollbar v0.6.13 */ 2 | .ps-container{-ms-touch-action:auto;touch-action:auto;overflow:hidden !important;-ms-overflow-style:none}@supports (-ms-overflow-style: none){.ps-container{overflow:auto !important}}@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none){.ps-container{overflow:auto !important}}.ps-container.ps-active-x>.ps-scrollbar-x-rail,.ps-container.ps-active-y>.ps-scrollbar-y-rail{display:block;background-color:transparent}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container>.ps-scrollbar-x-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;bottom:0px;height:15px}.ps-container>.ps-scrollbar-x-rail>.ps-scrollbar-x{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;bottom:2px;height:6px}.ps-container>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x,.ps-container>.ps-scrollbar-x-rail:active>.ps-scrollbar-x{height:11px}.ps-container>.ps-scrollbar-y-rail{display:none;position:absolute;opacity:0;-webkit-transition:background-color .2s linear, opacity .2s linear;-o-transition:background-color .2s linear, opacity .2s linear;-moz-transition:background-color .2s linear, opacity .2s linear;transition:background-color .2s linear, opacity .2s linear;right:0;width:15px}.ps-container>.ps-scrollbar-y-rail>.ps-scrollbar-y{position:absolute;background-color:#aaa;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, -webkit-border-radius .2s ease-in-out;-o-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;-moz-transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out;transition:background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out, -webkit-border-radius .2s ease-in-out, -moz-border-radius .2s ease-in-out;right:2px;width:6px}.ps-container>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y,.ps-container>.ps-scrollbar-y-rail:active>.ps-scrollbar-y{width:11px}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-x>.ps-scrollbar-x-rail>.ps-scrollbar-x{background-color:#999;height:11px}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail{background-color:#eee;opacity:.9}.ps-container:hover.ps-in-scrolling.ps-y>.ps-scrollbar-y-rail>.ps-scrollbar-y{background-color:#999;width:11px}.ps-container:hover>.ps-scrollbar-x-rail,.ps-container:hover>.ps-scrollbar-y-rail{opacity:.6}.ps-container:hover>.ps-scrollbar-x-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-x-rail:hover>.ps-scrollbar-x{background-color:#999}.ps-container:hover>.ps-scrollbar-y-rail:hover{background-color:#eee;opacity:.9}.ps-container:hover>.ps-scrollbar-y-rail:hover>.ps-scrollbar-y{background-color:#999} 3 | -------------------------------------------------------------------------------- /static/css/tabs.css: -------------------------------------------------------------------------------- 1 | #body .tab-nav-button { 2 | border-width: 1px 1px 1px 1px !important; 3 | border-color: #ccc !important; 4 | border-radius: 4px 4px 0 0 !important; 5 | background-color: #ddd !important; 6 | float: left; 7 | display: block; 8 | position: relative; 9 | margin-left: 4px; 10 | bottom: -1px; 11 | } 12 | #body .tab-nav-button:first-child { 13 | margin-left: 0px; 14 | } 15 | #body .tab-nav-button.active { 16 | background-color: #fff !important; 17 | border-bottom-color: #fff !important; 18 | } 19 | 20 | #body .tab-panel { 21 | margin-top: 32px; 22 | margin-bottom: 32px; 23 | } 24 | #body .tab-content { 25 | display: block; 26 | clear: both; 27 | padding: 8px; 28 | border-width: 1px; 29 | border-style: solid; 30 | border-color: #ccc; 31 | } 32 | #body .tab-content .tab-item{ 33 | display: none; 34 | } 35 | 36 | #body .tab-content .tab-item.active{ 37 | display: block; 38 | } 39 | 40 | #body .tab-item pre{ 41 | margin-bottom: 0; 42 | margin-top: 0; 43 | } 44 | -------------------------------------------------------------------------------- /static/css/tags.css: -------------------------------------------------------------------------------- 1 | /* Tags */ 2 | 3 | #head-tags{ 4 | margin-left:1em; 5 | margin-top:1em; 6 | } 7 | 8 | #body .tags a.tag-link { 9 | display: inline-block; 10 | line-height: 2em; 11 | font-size: 0.8em; 12 | position: relative; 13 | margin: 0 16px 8px 0; 14 | padding: 0 10px 0 12px; 15 | background: #8451a1; 16 | 17 | -webkit-border-bottom-right-radius: 3px; 18 | border-bottom-right-radius: 3px; 19 | -webkit-border-top-right-radius: 3px; 20 | border-top-right-radius: 3px; 21 | 22 | -webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.2); 23 | box-shadow: 0 1px 2px rgba(0,0,0,0.2); 24 | color: #fff; 25 | } 26 | 27 | #body .tags a.tag-link:before { 28 | content: ""; 29 | position: absolute; 30 | top:0; 31 | left: -1em; 32 | width: 0; 33 | height: 0; 34 | border-color: transparent #8451a1 transparent transparent; 35 | border-style: solid; 36 | border-width: 1em 1em 1em 0; 37 | } 38 | 39 | #body .tags a.tag-link:after { 40 | content: ""; 41 | position: absolute; 42 | top: 10px; 43 | left: 1px; 44 | width: 5px; 45 | height: 5px; 46 | -webkit-border-radius: 50%; 47 | border-radius: 100%; 48 | background: #fff; 49 | } 50 | -------------------------------------------------------------------------------- /static/css/theme-blue.css: -------------------------------------------------------------------------------- 1 | 2 | :root{ 3 | 4 | --MAIN-TEXT-color:#323232; /* Color of text by default */ 5 | --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ 6 | --MAIN-LINK-color:#1C90F3; /* Color of links */ 7 | --MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */ 8 | --MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */ 9 | 10 | --MENU-HOME-LINK-color: #323232; /* Color of the home button text */ 11 | --MENU-HOME-LINK-HOVER-color: #5e5e5e; /* Color of the hovered home button text */ 12 | 13 | --MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */ 14 | --MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */ 15 | 16 | --MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */ 17 | --MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */ 18 | --MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */ 19 | 20 | --MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */ 21 | --MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */ 22 | --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ 23 | --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ 24 | --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ 25 | --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ 26 | 27 | --MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */ 28 | --MENU-SECTION-HR-color: #20272b; /* Color of
    separator in menu */ 29 | 30 | } 31 | 32 | body { 33 | color: var(--MAIN-TEXT-color) !important; 34 | } 35 | 36 | textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { 37 | border-color: none; 38 | box-shadow: none; 39 | } 40 | 41 | h2, h3, h4, h5 { 42 | color: var(--MAIN-TITLES-TEXT-color) !important; 43 | } 44 | 45 | a { 46 | color: var(--MAIN-LINK-color); 47 | } 48 | 49 | .anchor { 50 | color: var(--MAIN-ANCHOR-color); 51 | } 52 | 53 | a:hover { 54 | color: var(--MAIN-LINK-HOVER-color); 55 | } 56 | 57 | #sidebar ul li.visited > a .read-icon { 58 | color: var(--MENU-VISITED-color); 59 | } 60 | 61 | #body a.highlight:after { 62 | display: block; 63 | content: ""; 64 | height: 1px; 65 | width: 0%; 66 | -webkit-transition: width 0.5s ease; 67 | -moz-transition: width 0.5s ease; 68 | -ms-transition: width 0.5s ease; 69 | transition: width 0.5s ease; 70 | background-color: var(--MAIN-LINK-HOVER-color); 71 | } 72 | #sidebar { 73 | background-color: var(--MENU-SECTIONS-BG-color); 74 | } 75 | #sidebar #header-wrapper { 76 | background: var(--MENU-HEADER-BG-color); 77 | color: var(--MENU-SEARCH-BOX-color); 78 | border-color: var(--MENU-HEADER-BORDER-color); 79 | } 80 | #sidebar .searchbox { 81 | border-color: var(--MENU-SEARCH-BOX-color); 82 | background: var(--MENU-SEARCH-BG-color); 83 | } 84 | #sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { 85 | background: var(--MENU-SECTIONS-ACTIVE-BG-color); 86 | } 87 | #sidebar .searchbox * { 88 | color: var(--MENU-SEARCH-BOX-ICONS-color); 89 | } 90 | 91 | #sidebar a { 92 | color: var(--MENU-SECTIONS-LINK-color); 93 | } 94 | 95 | #sidebar a:hover { 96 | color: var(--MENU-SECTIONS-LINK-HOVER-color); 97 | } 98 | 99 | #sidebar ul li.active > a { 100 | background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); 101 | color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; 102 | } 103 | 104 | #sidebar hr { 105 | border-color: var(--MENU-SECTION-HR-color); 106 | } 107 | 108 | #body .tags a.tag-link { 109 | background-color: var(--MENU-HEADER-BG-color); 110 | } 111 | 112 | #body .tags a.tag-link:before { 113 | border-right-color: var(--MENU-HEADER-BG-color); 114 | } 115 | 116 | #homelinks { 117 | background: var(--MENU-HEADER-BG-color); 118 | background-color: var(--MENU-HEADER-BORDER-color); 119 | border-bottom-color: var(--MENU-HEADER-BORDER-color); 120 | } 121 | 122 | #homelinks a { 123 | color: var(--MENU-HOME-LINK-color); 124 | } 125 | 126 | #homelinks a:hover { 127 | color: var(--MENU-HOME-LINK-HOVERED-color); 128 | } -------------------------------------------------------------------------------- /static/css/theme-green.css: -------------------------------------------------------------------------------- 1 | 2 | :root{ 3 | 4 | --MAIN-TEXT-color:#323232; /* Color of text by default */ 5 | --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ 6 | --MAIN-LINK-color:#599a3e; /* Color of links */ 7 | --MAIN-LINK-HOVER-color:#3f6d2c; /* Color of hovered links */ 8 | --MAIN-ANCHOR-color: #599a3e; /* color of anchors on titles */ 9 | 10 | --MENU-HOME-LINK-color: #323232; /* Color of the home button text */ 11 | --MENU-HOME-LINK-HOVER-color: #5e5e5e; /* Color of the hovered home button text */ 12 | 13 | --MENU-HEADER-BG-color:#74b559; /* Background color of menu header */ 14 | --MENU-HEADER-BORDER-color:#9cd484; /*Color of menu header border */ 15 | 16 | --MENU-SEARCH-BG-color:#599a3e; /* Search field background color (by default borders + icons) */ 17 | --MENU-SEARCH-BOX-color: #84c767; /* Override search field border color */ 18 | --MENU-SEARCH-BOX-ICONS-color: #c7f7c4; /* Override search field icons color */ 19 | 20 | --MENU-SECTIONS-ACTIVE-BG-color:#1b211c; /* Background color of the active section and its childs */ 21 | --MENU-SECTIONS-BG-color:#222723; /* Background color of other sections */ 22 | --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ 23 | --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ 24 | --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ 25 | --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ 26 | 27 | --MENU-VISITED-color: #599a3e; /* Color of 'page visited' icons in menu */ 28 | --MENU-SECTION-HR-color: #18211c; /* Color of
    separator in menu */ 29 | 30 | } 31 | 32 | body { 33 | color: var(--MAIN-TEXT-color) !important; 34 | } 35 | 36 | textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { 37 | border-color: none; 38 | box-shadow: none; 39 | } 40 | 41 | h2, h3, h4, h5 { 42 | color: var(--MAIN-TITLES-TEXT-color) !important; 43 | } 44 | 45 | a { 46 | color: var(--MAIN-LINK-color); 47 | } 48 | 49 | .anchor { 50 | color: var(--MAIN-ANCHOR-color); 51 | } 52 | 53 | a:hover { 54 | color: var(--MAIN-LINK-HOVER-color); 55 | } 56 | 57 | #sidebar ul li.visited > a .read-icon { 58 | color: var(--MENU-VISITED-color); 59 | } 60 | 61 | #body a.highlight:after { 62 | display: block; 63 | content: ""; 64 | height: 1px; 65 | width: 0%; 66 | -webkit-transition: width 0.5s ease; 67 | -moz-transition: width 0.5s ease; 68 | -ms-transition: width 0.5s ease; 69 | transition: width 0.5s ease; 70 | background-color: var(--MAIN-LINK-HOVER-color); 71 | } 72 | #sidebar { 73 | background-color: var(--MENU-SECTIONS-BG-color); 74 | } 75 | #sidebar #header-wrapper { 76 | background: var(--MENU-HEADER-BG-color); 77 | color: var(--MENU-SEARCH-BOX-color); 78 | border-color: var(--MENU-HEADER-BORDER-color); 79 | } 80 | #sidebar .searchbox { 81 | border-color: var(--MENU-SEARCH-BOX-color); 82 | background: var(--MENU-SEARCH-BG-color); 83 | } 84 | #sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { 85 | background: var(--MENU-SECTIONS-ACTIVE-BG-color); 86 | } 87 | #sidebar .searchbox * { 88 | color: var(--MENU-SEARCH-BOX-ICONS-color); 89 | } 90 | 91 | #sidebar a { 92 | color: var(--MENU-SECTIONS-LINK-color); 93 | } 94 | 95 | #sidebar a:hover { 96 | color: var(--MENU-SECTIONS-LINK-HOVER-color); 97 | } 98 | 99 | #sidebar ul li.active > a { 100 | background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); 101 | color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; 102 | } 103 | 104 | #sidebar hr { 105 | border-color: var(--MENU-SECTION-HR-color); 106 | } 107 | 108 | #body .tags a.tag-link { 109 | background-color: var(--MENU-HEADER-BG-color); 110 | } 111 | 112 | #body .tags a.tag-link:before { 113 | border-right-color: var(--MENU-HEADER-BG-color); 114 | } 115 | 116 | #homelinks { 117 | background: var(--MENU-HEADER-BG-color); 118 | background-color: var(--MENU-HEADER-BORDER-color); 119 | border-bottom-color: var(--MENU-HEADER-BORDER-color); 120 | } 121 | 122 | #homelinks a { 123 | color: var(--MENU-HOME-LINK-color); 124 | } 125 | 126 | #homelinks a:hover { 127 | color: var(--MENU-HOME-LINK-HOVERED-color); 128 | } -------------------------------------------------------------------------------- /static/css/theme-red.css: -------------------------------------------------------------------------------- 1 | 2 | :root{ 3 | 4 | --MAIN-TEXT-color:#323232; /* Color of text by default */ 5 | --MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */ 6 | --MAIN-LINK-color:#f31c1c; /* Color of links */ 7 | --MAIN-LINK-HOVER-color:#d01616; /* Color of hovered links */ 8 | --MAIN-ANCHOR-color: #f31c1c; /* color of anchors on titles */ 9 | 10 | --MENU-HOME-LINK-color: #ccc; /* Color of the home button text */ 11 | --MENU-HOME-LINK-HOVER-color: #e6e6e6; /* Color of the hovered home button text */ 12 | 13 | --MENU-HEADER-BG-color:#dc1010; /* Background color of menu header */ 14 | --MENU-HEADER-BORDER-color:#e23131; /*Color of menu header border */ 15 | 16 | --MENU-SEARCH-BG-color:#b90000; /* Search field background color (by default borders + icons) */ 17 | --MENU-SEARCH-BOX-color: #ef2020; /* Override search field border color */ 18 | --MENU-SEARCH-BOX-ICONS-color: #fda1a1; /* Override search field icons color */ 19 | 20 | --MENU-SECTIONS-ACTIVE-BG-color:#2b2020; /* Background color of the active section and its childs */ 21 | --MENU-SECTIONS-BG-color:#312525; /* Background color of other sections */ 22 | --MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */ 23 | --MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */ 24 | --MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */ 25 | --MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */ 26 | 27 | --MENU-VISITED-color: #ff3333; /* Color of 'page visited' icons in menu */ 28 | --MENU-SECTION-HR-color: #2b2020; /* Color of
    separator in menu */ 29 | 30 | } 31 | 32 | body { 33 | color: var(--MAIN-TEXT-color) !important; 34 | } 35 | 36 | textarea:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="url"]:focus, input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="month"]:focus, input[type="time"]:focus, input[type="week"]:focus, select[multiple=multiple]:focus { 37 | border-color: none; 38 | box-shadow: none; 39 | } 40 | 41 | h2, h3, h4, h5 { 42 | color: var(--MAIN-TITLES-TEXT-color) !important; 43 | } 44 | 45 | a { 46 | color: var(--MAIN-LINK-color); 47 | } 48 | 49 | .anchor { 50 | color: var(--MAIN-ANCHOR-color); 51 | } 52 | 53 | a:hover { 54 | color: var(--MAIN-LINK-HOVER-color); 55 | } 56 | 57 | #sidebar ul li.visited > a .read-icon { 58 | color: var(--MENU-VISITED-color); 59 | } 60 | 61 | #body a.highlight:after { 62 | display: block; 63 | content: ""; 64 | height: 1px; 65 | width: 0%; 66 | -webkit-transition: width 0.5s ease; 67 | -moz-transition: width 0.5s ease; 68 | -ms-transition: width 0.5s ease; 69 | transition: width 0.5s ease; 70 | background-color: var(--MAIN-LINK-HOVER-color); 71 | } 72 | #sidebar { 73 | background-color: var(--MENU-SECTIONS-BG-color); 74 | } 75 | #sidebar #header-wrapper { 76 | background: var(--MENU-HEADER-BG-color); 77 | color: var(--MENU-SEARCH-BOX-color); 78 | border-color: var(--MENU-HEADER-BORDER-color); 79 | } 80 | #sidebar .searchbox { 81 | border-color: var(--MENU-SEARCH-BOX-color); 82 | background: var(--MENU-SEARCH-BG-color); 83 | } 84 | #sidebar ul.topics > li.parent, #sidebar ul.topics > li.active { 85 | background: var(--MENU-SECTIONS-ACTIVE-BG-color); 86 | } 87 | #sidebar .searchbox * { 88 | color: var(--MENU-SEARCH-BOX-ICONS-color); 89 | } 90 | 91 | #sidebar a { 92 | color: var(--MENU-SECTIONS-LINK-color); 93 | } 94 | 95 | #sidebar a:hover { 96 | color: var(--MENU-SECTIONS-LINK-HOVER-color); 97 | } 98 | 99 | #sidebar ul li.active > a { 100 | background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color); 101 | color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important; 102 | } 103 | 104 | #sidebar hr { 105 | border-color: var(--MENU-SECTION-HR-color); 106 | } 107 | 108 | #body .tags a.tag-link { 109 | background-color: var(--MENU-HEADER-BG-color); 110 | } 111 | 112 | #body .tags a.tag-link:before { 113 | border-right-color: var(--MENU-HEADER-BG-color); 114 | } 115 | 116 | #homelinks { 117 | background: var(--MENU-HEADER-BG-color); 118 | background-color: var(--MENU-HEADER-BORDER-color); 119 | border-bottom-color: var(--MENU-HEADER-BORDER-color); 120 | } 121 | 122 | #homelinks a { 123 | color: var(--MENU-HOME-LINK-color); 124 | } 125 | 126 | #homelinks a:hover { 127 | color: var(--MENU-HOME-LINK-HOVERED-color); 128 | } -------------------------------------------------------------------------------- /static/fonts/Inconsolata.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Inconsolata.eot -------------------------------------------------------------------------------- /static/fonts/Inconsolata.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Inconsolata.ttf -------------------------------------------------------------------------------- /static/fonts/Inconsolata.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Inconsolata.woff -------------------------------------------------------------------------------- /static/fonts/Novecentosanswide-Normal-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Novecentosanswide-Normal-webfont.eot -------------------------------------------------------------------------------- /static/fonts/Novecentosanswide-Normal-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Novecentosanswide-Normal-webfont.ttf -------------------------------------------------------------------------------- /static/fonts/Novecentosanswide-Normal-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Novecentosanswide-Normal-webfont.woff -------------------------------------------------------------------------------- /static/fonts/Novecentosanswide-Normal-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Novecentosanswide-Normal-webfont.woff2 -------------------------------------------------------------------------------- /static/fonts/Novecentosanswide-UltraLight-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Novecentosanswide-UltraLight-webfont.eot -------------------------------------------------------------------------------- /static/fonts/Novecentosanswide-UltraLight-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Novecentosanswide-UltraLight-webfont.ttf -------------------------------------------------------------------------------- /static/fonts/Novecentosanswide-UltraLight-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Novecentosanswide-UltraLight-webfont.woff -------------------------------------------------------------------------------- /static/fonts/Novecentosanswide-UltraLight-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Novecentosanswide-UltraLight-webfont.woff2 -------------------------------------------------------------------------------- /static/fonts/Work_Sans_200.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_200.eot -------------------------------------------------------------------------------- /static/fonts/Work_Sans_200.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_200.ttf -------------------------------------------------------------------------------- /static/fonts/Work_Sans_200.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_200.woff -------------------------------------------------------------------------------- /static/fonts/Work_Sans_200.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_200.woff2 -------------------------------------------------------------------------------- /static/fonts/Work_Sans_300.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_300.eot -------------------------------------------------------------------------------- /static/fonts/Work_Sans_300.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_300.ttf -------------------------------------------------------------------------------- /static/fonts/Work_Sans_300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_300.woff -------------------------------------------------------------------------------- /static/fonts/Work_Sans_300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_300.woff2 -------------------------------------------------------------------------------- /static/fonts/Work_Sans_500.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_500.eot -------------------------------------------------------------------------------- /static/fonts/Work_Sans_500.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_500.ttf -------------------------------------------------------------------------------- /static/fonts/Work_Sans_500.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_500.woff -------------------------------------------------------------------------------- /static/fonts/Work_Sans_500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/fonts/Work_Sans_500.woff2 -------------------------------------------------------------------------------- /static/images/clippy.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/images/favicon.png -------------------------------------------------------------------------------- /static/images/gopher-404.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/images/gopher-404.jpg -------------------------------------------------------------------------------- /static/js/auto-complete.js: -------------------------------------------------------------------------------- 1 | // JavaScript autoComplete v1.0.4 2 | // https://github.com/Pixabay/JavaScript-autoComplete 3 | var autoComplete=function(){function e(e){function t(e,t){return e.classList?e.classList.contains(t):new RegExp("\\b"+t+"\\b").test(e.className)}function o(e,t,o){e.attachEvent?e.attachEvent("on"+t,o):e.addEventListener(t,o)}function s(e,t,o){e.detachEvent?e.detachEvent("on"+t,o):e.removeEventListener(t,o)}function n(e,s,n,l){o(l||document,s,function(o){for(var s,l=o.target||o.srcElement;l&&!(s=t(l,e));)l=l.parentElement;s&&n.call(l,o)})}if(document.querySelector){var l={selector:0,source:0,minChars:3,delay:150,offsetLeft:0,offsetTop:1,cache:1,menuClass:"",renderItem:function(e,t){t=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");var o=new RegExp("("+t.split(" ").join("|")+")","gi");return'
    '+e.replace(o,"$1")+"
    "},onSelect:function(){}};for(var c in e)e.hasOwnProperty(c)&&(l[c]=e[c]);for(var a="object"==typeof l.selector?[l.selector]:document.querySelectorAll(l.selector),u=0;u0?i.sc.scrollTop=n+i.sc.suggestionHeight+s-i.sc.maxHeight:0>n&&(i.sc.scrollTop=n+s)}else i.sc.scrollTop=0},o(window,"resize",i.updateSC),document.body.appendChild(i.sc),n("autocomplete-suggestion","mouseleave",function(){var e=i.sc.querySelector(".autocomplete-suggestion.selected");e&&setTimeout(function(){e.className=e.className.replace("selected","")},20)},i.sc),n("autocomplete-suggestion","mouseover",function(){var e=i.sc.querySelector(".autocomplete-suggestion.selected");e&&(e.className=e.className.replace("selected","")),this.className+=" selected"},i.sc),n("autocomplete-suggestion","mousedown",function(e){if(t(this,"autocomplete-suggestion")){var o=this.getAttribute("data-val");i.value=o,l.onSelect(e,o,this),i.sc.style.display="none"}},i.sc),i.blurHandler=function(){try{var e=document.querySelector(".autocomplete-suggestions:hover")}catch(t){var e=0}e?i!==document.activeElement&&setTimeout(function(){i.focus()},20):(i.last_val=i.value,i.sc.style.display="none",setTimeout(function(){i.sc.style.display="none"},350))},o(i,"blur",i.blurHandler);var r=function(e){var t=i.value;if(i.cache[t]=e,e.length&&t.length>=l.minChars){for(var o="",s=0;st||t>40)&&13!=t&&27!=t){var o=i.value;if(o.length>=l.minChars){if(o!=i.last_val){if(i.last_val=o,clearTimeout(i.timer),l.cache){if(o in i.cache)return void r(i.cache[o]);for(var s=1;s"; 28 | } 29 | } 30 | }); 31 | 32 | // Change styles, depending on parameters set to the image 33 | images.each(function(index){ 34 | var image = $(this) 35 | var o = getUrlParameter(image[0].src); 36 | if (typeof o !== "undefined") { 37 | var h = o["height"]; 38 | var w = o["width"]; 39 | var c = o["classes"]; 40 | image.css("width", function() { 41 | if (typeof w !== "undefined") { 42 | return w; 43 | } else { 44 | return "auto"; 45 | } 46 | }); 47 | image.css("height", function() { 48 | if (typeof h !== "undefined") { 49 | return h; 50 | } else { 51 | return "auto"; 52 | } 53 | }); 54 | if (typeof c !== "undefined") { 55 | var classes = c.split(','); 56 | for (i = 0; i < classes.length; i++) { 57 | image.addClass(classes[i]); 58 | } 59 | } 60 | } 61 | }); 62 | 63 | // Stick the top to the top of the screen when scrolling 64 | $(document).ready(function(){ 65 | $("#top-bar").sticky({topSpacing:0, zIndex: 1000}); 66 | }); 67 | 68 | 69 | jQuery(document).ready(function() { 70 | // Add link button for every 71 | var text, clip = new ClipboardJS('.anchor'); 72 | $("h1~h2,h1~h3,h1~h4,h1~h5,h1~h6").append(function(index, html){ 73 | var element = $(this); 74 | var url = encodeURI(document.location.origin + document.location.pathname); 75 | var link = url + "#"+element[0].id; 76 | return " " + 77 | "" + 78 | "" 79 | ; 80 | }); 81 | 82 | $(".anchor").on('mouseleave', function(e) { 83 | $(this).attr('aria-label', null).removeClass('tooltipped tooltipped-s tooltipped-w'); 84 | }); 85 | 86 | clip.on('success', function(e) { 87 | e.clearSelection(); 88 | $(e.trigger).attr('aria-label', 'Link copied to clipboard!').addClass('tooltipped tooltipped-s'); 89 | }); 90 | $('code.language-mermaid').each(function(index, element) { 91 | var content = $(element).html().replace(/&/g, '&'); 92 | $(element).parent().replaceWith('
    ' + content + '
    '); 93 | }); 94 | }); 95 | -------------------------------------------------------------------------------- /static/js/search.js: -------------------------------------------------------------------------------- 1 | var lunrIndex, pagesIndex; 2 | 3 | function endsWith(str, suffix) { 4 | return str.indexOf(suffix, str.length - suffix.length) !== -1; 5 | } 6 | 7 | // Initialize lunrjs using our generated index file 8 | function initLunr() { 9 | if (!endsWith(baseurl,"/")){ 10 | baseurl = baseurl+'/' 11 | }; 12 | 13 | // First retrieve the index file 14 | $.getJSON(baseurl +"index.json") 15 | .done(function(index) { 16 | pagesIndex = index; 17 | // Set up lunrjs by declaring the fields we use 18 | // Also provide their boost level for the ranking 19 | lunrIndex = lunr(function() { 20 | this.ref("uri"); 21 | this.field('title', { 22 | boost: 15 23 | }); 24 | this.field('tags', { 25 | boost: 10 26 | }); 27 | this.field("content", { 28 | boost: 5 29 | }); 30 | 31 | this.pipeline.remove(lunr.stemmer); 32 | this.searchPipeline.remove(lunr.stemmer); 33 | 34 | // Feed lunr with each file and let lunr actually index them 35 | pagesIndex.forEach(function(page) { 36 | this.add(page); 37 | }, this); 38 | }) 39 | }) 40 | .fail(function(jqxhr, textStatus, error) { 41 | var err = textStatus + ", " + error; 42 | console.error("Error getting Hugo index file:", err); 43 | }); 44 | } 45 | 46 | /** 47 | * Trigger a search in lunr and transform the result 48 | * 49 | * @param {String} query 50 | * @return {Array} results 51 | */ 52 | function search(queryTerm) { 53 | // Find the item in our index corresponding to the lunr one to have more info 54 | return lunrIndex.search(queryTerm+"^100"+" "+queryTerm+"*^10"+" "+"*"+queryTerm+"^10"+" "+queryTerm+"~2^1").map(function(result) { 55 | return pagesIndex.filter(function(page) { 56 | return page.uri === result.ref; 57 | })[0]; 58 | }); 59 | } 60 | 61 | // Let's get started 62 | initLunr(); 63 | $( document ).ready(function() { 64 | var searchList = new autoComplete({ 65 | /* selector for the search box element */ 66 | selector: $("#search-by").get(0), 67 | /* source is the callback to perform the search */ 68 | source: function(term, response) { 69 | response(search(term)); 70 | }, 71 | /* renderItem displays individual search results */ 72 | renderItem: function(item, term) { 73 | var numContextWords = 2; 74 | var text = item.content.match( 75 | "(?:\\s?(?:[\\w]+)\\s?){0,"+numContextWords+"}" + 76 | term+"(?:\\s?(?:[\\w]+)\\s?){0,"+numContextWords+"}"); 77 | item.context = text; 78 | var divcontext = document.createElement("div"); 79 | divcontext.className = "context"; 80 | divcontext.innerText = (item.context || ''); 81 | var divsuggestion = document.createElement("div"); 82 | divsuggestion.className = "autocomplete-suggestion"; 83 | divsuggestion.setAttribute("data-term", term); 84 | divsuggestion.setAttribute("data-title", item.title); 85 | divsuggestion.setAttribute("data-uri", item.uri); 86 | divsuggestion.setAttribute("data-context", item.context); 87 | divsuggestion.innerText = '» ' + item.title; 88 | divsuggestion.appendChild(divcontext); 89 | return divsuggestion.outerHTML; 90 | }, 91 | /* onSelect callback fires when a search suggestion is chosen */ 92 | onSelect: function(e, term, item) { 93 | location.href = item.getAttribute('data-uri'); 94 | } 95 | }); 96 | }); 97 | -------------------------------------------------------------------------------- /static/webfonts/fa-brands-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-brands-400.eot -------------------------------------------------------------------------------- /static/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /static/webfonts/fa-brands-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-brands-400.woff -------------------------------------------------------------------------------- /static/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /static/webfonts/fa-regular-400.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-regular-400.eot -------------------------------------------------------------------------------- /static/webfonts/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-regular-400.ttf -------------------------------------------------------------------------------- /static/webfonts/fa-regular-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-regular-400.woff -------------------------------------------------------------------------------- /static/webfonts/fa-regular-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-regular-400.woff2 -------------------------------------------------------------------------------- /static/webfonts/fa-solid-900.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-solid-900.eot -------------------------------------------------------------------------------- /static/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /static/webfonts/fa-solid-900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-solid-900.woff -------------------------------------------------------------------------------- /static/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/matcornic/hugo-theme-learn/3202533a746f91c67de1a8fa373c0328ec1b403d/static/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | # theme.toml template for a Hugo theme 2 | # See https://github.com/spf13/hugoThemes#themetoml for an example 3 | 4 | name = "Learn" 5 | license = "MIT" 6 | licenselink = "https://github.com/matcornic/hugo-theme-learn/blob/master/LICENSE.md" 7 | description = "Documentation theme for Hugo, based on Grav Learn theme" 8 | homepage = "https://github.com/matcornic/hugo-theme-learn/" 9 | repo = "https://github.com/matcornic/hugo-theme-learn" 10 | tags = ["documentation", "grav", "learn", "doc", "search"] 11 | features = ["documentation", "menu", "nested sections", "search", "mermaid"] 12 | min_version = 0.25 13 | 14 | [author] 15 | name = "Mathieu Cornic" 16 | homepage = "https://matcornic.github.io/" 17 | 18 | [original] 19 | name = "Grav Learn" 20 | homepage = "https://learn.getgrav.org/" 21 | repo = "https://github.com/getgrav/grav-learn" 22 | -------------------------------------------------------------------------------- /wercker.yml: -------------------------------------------------------------------------------- 1 | box: golang 2 | build: 3 | steps: 4 | # Gets the dependencies 5 | - script: 6 | name: get hugo 7 | code: | 8 | git clone https://github.com/gohugoio/hugo.git && cd hugo && go install 9 | # Sets the go workspace and places you package 10 | # at the right place in the workspace tree 11 | - setup-go-workspace 12 | # Build the project 13 | - script: 14 | name: build site 15 | code: | 16 | cd exampleSite && hugo --------------------------------------------------------------------------------