diff --git a/themes/hugo-theme-learn/CHANGELOG.md b/themes/hugo-theme-learn/CHANGELOG.md index 02f290c9..b5f5eac9 100644 --- a/themes/hugo-theme-learn/CHANGELOG.md +++ b/themes/hugo-theme-learn/CHANGELOG.md @@ -1,22 +1,62 @@ # Changelog -## v2.4.0 (27/08/2019) +## v2.5.0 (01/06/2020) + +#### New features + +- [**feature**] Allow custom css files to be loaded by configuration [#376](https://github.com/matcornic/hugo-theme-learn/pull/376) +- [**feature**] Added flag to turn off image featherlight [#333](https://github.com/matcornic/hugo-theme-learn/pull/333) + +#### Bug Fixes + +- [**bug**] fix null pointer when no params on image url [#383](https://github.com/matcornic/hugo-theme-learn/pull/383) +- [**bug**] can't give argument to non-function not .Params.hidden [#403](https://github.com/matcornic/hugo-theme-learn/pull/403) +- [**bug**] Fix .File.UniqueID on zero object warning [#372](https://github.com/matcornic/hugo-theme-learn/pull/372) +- [**bug**] fix select option color in Chrome [#345](https://github.com/matcornic/hugo-theme-learn/pull/345) +- [**bug**] remove unneeded spaces from HTML [#320](https://github.com/matcornic/hugo-theme-learn/pull/320) +- [**bug**] Avoid displaying hidden sections in menu [#354](https://github.com/matcornic/hugo-theme-learn/pull/354) + +#### Enhancements + +- [**enhancement**] Updated theme installation documentation link. [#390](https://github.com/matcornic/hugo-theme-learn/pull/390) +- [**enhancement**] [ImgBot] Optimize images [#366](https://github.com/matcornic/hugo-theme-learn/pull/366) +- [**enhancement**] fix extra spaces in the description [#339](https://github.com/matcornic/hugo-theme-learn/pull/339) +- [**enhancement**] change to minified 'autocomplete.js' for improved performance [#321](https://github.com/matcornic/hugo-theme-learn/pull/321) + +#### Internationalisation + +- [**i18n**] Fix: typos [#343](https://github.com/matcornic/hugo-theme-learn/pull/343) +- [**i18n**] Fix: typo [#342](https://github.com/matcornic/hugo-theme-learn/pull/342) +- [**i18n**] Incorrect english in notice documentation [#336](https://github.com/matcornic/hugo-theme-learn/pull/336) +- [**i18n**] Add Chinese language for this theme [#349](https://github.com/matcornic/hugo-theme-learn/pull/349) +- [**i18n**] Add jp and zh cn [#335](https://github.com/matcornic/hugo-theme-learn/pull/335) +- [**i18n**] Added Russian translation [#332](https://github.com/matcornic/hugo-theme-learn/pull/332) + +#### Theme Meta + +- [**meta**] Fix various linting warnings [#405](https://github.com/matcornic/hugo-theme-learn/pull/405) +- [**meta**] Netlify build on 0.66.0 [#377](https://github.com/matcornic/hugo-theme-learn/pull/377) +- [**meta**] add inteliver documentation showcase [#331](https://github.com/matcornic/hugo-theme-learn/pull/331) + +--- + +## v2.4.0 (04/09/2019) #### Bug Fixes - [**bug**] correct GitHub capitalization [#293](https://github.com/matcornic/hugo-theme-learn/pull/293) +- [**bug**] fix 'locate' typo [#285](https://github.com/matcornic/hugo-theme-learn/pull/285) - [**bug**] Remove reference to the unused horsey CSS [#284](https://github.com/matcornic/hugo-theme-learn/pull/284) - [**bug**] Fix invalid HTML in 404 template. [#271](https://github.com/matcornic/hugo-theme-learn/pull/271) -- [**bug**] fix 'locate' typo [#285](https://github.com/matcornic/hugo-theme-learn/pull/285) #### Enhancements - [**enhancement**] Delete html5shiv-printshiv.min.js [#319](https://github.com/matcornic/hugo-theme-learn/pull/319) - [**enhancement**] remove html5shiv [#315](https://github.com/matcornic/hugo-theme-learn/pull/315) - [**enhancement**] Fix deprecated .Hugo, .UniqueID and .URL references [#303](https://github.com/matcornic/hugo-theme-learn/pull/303) -- [**enhancement**] remove unneeded type="text/css" [#297](https://github.com/matcornic/hugo-theme-learn/pull/297) - [**enhancement**] Fix type lines 364 and 369 [#304](https://github.com/matcornic/hugo-theme-learn/pull/304) - [**enhancement**] remove unneeded type="text/css" [#298](https://github.com/matcornic/hugo-theme-learn/pull/298) +- [**enhancement**] remove unneeded type="text/css" [#297](https://github.com/matcornic/hugo-theme-learn/pull/297) - [**enhancement**] HTTPS links in footer [#295](https://github.com/matcornic/hugo-theme-learn/pull/295) - [**enhancement**] remove unneeded type="text/css" [#292](https://github.com/matcornic/hugo-theme-learn/pull/292) - [**enhancement**] Make shortcodes & example site compatible with Hugo v0.55 [#281](https://github.com/matcornic/hugo-theme-learn/pull/281) @@ -25,6 +65,10 @@ - [**i18n**] Added German and Arabic translation [#312](https://github.com/matcornic/hugo-theme-learn/pull/312) +#### Theme Meta + +- [**meta**] Added Tshark.dev as example site [#318](https://github.com/matcornic/hugo-theme-learn/pull/318) + --- ## v2.3.0 (16/04/2019) @@ -160,9 +204,9 @@ #### Uncategorised +- [**closed**] Fix anchor scrolling that hides behind top nav bar [#46](https://github.com/matcornic/hugo-theme-learn/pull/46) - [**closed**] feat: Change the default code color [#43](https://github.com/matcornic/hugo-theme-learn/pull/43) - [**closed**] Use index pages + automatic navigation arrows [#36](https://github.com/matcornic/hugo-theme-learn/pull/36) -- [**closed**] Fix anchor scrolling that hides behind top nav bar [#46](https://github.com/matcornic/hugo-theme-learn/pull/46) --- @@ -170,6 +214,7 @@ #### Uncategorised +- [**closed**] Search [#18](https://github.com/matcornic/hugo-theme-learn/pull/18) - [**closed**] Extracted menu footer content to separate partial file [#35](https://github.com/matcornic/hugo-theme-learn/pull/35) - [**closed**] feat: style Hugo figure shortcode [#33](https://github.com/matcornic/hugo-theme-learn/pull/33) - [**closed**] Fix URL for 'Edit this page' on Windows [#27](https://github.com/matcornic/hugo-theme-learn/pull/27) @@ -179,4 +224,3 @@ - [**closed**] Menu generation using Content file instead directories [#5](https://github.com/matcornic/hugo-theme-learn/pull/5) - [**closed**] Add Checkmark On visited Links [#4](https://github.com/matcornic/hugo-theme-learn/pull/4) - [**closed**] doc: Add theme installation instructions [#1](https://github.com/matcornic/hugo-theme-learn/pull/1) -- [**closed**] Search [#18](https://github.com/matcornic/hugo-theme-learn/pull/18) diff --git a/themes/hugo-theme-learn/README.md b/themes/hugo-theme-learn/README.md index b0f2ccac..3e0801e9 100644 --- a/themes/hugo-theme-learn/README.md +++ b/themes/hugo-theme-learn/README.md @@ -24,9 +24,9 @@ Visit the [theme documentation](https://learn.netlify.com/en/) to see what is go Navigate to your themes folder in your Hugo site and use the following commands: -``` -$ cd themes -$ git clone https://github.com/matcornic/hugo-theme-learn.git +```shell +cd themes/ +git clone https://github.com/matcornic/hugo-theme-learn.git ``` Check that your Hugo version is minimum `0.25` with `hugo version`. @@ -39,7 +39,7 @@ Check that your Hugo version is minimum `0.25` with `hugo version`. ## Download old versions (prior to 2.0.0) -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` +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` - Direct download way: https://github.com/matcornic/hugo-theme-learn/archive/1.1.0.zip - Git way: @@ -55,6 +55,43 @@ For both solutions, the documentation is available at https://github.com/matcorn 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 ! - ## License + [![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) + +## Releasing + +Somewhat work-in-progress steps to release with [gren](https://github.com/github-tools/github-release-notes) + +- Check all MRs assigned to the milestone are closed or pushed back to another release +- Close the milestone +- Check merged MRs on the milestone have a tag (Bug, Enhancement, etc.) +- Tag and push the repo + + ```shell + git tag + git push origin + ``` + +- Generate CHANGELOG.md with _gren_ + + ```shell + gren changelog --override --generate --tags=all + ``` + +- Fix the date for the current release in CHANGELOG.md +- Add the changelog to git and update the tag + + ```shell + git add CHANGELOG.md + git commit -m "Ship tag " + git push origin master + git tag -f + git push --force origin + ``` + +- Generate release with _gren_ + + ```shell + gren release -t + ``` diff --git a/themes/hugo-theme-learn/exampleSite/config.toml b/themes/hugo-theme-learn/exampleSite/config.toml index c75f508c..9fa84e12 100644 --- a/themes/hugo-theme-learn/exampleSite/config.toml +++ b/themes/hugo-theme-learn/exampleSite/config.toml @@ -73,3 +73,30 @@ weight = 20 name = " Crédits" url = "/credits" weight = 30 + +[Languages.zh] +title = "Hugo 主题的 Learn 文档" +weight = 3 +languageName = "简体中文" + +[[Languages.zh.menu.shortcuts]] +name = " GitHub 仓库" +identifier = "ds" +url = "https://github.com/matcornic/hugo-theme-learn" +weight = 10 + +[[Languages.zh.menu.shortcuts]] +name = " 展示区" +url = "/showcase" +weight = 11 + +[[Languages.zh.menu.shortcuts]] +name = " Hugo 文档" +identifier = "hugodoc" +url = "https://gohugo.io/" +weight = 20 + +[[Languages.zh.menu.shortcuts]] +name = " 鸣谢" +url = "/credits" +weight = 30 diff --git a/themes/hugo-theme-learn/exampleSite/content/basics/_index.zh.md b/themes/hugo-theme-learn/exampleSite/content/basics/_index.zh.md new file mode 100755 index 00000000..6c5d5dac --- /dev/null +++ b/themes/hugo-theme-learn/exampleSite/content/basics/_index.zh.md @@ -0,0 +1,12 @@ +--- +title: 基础 +weight: 5 +pre: "1. " +chapter: true +--- + +### 章节 1 + +# 基础 + +了解该 Hugo 主题的特点以及背后的核心概念。 diff --git a/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.en.md b/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.en.md index e56f84b7..cdf6075a 100644 --- a/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.en.md +++ b/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.en.md @@ -12,7 +12,7 @@ Note that some of these parameters are explained in details in other sections of ```toml [params] - # Prefix URL to edit current page. Will display an "Edit this page" button on top right hand corner of every page. + # Prefix URL to edit current page. Will display an "Edit this page" button on top right hand corner of every page. # Useful to give opportunity to people to create merge request for your doc. # See the config.toml file from this documentation site to have an example. editURL = "" @@ -24,12 +24,12 @@ Note that some of these parameters are explained in details in other sections of showVisitedLinks = false # Disable search function. It will hide search bar disableSearch = false - # Javascript and CSS cache are automatically busted when new version of site is generated. + # Javascript and CSS cache are automatically busted when new version of site is generated. # Set this to true to disable this behavior (some proxies don't handle well this optimization) disableAssetsBusting = false # Set this to true to disable copy-to-clipboard button for inline code. disableInlineCopyToClipBoard = false - # A title for shortcuts in menu is set by default. Set this to true to disable it. + # A title for shortcuts in menu is set by default. Set this to true to disable it. disableShortcutsTitle = false # When using mulitlingual website, disable the switch language button. disableLanguageSwitchingButton = false @@ -41,6 +41,8 @@ Note that some of these parameters are explained in details in other sections of ordersectionsby = "weight" # Change default color scheme with a variant one. Can be "red", "blue", "green". themeVariant = "" + # Provide a list of custom css files to load relative from the `static/` folder in the site root. + custom_css = ["css/foo.css", "css/bar.css"] ``` ## Activate search @@ -54,5 +56,5 @@ home = [ "HTML", "RSS", "JSON"] 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. -> Hugo generate lunrjs index.json at the root of public folder. +> Hugo generate lunrjs index.json at the root of public folder. > When you build the site with `hugo server`, hugo generates it internally and of course it doesn’t show up in the filesystem diff --git a/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.fr.md b/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.fr.md index fece4d09..fb1a4e83 100644 --- a/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.fr.md +++ b/themes/hugo-theme-learn/exampleSite/content/basics/configuration/_index.fr.md @@ -24,12 +24,12 @@ Notez que certains de ces paramètres sont expliqués en détails dans d'autres showVisitedLinks = false # Désactive la fonction de recherche. Une valeur à true cache la barre de recherche. disableSearch = false - # Par défaut, le cache Javascript et CSS est automatiquement vidé lorsqu'une nouvelle version du site est générée. + # Par défaut, le cache Javascript et CSS est automatiquement vidé lorsqu'une nouvelle version du site est générée. # Utilisez ce paramètre lorsque vous voulez désactiver ce comportement (c'est parfois incompatible avec certains proxys) disableAssetsBusting = false # Utilisez ce paramètre pour désactiver le bouton copy-to-clipboard pour le code formatté sur une ligne. disableInlineCopyToClipBoard = false - # Un titre est défini par défaut lorsque vous utilisez un raccourci dans le menu. Utilisez ce paramètre pour le cacher. + # Un titre est défini par défaut lorsque vous utilisez un raccourci dans le menu. Utilisez ce paramètre pour le cacher. disableShortcutsTitle = false # Quand vous utilisez un site multi-langue, utilisez ce paramètre pour désactiver le bouton de changement de langue. disableLanguageSwitchingButton = false @@ -37,6 +37,8 @@ Notez que certains de ces paramètres sont expliqués en détails dans d'autres ordersectionsby = "weight" # Utilisez ce paramètre pour modifier le schéma de couleur du site. Les valeurs par défaut sont "red", "blue", "green". themeVariant = "" + # Fournissez une liste de fichiers css personnalisés à charger par rapport depuis le dossier `static/` à la racine du site. + custom_css = ["css/foo.css", "css/bar.css"] ``` ## Activer la recherche {#activer-recherche} @@ -48,7 +50,7 @@ Si ce n'est pas déjà présent, ajoutez les lignes suivantes dans le fichier `c home = [ "HTML", "RSS", "JSON"] ``` -Le thème *Learn* utilise les dernières amélioraions d'Hugo pour générer un fichier d'index JSON, prêt à être consommé par le moteur de recherche lunr.js. +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. -> Hugo génère lunrjs index.json à la racine du dossier `public`. -> 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. \ No newline at end of file +> Hugo génère lunrjs index.json à la racine du dossier `public`. +> 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. diff --git a/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.en.md b/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.en.md index 7fe52549..e53d006c 100644 --- a/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.en.md +++ b/themes/hugo-theme-learn/exampleSite/content/basics/installation/_index.en.md @@ -15,7 +15,7 @@ hugo new site ## Install the theme -Install the **Hugo-theme-learn** theme by following [this documentation](https://gohugo.io/themes/installing/) +Install the **Hugo-theme-learn** theme by following [this documentation](https://gohugo.io/getting-started/quick-start/#step-3-add-a-theme) This theme's repository is: https://github.com/matcornic/hugo-theme-learn.git diff --git a/themes/hugo-theme-learn/exampleSite/content/cont/markdown.en.md b/themes/hugo-theme-learn/exampleSite/content/cont/markdown.en.md index b961bcdd..c97701e0 100644 --- a/themes/hugo-theme-learn/exampleSite/content/cont/markdown.en.md +++ b/themes/hugo-theme-learn/exampleSite/content/cont/markdown.en.md @@ -25,8 +25,7 @@ Some of the key benefits are: John Gruber, the author of Markdown, puts it like this: > The overriding design goal for Markdown’s formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it’s been marked up with tags or formatting instructions. While Markdown’s syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown’s syntax is the format of plain text email. -> -- John Gruber - +> -- John Gruber Grav ships with built-in support for [Markdown](http://daringfireball.net/projects/markdown/) and [Markdown Extra](https://michelf.ca/projects/php-markdown/extra/). You must enable **Markdown Extra** in your `system.yaml` configuration file @@ -50,12 +49,18 @@ Headings from `h1` through `h6` are constructed with a `#` for each level: ``` Renders to: - + # h1 Heading + + ## h2 Heading + ### h3 Heading + #### h4 Heading + ##### h5 Heading + ###### h6 Heading HTML: @@ -78,13 +83,13 @@ Comments should be HTML compatible This is a comment --> ``` + Comment below should **NOT** be seen: - ## Horizontal Rules The HTML `
` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a `
` with any of the following: @@ -97,11 +102,6 @@ renders to: ___ ---- - -*** - - ## Body Copy Body copy written as normal, plain text will be wrapped with `

` tags in the rendered HTML. @@ -111,6 +111,7 @@ So this body copy: ```markdown Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus. Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad. ``` + renders to this HTML: ```html @@ -120,6 +121,7 @@ renders to this HTML: ## Emphasis ### Bold + For emphasizing a snippet of text with a heavier font-weight. The following snippet of text is **rendered as bold text**. @@ -127,9 +129,12 @@ The following snippet of text is **rendered as bold text**. ```markdown **rendered as bold text** ``` + renders to: + **rendered as bold text** + and this HTML @@ -138,6 +143,7 @@ and this HTML ``` ### Italics + For emphasizing a snippet of text with italics. The following snippet of text is _rendered as italicized text_. @@ -148,7 +154,9 @@ _rendered as italicized text_ renders to: + _rendered as italicized text_ + and this HTML: @@ -156,13 +164,14 @@ and this HTML: rendered as italicized text ``` +### Strikethrough -### strikethrough In GFM (GitHub flavored Markdown) you can do strikethroughs. ```markdown ~~Strike through this text.~~ ``` + Which renders to: ~~Strike through this text.~~ @@ -219,10 +228,10 @@ Renders to: The old mechanism for notices overriding the block quote syntax (`>>>`) has been deprecated. Notices are now handled via a dedicated plugin called [Markdown Notices](https://github.com/getgrav/grav-plugin-markdown-notices) {{% /notice %}} - ## Lists ### Unordered + A list of items in which the order of the items does not explicitly matter. You may use any of the following symbols to denote bullets for each list item: @@ -249,8 +258,10 @@ For example + Aenean sit amet erat nunc + Eget porttitor lorem ``` + Renders to: + + Lorem ipsum dolor sit amet + Consectetur adipiscing elit + Integer molestie lorem at massa @@ -263,6 +274,7 @@ Renders to: + Faucibus porta lacus fringilla vel + Aenean sit amet erat nunc + Eget porttitor lorem + And this HTML @@ -292,14 +304,15 @@ A list of items in which the order of items does explicitly matter. ```markdown 1. Lorem ipsum dolor sit amet -2. Consectetur adipiscing elit -3. Integer molestie lorem at massa -4. Facilisis in pretium nisl aliquet -5. Nulla volutpat aliquam velit -6. Faucibus porta lacus fringilla vel -7. Aenean sit amet erat nunc -8. Eget porttitor lorem +4. Consectetur adipiscing elit +2. Integer molestie lorem at massa +8. Facilisis in pretium nisl aliquet +4. Nulla volutpat aliquam velit +99. Faucibus porta lacus fringilla vel +21. Aenean sit amet erat nunc +6. Eget porttitor lorem ``` + Renders to: 1. Lorem ipsum dolor sit amet @@ -353,6 +366,7 @@ Renders to: ## Code ### Inline code + Wrap inline snippets of code with `` ` ``. ```markdown @@ -371,21 +385,23 @@ HTML: ### Indented code -Or indent several lines of code by at least four spaces, as in: +Or indent several lines of code by at least two spaces, as in: -
-  // Some comments
-  line 1 of code
-  line 2 of code
-  line 3 of code
-
+```markdown + // Some comments + line 1 of code + line 2 of code + line 3 of code +``` Renders to: + // Some comments line 1 of code line 2 of code line 3 of code + HTML: @@ -400,19 +416,11 @@ HTML: ``` - ### Block code "fences" Use "fences" ```` ``` ```` to block in multiple lines of code. -
-``` markup
-Sample text here...
-```
-
- - -``` +```markdown Sample text here... ``` @@ -426,30 +434,34 @@ HTML: ### Syntax highlighting -GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML. For example, to apply syntax highlighting to JavaScript code: - -
-```js
-grunt.initConfig({
-  assemble: {
-    options: {
-      assets: 'docs/assets',
-      data: 'src/data/*.{json,yml}',
-      helpers: 'src/custom-helpers.js',
-      partials: ['src/partials/**/*.{hbs,md}']
-    },
-    pages: {
-      options: {
-        layout: 'default.hbs'
-      },
-      files: {
-        './': ['src/templates/pages/index.hbs']
+GFM, or "GitHub Flavored Markdown" also supports syntax highlighting. To activate it, simply add the file extension of the language you want to use directly after the first code "fence", ` ```js `, and syntax highlighting will automatically be applied in the rendered HTML.
+
+See [Code Highlighting]({{< ref "syntaxhighlight.md" >}}) for additional documentation.
+
+For example, to apply syntax highlighting to JavaScript code:
+
+```plaintext
+    ```js
+    grunt.initConfig({
+      assemble: {
+        options: {
+          assets: 'docs/assets',
+          data: 'src/data/*.{json,yml}',
+          helpers: 'src/custom-helpers.js',
+          partials: ['src/partials/**/*.{hbs,md}']
+        },
+        pages: {
+          options: {
+            layout: 'default.hbs'
+          },
+          files: {
+            './': ['src/templates/pages/index.hbs']
+          }
+        }
       }
-    }
-  }
-};
+    };
+    ```
 ```
-
Renders to: @@ -475,8 +487,8 @@ grunt.initConfig({ ``` ## Tables -Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned. +Tables are created by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned. ```markdown | Option | Description | @@ -553,8 +565,7 @@ HTML: Assemble ``` - -### Add a title +### Add a tooltip ```markdown [Upstage](https://github.com/upstage/ "Visit Upstage!") @@ -580,6 +591,7 @@ Named anchors enable you to jump to the specified anchor point on the same page. * [Chapter 2](#chapter-2) * [Chapter 3](#chapter-3) ``` + will jump to these sections: ```markdown @@ -600,12 +612,15 @@ Images have a similar syntax to links but include a preceding exclamation point. ```markdown ![Minion](https://octodex.github.com/images/minion.png) ``` + ![Minion](https://octodex.github.com/images/minion.png) or + ```markdown ![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") ``` + ![Alt text](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat") Like links, Images also have a footnote style syntax @@ -615,6 +630,7 @@ Like links, Images also have a footnote style syntax ```markdown ![Alt text][id] ``` + ![Alt text][id] With a reference later in the document defining the URL location: @@ -652,14 +668,25 @@ Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow`and ```markdown ![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=shadow) ``` + ![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=shadow) ```markdown ![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=border) ``` + ![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=border) ```markdown ![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?classes=border,shadow) ``` + ![stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg?width=40pc&classes=border,shadow) + +### Lightbox + +Add a HTTP `featherlight` parameter to the link image to disable lightbox. By default lightbox is enabled using the featherlight.js plugin. You can disable this by defining `featherlight` to `false`. + +```markdown +![Minion](https://octodex.github.com/images/minion.png?featherlight=false) +``` diff --git a/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.fr.md b/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.fr.md index 9065908a..50c6f256 100644 --- a/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.fr.md +++ b/themes/hugo-theme-learn/exampleSite/content/cont/pages/_index.fr.md @@ -4,11 +4,11 @@ title: Organisation des pages weight: 5 --- -Dans **Hugo**, les pages sont le coeur de votre site. Une fois configurées, les pages sont la valeur ajoutée de votre site de documentation. +Dans **Hugo**, les pages sont le cœur de votre site. Une fois configurées, les pages sont la valeur ajoutée de votre site de documentation. ## Dossiers -Organisez votre site comment n'importe quel autre [projet Hugo](https://gohugo.io/content/organization/). Typiquement, vous allez avoir un dossier *content* avec vos pages. +Organisez votre site comme n'importe quel autre [projet Hugo](https://gohugo.io/content/organization/). Typiquement, vous allez avoir un dossier *content* avec vos pages. content ├── niveau-un @@ -35,7 +35,7 @@ Organisez votre site comment n'importe quel autre [projet Hugo](https://gohugo.i └── premiere-page.md <-- /premiere-page {{% notice note %}} -Le fichier `_index.md` est obligatoire dans chaque dossier, c'est en quelques rotes votre page d'accueil pour le dossier. +Le fichier `_index.md` est obligatoire dans chaque dossier, c'est en quelque sorte votre page d'accueil pour le dossier. {{% /notice %}} ## Types diff --git a/themes/hugo-theme-learn/exampleSite/content/cont/syntaxhighlight.en.md b/themes/hugo-theme-learn/exampleSite/content/cont/syntaxhighlight.en.md new file mode 100644 index 00000000..ed1fe72c --- /dev/null +++ b/themes/hugo-theme-learn/exampleSite/content/cont/syntaxhighlight.en.md @@ -0,0 +1,89 @@ +--- +date: 2020-06-01T13:31:12+01:00 +title: Code highlighting +weight: 16 +--- + +Learn theme uses [highlight.js](https://highlightjs.org/) to provide code syntax highlighting. + +## Markdown syntax + +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. + + +```plaintext + ```json + [ + { + "title": "apples", + "count": [12000, 20000], + "description": {"text": "...", "sensitive": false} + }, + { + "title": "oranges", + "count": [17500, null], + "description": {"text": "...", "sensitive": false} + } + ] + ``` +``` + + +Renders to: + +```json +[ + { + "title": "apples", + "count": [12000, 20000], + "description": {"text": "...", "sensitive": false} + }, + { + "title": "oranges", + "count": [17500, null], + "description": {"text": "...", "sensitive": false} + } +] +``` + +## Supported languages + +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/). + +## Identifying failed language detection + +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. + +```plaintext + ```foo + bar + ``` +``` + +```nohighlight +Could not find the language 'foo', did you forget to load/include a language module?(anonymous) @ highlight.pack.js +``` + +## Supporting additional languages + +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. + +### Download custom highlight.js + +Visit [https://highlightjs.org/download/](https://highlightjs.org/download/) and select your desired language support. Note that more languages means greater package size. + +### Add custom highlight.js to static resources + +Inside the zip archive downloaded from highlight.js extract the file named `highlight.pack.js`. Move this file to the **new** location + +```nohighlight +static/js/highlight.pack.js +``` + +**Do not** replace the existing file at `themes/hugo-theme-learn/static/js/highlight.pack.js`. + +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. + +## Further usage information + +See [https://highlightjs.org/usage/](https://highlightjs.org/usage/) diff --git a/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.en.md b/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.en.md index 5d6139b7..0178536f 100644 --- a/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.en.md +++ b/themes/hugo-theme-learn/exampleSite/content/shortcodes/children/_index.en.md @@ -22,9 +22,9 @@ Use the children shortcode to list the child pages of a page and the further des {{% children %}} - {{%/* children description="true" */%}} + {{%/* children description="true" */%}} -{{%children description="true" %}} +{{%children description="true" %}} {{%/* children depth="3" showhidden="true" */%}} diff --git a/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.en.md b/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.en.md index df346c13..c82a6e9f 100644 --- a/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.en.md +++ b/themes/hugo-theme-learn/exampleSite/content/shortcodes/notice.en.md @@ -51,7 +51,7 @@ A tip disclaimer ``` {{%/* notice warning */%}} -An warning disclaimer +A warning disclaimer {{%/* /notice */%}} ``` @@ -59,4 +59,4 @@ renders as {{% notice warning %}} A warning disclaimer -{{% /notice %}} \ No newline at end of file +{{% /notice %}} diff --git a/themes/hugo-theme-learn/exampleSite/content/showcase.en.md b/themes/hugo-theme-learn/exampleSite/content/showcase.en.md index 8f647f0e..4d06d8b4 100644 --- a/themes/hugo-theme-learn/exampleSite/content/showcase.en.md +++ b/themes/hugo-theme-learn/exampleSite/content/showcase.en.md @@ -9,3 +9,5 @@ disableToc: true #### [Tshark.dev](https://tshark.dev) by Ross Jacobs ![Tshark.dev image](/images/showcase/tshark_dev.png?width=50pc) +#### [inteliver](https://docs.inteliver.com) by Amir Lavasani +![docs.inteliver.com image](/images/showcase/inteliver_docs.png?width=50pc) \ No newline at end of file diff --git a/themes/hugo-theme-learn/exampleSite/content/showcase.fr.md b/themes/hugo-theme-learn/exampleSite/content/showcase.fr.md index daf1b77a..fcb9d7f0 100644 --- a/themes/hugo-theme-learn/exampleSite/content/showcase.fr.md +++ b/themes/hugo-theme-learn/exampleSite/content/showcase.fr.md @@ -10,3 +10,5 @@ slug: vitrine #### [Tshark.dev](https://tshark.dev) par Ross Jacobs ![Tshark.dev image](/images/showcase/tshark_dev.png?width=50pc) +#### [inteliver](https://docs.inteliver.com) by Amir Lavasani +![docs.inteliver.com image](/images/showcase/inteliver_docs.png?width=50pc) \ No newline at end of file diff --git a/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.svg b/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.svg index c5ac8594..811d3aa4 100755 --- a/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.svg +++ b/themes/hugo-theme-learn/exampleSite/static/fonts/monogramos-webfont.svg @@ -1,237 +1 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/themes/hugo-theme-learn/exampleSite/static/images/showcase/inteliver_docs.png b/themes/hugo-theme-learn/exampleSite/static/images/showcase/inteliver_docs.png new file mode 100644 index 00000000..9d9bf324 Binary files /dev/null and b/themes/hugo-theme-learn/exampleSite/static/images/showcase/inteliver_docs.png differ diff --git a/themes/hugo-theme-learn/i18n/ja.toml b/themes/hugo-theme-learn/i18n/ja.toml new file mode 100644 index 00000000..e7510c30 --- /dev/null +++ b/themes/hugo-theme-learn/i18n/ja.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "検索..." + +[Clear-History] +other = "履歴削除" + +[Attachments-label] +other = "添付" + +[title-404] +other = "エラー" + +[message-404] +other = "おっと。ページが見当たりません。 ¯\\_(ツ)_/¯." + +[Go-to-homepage] +other = "ホームページへ行く" + +[Edit-this-page] +other = "このページを編集" + +[Shortcuts-Title] +other = "更に" + +[Expand-title] +other = "開く..." diff --git a/themes/hugo-theme-learn/i18n/ru.toml b/themes/hugo-theme-learn/i18n/ru.toml new file mode 100644 index 00000000..36ad0794 --- /dev/null +++ b/themes/hugo-theme-learn/i18n/ru.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "Поиск..." + +[Clear-History] +other = "Очистить историю" + +[Attachments-label] +other = "Присоединенные файлы" + +[title-404] +other = "Ошибка" + +[message-404] +other = "Упс. Выглядит будто такой страницы нет ¯\\_(ツ)_/¯." + +[Go-to-homepage] +other = "Перейти на главную" + +[Edit-this-page] +other = "Редактировать" + +[Shortcuts-Title] +other = "Еще" + +[Expand-title] +other = "Развернуть..." \ No newline at end of file diff --git a/themes/hugo-theme-learn/i18n/zh-cn.toml b/themes/hugo-theme-learn/i18n/zh-cn.toml new file mode 100644 index 00000000..e887d3e6 --- /dev/null +++ b/themes/hugo-theme-learn/i18n/zh-cn.toml @@ -0,0 +1,26 @@ +[Search-placeholder] +other = "搜索..." + +[Clear-History] +other = "清理历史记录" + +[Attachments-label] +other = "附件" + +[title-404] +other = "错误" + +[message-404] +other = "哎哟。 看起来这个页面不存在 ¯\\_(ツ)_/¯。" + +[Go-to-homepage] +other = "转到主页" + +[Edit-this-page] +other = "编辑当前页" + +[Shortcuts-Title] +other = "更多" + +[Expand-title] +other = "展开" diff --git a/themes/hugo-theme-learn/layouts/_default/single.html b/themes/hugo-theme-learn/layouts/_default/single.html index ab1424fd..d3d9f253 100644 --- a/themes/hugo-theme-learn/layouts/_default/single.html +++ b/themes/hugo-theme-learn/layouts/_default/single.html @@ -2,12 +2,11 @@ {{ .Content }} -