working on self-host
2
.gitignore
vendored
@ -18,3 +18,5 @@
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
*lock
|
||||
public/
|
||||
|
@ -1,4 +1,4 @@
|
||||
baseURL = "/"
|
||||
baseURL = "https://rustdesk.com/docs"
|
||||
languageCode = "en-US"
|
||||
defaultContentLanguage = "en"
|
||||
|
||||
@ -56,7 +56,7 @@ title = "RustDesk文档"
|
||||
weight = 3
|
||||
languageName = "简体中文"
|
||||
landingPageURL = "/zh"
|
||||
landingPageName = "<i class='fas fa-home'></i> 家"
|
||||
landingPageName = "<i class='fas fa-home'></i> 首页"
|
||||
|
||||
[[Languages.zh.menu.shortcuts]]
|
||||
name = "<i class='fab fa-fw fa-github'></i> GitHub 仓库"
|
||||
|
@ -1,41 +1,6 @@
|
||||
---
|
||||
title: "Learn Theme for Hugo"
|
||||
title: "Docs of RustDesk"
|
||||
---
|
||||
|
||||
# Hugo learn theme
|
||||
# RustDesk
|
||||
|
||||
[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**.
|
||||
|
||||
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.
|
||||
|
||||
{{% 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"%}})
|
||||
{{% /notice %}}
|
||||
|
||||
## Main features
|
||||
|
||||
* [Automatic Search]({{%relref "basics/configuration/_index.md#activate-search" %}})
|
||||
* [Multilingual mode]({{%relref "cont/i18n/_index.md" %}})
|
||||
* **Unlimited menu levels**
|
||||
* **Automatic next/prev buttons to navigate through menu entries**
|
||||
* [Image resizing, shadow...]({{%relref "cont/markdown.en.md#images" %}})
|
||||
* [Attachments files]({{%relref "shortcodes/attachments.en.md" %}})
|
||||
* [List child pages]({{%relref "shortcodes/children/_index.md" %}})
|
||||
* [Mermaid diagram]({{%relref "shortcodes/mermaid.en.md" %}}) (flowchart, sequence, gantt)
|
||||
* [Customizable look and feel and themes variants]({{%relref "basics/style-customization/_index.md"%}})
|
||||
* [Buttons]({{%relref "shortcodes/button.en.md" %}}), [Tip/Note/Info/Warning boxes]({{%relref "shortcodes/notice.en.md" %}}), [Expand]({{%relref "shortcodes/expand.en.md" %}})
|
||||
|
||||
![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow)
|
||||
|
||||
## Contribute to this documentation
|
||||
Feel free to update this content, just click the **Edit this page** link displayed on top right of each page, and pullrequest it
|
||||
|
||||
{{% notice info %}}
|
||||
Your modification will be deployed automatically when merged.
|
||||
{{% /notice %}}
|
||||
|
||||
## Documentation website
|
||||
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)
|
||||
|
||||
{{% notice note %}}
|
||||
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/)
|
||||
{{% /notice %}}
|
@ -1,43 +1,6 @@
|
||||
---
|
||||
title: "Learn Theme for Hugo"
|
||||
title: "Docs de RustDesk"
|
||||
---
|
||||
|
||||
# Thème Hugo learn
|
||||
# RustDesk
|
||||
|
||||
[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**.
|
||||
|
||||
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.
|
||||
|
||||
{{% 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"%}})
|
||||
{{% /notice %}}
|
||||
|
||||
## Fonctionnalités principales
|
||||
|
||||
* [Recherche automatique]({{%relref "basics/configuration/_index.md#activer-recherche" %}})
|
||||
* [Mode multi-langue]({{%relref "cont/i18n/_index.md" %}})
|
||||
* **Nombre de niveau infini dans le menu**
|
||||
* **Boutons suivant/précédent automatiquement générés pour naviguer entre les items du menu**
|
||||
* [Taille d'image, ombres...]({{%relref "cont/markdown.fr.md#images" %}})
|
||||
* [Fichiers joints]({{%relref "shortcodes/attachments.fr.md" %}})
|
||||
* [Lister les pages filles]({{%relref "shortcodes/children/_index.md" %}})
|
||||
* [Diagrammes Mermaid]({{%relref "shortcodes/mermaid.fr.md" %}}) (flowchart, sequence, gantt)
|
||||
* [Style configurable and variantes de couleurs]({{%relref "basics/style-customization/_index.md"%}})
|
||||
* [Boutons]({{%relref "shortcodes/button.fr.md" %}}), [Messages Astuce/Note/Info/Attention]({{%relref "shortcodes/notice.fr.md" %}}), [Expand]({{%relref "shortcodes/expand.fr.md" %}})
|
||||
|
||||
![Screenshot](https://github.com/matcornic/hugo-theme-learn/raw/master/images/screenshot.png?width=40pc&classes=shadow)
|
||||
|
||||
## Contribuer à cette documentation
|
||||
|
||||
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.
|
||||
|
||||
{{% notice info %}}
|
||||
Votre modification sera déployée automatiquement quand elle sera mergée.
|
||||
{{% /notice %}}
|
||||
|
||||
## Site de documentation
|
||||
|
||||
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)
|
||||
|
||||
{{% notice note %}}
|
||||
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)
|
||||
{{% /notice %}}
|
||||
|
5
content/_index.zh.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
title: "RustDesk文档"
|
||||
---
|
||||
|
||||
# RustDesk
|
@ -1,12 +0,0 @@
|
||||
---
|
||||
title: Basics
|
||||
weight: 5
|
||||
pre: "<b>1. </b>"
|
||||
chapter: true
|
||||
---
|
||||
|
||||
### Chapter 1
|
||||
|
||||
# Basics
|
||||
|
||||
Discover what this Hugo theme is all about and the core-concepts behind it.
|
@ -1,12 +0,0 @@
|
||||
---
|
||||
title: Démarrage
|
||||
weight: 5
|
||||
pre: "<b>1. </b>"
|
||||
chapter: true
|
||||
---
|
||||
|
||||
### Chapitre 1
|
||||
|
||||
# Démarrage
|
||||
|
||||
Découvrez comment utiliser ce thème Hugo et apprenez-en les concepts
|
@ -1,12 +0,0 @@
|
||||
---
|
||||
title: 基础
|
||||
weight: 5
|
||||
pre: "<b>1. </b>"
|
||||
chapter: true
|
||||
---
|
||||
|
||||
### 章节 1
|
||||
|
||||
# 基础
|
||||
|
||||
了解该 Hugo 主题的特点以及背后的核心概念。
|
@ -1,112 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Configuration
|
||||
weight: 20
|
||||
---
|
||||
|
||||
## Global site parameters
|
||||
|
||||
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).
|
||||
|
||||
Note that some of these parameters are explained in details in other sections of this documentation.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# 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 = ""
|
||||
# Author of the site, will be used in meta information
|
||||
author = ""
|
||||
# Description of the site, will be used in meta information
|
||||
description = ""
|
||||
# Shows a checkmark for visited pages on the menu
|
||||
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.
|
||||
# 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.
|
||||
disableShortcutsTitle = false
|
||||
# If set to false, a Home button will appear below the search bar on the menu.
|
||||
# It is redirecting to the landing page of the current language if specified. (Default is "/")
|
||||
disableLandingPageButton = true
|
||||
# When using mulitlingual website, disable the switch language button.
|
||||
disableLanguageSwitchingButton = false
|
||||
# Hide breadcrumbs in the header and only show the current page title
|
||||
disableBreadcrumb = true
|
||||
# If set to true, prevents Hugo from including the mermaid module if not needed (will reduce load times and traffic)
|
||||
disableMermaid = false
|
||||
# Specifies the remote location of the mermaid js
|
||||
customMermaidURL = "https://unpkg.com/mermaid@8.8.0/dist/mermaid.min.js"
|
||||
# Hide Next and Previous page buttons normally displayed full height beside content
|
||||
disableNextPrev = true
|
||||
# Order sections in menu by "weight" or "title". Default to "weight"
|
||||
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"]
|
||||
# Change the title separator. Default to "::".
|
||||
titleSeparator = "-"
|
||||
```
|
||||
|
||||
## Activate search
|
||||
|
||||
If not already present, add the follow lines in the same `config.toml` file.
|
||||
|
||||
```toml
|
||||
[outputs]
|
||||
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.
|
||||
> When you build the site with `hugo server`, hugo generates it internally and of course it doesn’t show up in the filesystem
|
||||
|
||||
## Mermaid
|
||||
|
||||
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.
|
||||
|
||||
> Example:
|
||||
>
|
||||
> Mermaid is globally disabled. By default it won't be loaded by any page.
|
||||
> 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).
|
||||
|
||||
You also can disable mermaid for specific pages while globally enabled.
|
||||
|
||||
## Home Button Configuration
|
||||
|
||||
If the `disableLandingPage` option is set to `false`, an Home button will appear
|
||||
on the left menu. It is an alternative for clicking on the logo. To edit the
|
||||
appearance, you will have to configure two parameters for the defined languages:
|
||||
|
||||
```toml
|
||||
[Lanugages]
|
||||
[Lanugages.en]
|
||||
...
|
||||
landingPageURL = "/en"
|
||||
landingPageName = "<i class='fas fa-home'></i> Redirect to Home"
|
||||
...
|
||||
[Lanugages.fr]
|
||||
...
|
||||
landingPageURL = "/fr"
|
||||
landingPageName = "<i class='fas fa-home'></i> Accueil"
|
||||
...
|
||||
```
|
||||
|
||||
If those params are not configured for a specific language, they will get their
|
||||
default values:
|
||||
|
||||
```toml
|
||||
landingPageURL = "/"
|
||||
landingPageName = "<i class='fas fa-home'></i> Home"
|
||||
```
|
||||
|
||||
The home button is going to looks like this:
|
||||
|
||||
![Default Home Button](/en/basics/configuration/images/home_button_defaults.jpg?width=100%)
|
@ -1,110 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Configuration
|
||||
weight: 20
|
||||
---
|
||||
|
||||
## Paramètres globaux du site
|
||||
|
||||
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).
|
||||
|
||||
Notez que certains de ces paramètres sont expliqués en détails dans d'autres sections de cette documentation.
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# 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.
|
||||
# Pratique pour donner les possibilité à vos utilisateurs de créer une merge request pour votre doc.
|
||||
# Allez voir le fichier config.toml de cette documentation pour avoir un exemple.
|
||||
editURL = ""
|
||||
# Autheur du site, est utilisé dans les informations meta
|
||||
author = ""
|
||||
# Description du site, est utilisé dans les informations meta
|
||||
description = ""
|
||||
# Affiche une icône lorsque la page a été visitée
|
||||
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.
|
||||
# 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.
|
||||
disableShortcutsTitle = false
|
||||
# S'il est réglé sur faux, un bouton Accueil apparaîtra sous la barre de recherche dans le menu.
|
||||
# Il redirige vers la page d'accueil de la langue actuelle si cela est spécifié. (La valeur par défaut est "/")
|
||||
disableLandingPageButton = true
|
||||
# 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)
|
||||
disableMermaid = false
|
||||
# Spécifie l'emplacement distant du mermaid js
|
||||
customMermaidURL = "https://unpkg.com/mermaid@8.8.0/dist/mermaid.min.js"
|
||||
# Quand vous utilisez un site multi-langue, utilisez ce paramètre pour désactiver le bouton de changement de langue.
|
||||
disableLanguageSwitchingButton = false
|
||||
# Ordonne les sections dans menu par poids ("weight") ou titre ("title"). Défaut à "weight"
|
||||
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}
|
||||
|
||||
Si ce n'est pas déjà présent, ajoutez les lignes suivantes dans le fichier `config.toml`.
|
||||
|
||||
```toml
|
||||
[outputs]
|
||||
home = [ "HTML", "RSS", "JSON"]
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
## Mermaid
|
||||
|
||||
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.
|
||||
|
||||
> Exemple:
|
||||
>
|
||||
> Mermaid est globalement handicapé. Par défaut, elle ne sera chargée par aucune page.
|
||||
> À 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).
|
||||
|
||||
Vous pouvez également désactiver mermaid pour des pages spécifiques tout en l'activant globalement.
|
||||
<<<<<<< HEAD
|
||||
|
||||
## Configuration du bouton Accueil
|
||||
|
||||
Si l'option `disableLandingPage` est définie sur `false`, un bouton
|
||||
"Accueil" apparaîtra dans le menu de gauche. C'est une alternative pour cliquer
|
||||
sur le logo. Pour modifier le vous devrez configurer deux paramètres pour les
|
||||
langues définies :
|
||||
|
||||
```toml
|
||||
[Lanugages]
|
||||
[Lanugages.en]
|
||||
...
|
||||
landingPageURL = "/en"
|
||||
landingPageName = "<i class='fas fa-home'></i> Redirect to Home"
|
||||
...
|
||||
[Lanugages.fr]
|
||||
...
|
||||
landingPageURL = "/fr"
|
||||
landingPageName = "<i class='fas fa-home'></i> Accueil"
|
||||
...
|
||||
```
|
||||
|
||||
Si ces paramètres ne sont pas configurés pour une langue spécifique, ils
|
||||
obtiendront leur valeurs par défaut:
|
||||
|
||||
```toml
|
||||
landingPageURL = "/"
|
||||
landingPageName = "<i class='fas fa-home'></i> Home"
|
||||
```
|
||||
|
||||
Le bouton d'accueil va ressembler à ceci:
|
||||
|
||||
![Default Home Button](/en/basics/configuration/images/home_button_defaults.jpg?width=100%)
|
||||
=======
|
||||
>>>>>>> 023fe7ef2b4c45fe66ac932d9e25d09f30b74a4e
|
Before Width: | Height: | Size: 9.1 KiB |
@ -1,102 +0,0 @@
|
||||
---
|
||||
title: Installation
|
||||
weight: 15
|
||||
---
|
||||
|
||||
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/).
|
||||
|
||||
## Create your project
|
||||
|
||||
Hugo provides a `new` command to create a new website.
|
||||
|
||||
```
|
||||
hugo new site <new_project>
|
||||
```
|
||||
|
||||
## Install the theme
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
## Basic configuration
|
||||
|
||||
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.
|
||||
|
||||
```toml
|
||||
# Change the default theme to be use when building the site with Hugo
|
||||
theme = "hugo-theme-learn"
|
||||
|
||||
# For search functionality
|
||||
[outputs]
|
||||
home = [ "HTML", "RSS", "JSON"]
|
||||
```
|
||||
|
||||
## Create your first chapter page
|
||||
|
||||
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.
|
||||
|
||||
```
|
||||
### Chapter 1
|
||||
|
||||
# Basics
|
||||
|
||||
Discover what this Hugo theme is all about and the core concepts behind it.
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||
![A Chapter](/en/basics/installation/images/chapter.png?classes=shadow&width=60pc)
|
||||
|
||||
**Hugo-theme-learn** provides archetypes to create skeletons for your website. Begin by creating your first chapter page with the following command
|
||||
|
||||
```
|
||||
hugo new --kind chapter basics/_index.md
|
||||
```
|
||||
|
||||
By opening the given file, you should see the property `chapter=true` on top, meaning this page is a _chapter_.
|
||||
|
||||
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.
|
||||
|
||||
## Create your first content pages
|
||||
|
||||
Then, create content pages inside the previously created chapter. Here are two ways to create content in the chapter:
|
||||
|
||||
```
|
||||
hugo new basics/first-content.md
|
||||
hugo new basics/second-content/_index.md
|
||||
```
|
||||
|
||||
Feel free to edit thoses files by adding some sample content and replacing the `title` value in the beginning of the files.
|
||||
|
||||
## Launching the website locally
|
||||
|
||||
Launch by using the following command:
|
||||
|
||||
```
|
||||
hugo serve
|
||||
```
|
||||
|
||||
Go to `http://localhost:1313`
|
||||
|
||||
You should notice three things:
|
||||
|
||||
1. You have a left-side **Basics** menu, containing two submenus with names equal to the `title` properties in the previously created files.
|
||||
2. The home page explains how to customize it by following the instructions.
|
||||
3. When you run `hugo serve`, when the contents of the files change, the page automatically refreshes with the changes. Neat!
|
||||
|
||||
## Build the website
|
||||
|
||||
When your site is ready to deploy, run the following command:
|
||||
|
||||
```
|
||||
hugo
|
||||
```
|
||||
|
||||
A `public` folder will be generated, containing all static content and assets for your website. It can now be deployed on any web server.
|
||||
|
||||
{{% notice note %}}
|
||||
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/)
|
||||
{{% /notice %}}
|
@ -1,100 +0,0 @@
|
||||
---
|
||||
title: Installation
|
||||
weight: 15
|
||||
---
|
||||
|
||||
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/).
|
||||
|
||||
## Créer votre projet
|
||||
|
||||
Hugo fournit une commande `new` pour créer un nouveau site.
|
||||
|
||||
```
|
||||
hugo new site <new_project>
|
||||
```
|
||||
|
||||
## Installer le thème
|
||||
|
||||
Installer le thème **Hugo-theme-learn** en suivant [cette documentation](https://gohugo.io/themes/installing/)
|
||||
|
||||
Le repo du thème est : https://github.com/matcornic/hugo-theme-learn.git
|
||||
|
||||
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.
|
||||
|
||||
## Configuration simple
|
||||
|
||||
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.
|
||||
|
||||
```toml
|
||||
# Modifiez le thème pour qu'il soit utilisé par défaut à chaque génération de site.
|
||||
theme = "hugo-theme-learn"
|
||||
|
||||
# Pour la fonctionnalité de recherche
|
||||
[outputs]
|
||||
home = [ "HTML", "RSS", "JSON"]
|
||||
```
|
||||
|
||||
## Créer votre première page chapitre
|
||||
|
||||
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.
|
||||
|
||||
```
|
||||
### Chapitre 1
|
||||
|
||||
# Démarrage
|
||||
|
||||
Découvrez comment utiliser ce thème Hugo et apprenez en les concepts
|
||||
```
|
||||
|
||||
s'affiche comme
|
||||
|
||||
![Un chapitre](/en/basics/installation/images/chapter.png?classes=shadow&width=60pc)
|
||||
|
||||
**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:
|
||||
|
||||
```
|
||||
hugo new --kind chapter basics/_index.md
|
||||
```
|
||||
|
||||
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_.
|
||||
|
||||
## Créer votre première page
|
||||
|
||||
Puis, créez votre premier page dans le chapitre précédent. Pour ce faire, il existe deux possibilités :
|
||||
|
||||
```
|
||||
hugo new basics/first-content.md
|
||||
hugo new basics/second-content/_index.md
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
## Lancer le site localement
|
||||
|
||||
Lancez la commande suivante :
|
||||
|
||||
```
|
||||
hugo serve
|
||||
```
|
||||
|
||||
Se rendre sur `http://localhost:1313`
|
||||
|
||||
Vous devriez voir trois choses:
|
||||
|
||||
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.
|
||||
2. La page d'accueil vous explique comment la modifier. Suivez les instructions.
|
||||
3. Avec la commande `hugo serve`, la page se rafraichit automatiquement à chaque fois que vous sauvegardez. Super !
|
||||
|
||||
## Générez le site
|
||||
|
||||
Quand votre site est prêt à être déployé, lancez la commande suivante:
|
||||
|
||||
```
|
||||
hugo
|
||||
```
|
||||
|
||||
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 !
|
||||
|
||||
{{% notice note %}}
|
||||
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/)
|
||||
{{% /notice %}}
|
Before Width: | Height: | Size: 47 KiB |
@ -1,11 +0,0 @@
|
||||
---
|
||||
title: Requirements
|
||||
weight: 10
|
||||
disableToc: true
|
||||
---
|
||||
|
||||
Thanks to the simplicity of Hugo, this page is as empty as this theme needs requirements.
|
||||
|
||||
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.
|
||||
|
||||
![Magic](/en/basics/requirements/images/magic.gif?classes=shadow)
|
@ -1,11 +0,0 @@
|
||||
---
|
||||
title: Prérequis
|
||||
weight: 10
|
||||
disableToc: true
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
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 !
|
||||
|
||||
![Magic](/en/basics/requirements/images/magic.gif?classes=shadow)
|
Before Width: | Height: | Size: 1.4 MiB |
@ -1,194 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Style customization
|
||||
weight: 25
|
||||
---
|
||||
|
||||
**Hugo-theme-learn** has been built to be as configurable as possible by defining multiple [partials](https://gohugo.io/templates/partials/)
|
||||
|
||||
In `themes/hugo-theme-learn/layouts/partials/`, you will find all the partials defined for this theme. If you need to overwrite something, don't change the code directly. Instead [follow this page](https://gohugo.io/themes/customizing/). You'd create a new partial in the `layouts/partials` folder of your local project. This partial will have the priority.
|
||||
|
||||
This theme defines the following partials :
|
||||
|
||||
- *header*: the header of the content page (contains the breadcrumbs). _Not meant to be overwritten_
|
||||
- *custom-header*: custom headers in page. Meant to be overwritten when adding CSS imports. Don't forget to include `style` HTML tag directive in your file
|
||||
- *footer*: the footer of the content page (contains the arrows). _Not meant to be overwritten_
|
||||
- *custom-footer*: custom footer in page. Meant to be overwritten when adding Javacript. Don't forget to include `javascript` HTML tag directive in your file
|
||||
- *favicon*: the favicon
|
||||
- *logo*: the logo, on top left hand corner.
|
||||
- *meta*: HTML meta tags, if you want to change default behavior
|
||||
- *menu*: left menu. _Not meant to be overwritten_
|
||||
- *menu-footer*: footer of the the left menu
|
||||
- *search*: search box
|
||||
- *toc*: table of contents
|
||||
|
||||
## Change the logo
|
||||
|
||||
Create a new file in `layouts/partials/` named `logo.html`. Then write any HTML you want.
|
||||
You could use an `img` HTML tag and reference an image created under the *static* folder, or you could paste a SVG definition !
|
||||
|
||||
{{% notice note %}}
|
||||
The size of the logo will adapt automatically
|
||||
{{% /notice %}}
|
||||
|
||||
## Change the favicon
|
||||
|
||||
If your favicon is a png, just drop off your image in your local `static/images/` folder and name it `favicon.png`
|
||||
|
||||
If you need to change this default behavior, create a new file in `layouts/partials/` named `favicon.html`. Then write something like this:
|
||||
|
||||
```html
|
||||
<link rel="shortcut icon" href="/images/favicon.png" type="image/x-icon" />
|
||||
```
|
||||
|
||||
## Change default colors {#theme-variant}
|
||||
|
||||
**Hugo Learn theme** let you choose between 3 native color scheme variants, but feel free to add one yourself ! Default color scheme is based on [Grav Learn Theme](https://learn.getgrav.org/).
|
||||
|
||||
### Red variant
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Change default color scheme with a variant one. Can be "red", "blue", "green".
|
||||
themeVariant = "red"
|
||||
```
|
||||
|
||||
![Red variant](/en/basics/style-customization/images/red-variant.png?width=60pc)
|
||||
|
||||
### Blue variant
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Change default color scheme with a variant one. Can be "red", "blue", "green".
|
||||
themeVariant = "blue"
|
||||
```
|
||||
|
||||
![Blue variant](/en/basics/style-customization/images/blue-variant.png?width=60pc)
|
||||
|
||||
### Green variant
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Change default color scheme with a variant one. Can be "red", "blue", "green".
|
||||
themeVariant = "green"
|
||||
```
|
||||
|
||||
![Green variant](/en/basics/style-customization/images/green-variant.png?width=60pc)
|
||||
|
||||
### 'Yours‘ variant
|
||||
|
||||
First, create a new CSS file in your local `static/css` folder prefixed by `theme` (e.g. with _mine_ theme `static/css/theme-mine.css`). Copy the following content and modify colors in CSS variables.
|
||||
|
||||
```css
|
||||
|
||||
:root{
|
||||
|
||||
--MAIN-TEXT-color:#323232; /* Color of text by default */
|
||||
--MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */
|
||||
--MAIN-LINK-color:#1C90F3; /* Color of links */
|
||||
--MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */
|
||||
--MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */
|
||||
|
||||
--MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */
|
||||
--MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */
|
||||
|
||||
--MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */
|
||||
--MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */
|
||||
--MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */
|
||||
|
||||
--MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */
|
||||
--MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */
|
||||
--MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */
|
||||
--MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */
|
||||
--MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */
|
||||
--MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */
|
||||
|
||||
--MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */
|
||||
--MENU-SECTION-HR-color: #20272b; /* Color of <hr> separator in menu */
|
||||
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--MAIN-TEXT-color) !important;
|
||||
}
|
||||
|
||||
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 {
|
||||
border-color: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
h2, h3, h4, h5 {
|
||||
color: var(--MAIN-TITLES-TEXT-color) !important;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--MAIN-LINK-color);
|
||||
}
|
||||
|
||||
.anchor {
|
||||
color: var(--MAIN-ANCHOR-color);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--MAIN-LINK-HOVER-color);
|
||||
}
|
||||
|
||||
#sidebar ul li.visited > a .read-icon {
|
||||
color: var(--MENU-VISITED-color);
|
||||
}
|
||||
|
||||
#body a.highlight:after {
|
||||
display: block;
|
||||
content: "";
|
||||
height: 1px;
|
||||
width: 0%;
|
||||
-webkit-transition: width 0.5s ease;
|
||||
-moz-transition: width 0.5s ease;
|
||||
-ms-transition: width 0.5s ease;
|
||||
transition: width 0.5s ease;
|
||||
background-color: var(--MAIN-LINK-HOVER-color);
|
||||
}
|
||||
#sidebar {
|
||||
background-color: var(--MENU-SECTIONS-BG-color);
|
||||
}
|
||||
#sidebar #header-wrapper {
|
||||
background: var(--MENU-HEADER-BG-color);
|
||||
color: var(--MENU-SEARCH-BOX-color);
|
||||
border-color: var(--MENU-HEADER-BORDER-color);
|
||||
}
|
||||
#sidebar .searchbox {
|
||||
border-color: var(--MENU-SEARCH-BOX-color);
|
||||
background: var(--MENU-SEARCH-BG-color);
|
||||
}
|
||||
#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active {
|
||||
background: var(--MENU-SECTIONS-ACTIVE-BG-color);
|
||||
}
|
||||
#sidebar .searchbox * {
|
||||
color: var(--MENU-SEARCH-BOX-ICONS-color);
|
||||
}
|
||||
|
||||
#sidebar a {
|
||||
color: var(--MENU-SECTIONS-LINK-color);
|
||||
}
|
||||
|
||||
#sidebar a:hover {
|
||||
color: var(--MENU-SECTIONS-LINK-HOVER-color);
|
||||
}
|
||||
|
||||
#sidebar ul li.active > a {
|
||||
background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color);
|
||||
color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important;
|
||||
}
|
||||
|
||||
#sidebar hr {
|
||||
border-color: var(--MENU-SECTION-HR-color);
|
||||
}
|
||||
```
|
||||
|
||||
Then, set the `themeVariant` value with the name of your custom theme file. That's it !
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Change default color scheme with a variant one. Can be "red", "blue", "green".
|
||||
themeVariant = "mine"
|
||||
```
|
@ -1,194 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Personnalisation du style
|
||||
weight: 25
|
||||
---
|
||||
|
||||
**Hugo-theme-learn** a été conçu pour être aussi configurable que possible en définissant plusieurs [partials](https://gohugo.io/templates/partials/)
|
||||
|
||||
Dans `themes/hugo-theme-learn/layouts/partials/`, vous pourrez trouver tous les *partials* définis pour ce thème. Si vous avez besoin d'écraser quelque chose, ne modifiez pas le code directement. A la place, [suivez cette page](https://gohugo.io/themes/customizing/). Vous créerez alors un nouveau *partial* dans le dossier `layouts/partials` de votre site local. Ce *partial* aura la priorité.
|
||||
|
||||
Ce thème définit les *partials* suivant :
|
||||
|
||||
- *header*: l'en-tête de la page page (contient le fil d'Ariane). _Pas voué à être écrasé_
|
||||
- *custom-header*: En-tête personnalisé. Voué à être écrasé quand vous ajoutez des imports CSS. N'oubliez pas d'inclure la balise HTML `style` dans votre fichier
|
||||
- *footer*: le pied-de-page de la page (contains les flèches). _Pas voué à être écrasé_
|
||||
- *custom-footer*: Pied-de-page personnalisé. Voué à être écrasé quand vous ajoutez du Javascript. N'oubliez pas d'inclure la balise HTML `javascript` dans votre fichier
|
||||
- *favicon*: le favicon
|
||||
- *logo*: le logo, affiché un haut à gauche.
|
||||
- *meta*: les balises HTML meta, que vous pouvez écraser sans problème.
|
||||
- *menu*: Le menu à gauche. _Pas voué à être écrasé_
|
||||
- *menu-footer*: Le pied-de-page du menu
|
||||
- *search*: le champ de recherche
|
||||
- *toc*: le sommaire
|
||||
|
||||
## Changer le logo
|
||||
|
||||
Créez un nouveau fichier dans `layouts/partials/`, nommé `logo.html`. Puis, écrivez le code HTML voulu.
|
||||
Vous pourriez utiliser une balise HTML `img` et référencer une image créée dans le dossier *static*, voire même y coller un code SVG !
|
||||
|
||||
{{% notice note %}}
|
||||
La taille du logo va s'adapter automatiquement
|
||||
{{% /notice %}}
|
||||
|
||||
## Changer le favicon
|
||||
|
||||
Si votre favicon est un png, déposez votre image dans votre dossier local `static/images/` et nommez le `favicon.png`
|
||||
|
||||
Si vous avez besoin de changer ce comportement par défaut, créer un nouveau fichier dans `layouts/partials/` et nommez le `favicon.html`. Puis ajoutez quelque chose comme:
|
||||
|
||||
```html
|
||||
<link rel="shortcut icon" href="/images/favicon.png" type="image/x-icon" />
|
||||
```
|
||||
|
||||
## Changer les couleurs par défaut {#theme-variant}
|
||||
|
||||
**Hugo Learn theme** vous permet de choisir nativement entre 3 schéma de couleurs, mais n'hésitez pas à en ajouter d'autres ! Les couleurs par défaut sont celles de [Grav Learn Theme](https://learn.getgrav.org/).
|
||||
|
||||
### Variante rouge
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green".
|
||||
themeVariant = "red"
|
||||
```
|
||||
|
||||
![Variante rouge](/en/basics/style-customization/images/red-variant.png?width=60pc)
|
||||
|
||||
### Variante bleue
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green".
|
||||
themeVariant = "blue"
|
||||
```
|
||||
|
||||
![Variante bleue](/en/basics/style-customization/images/blue-variant.png?width=60pc)
|
||||
|
||||
### Variante verte
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green".
|
||||
themeVariant = "green"
|
||||
```
|
||||
|
||||
![Variante verte](/en/basics/style-customization/images/green-variant.png?width=60pc)
|
||||
|
||||
### Votre variante
|
||||
|
||||
Premièrement, créez un nouveau fichier CSS dans votre dossier `static/css`, préfixé par `theme` (ex: avec le theme_lemien_ `static/css/theme-lemien.css`). Copiez le contenu suivant et modifiez les couleurs dans les variables CSS.
|
||||
|
||||
```css
|
||||
|
||||
:root{
|
||||
|
||||
--MAIN-TEXT-color:#323232; /* Color of text by default */
|
||||
--MAIN-TITLES-TEXT-color: #5e5e5e; /* Color of titles h2-h3-h4-h5 */
|
||||
--MAIN-LINK-color:#1C90F3; /* Color of links */
|
||||
--MAIN-LINK-HOVER-color:#167ad0; /* Color of hovered links */
|
||||
--MAIN-ANCHOR-color: #1C90F3; /* color of anchors on titles */
|
||||
|
||||
--MENU-HEADER-BG-color:#1C90F3; /* Background color of menu header */
|
||||
--MENU-HEADER-BORDER-color:#33a1ff; /*Color of menu header border */
|
||||
|
||||
--MENU-SEARCH-BG-color:#167ad0; /* Search field background color (by default borders + icons) */
|
||||
--MENU-SEARCH-BOX-color: #33a1ff; /* Override search field border color */
|
||||
--MENU-SEARCH-BOX-ICONS-color: #a1d2fd; /* Override search field icons color */
|
||||
|
||||
--MENU-SECTIONS-ACTIVE-BG-color:#20272b; /* Background color of the active section and its childs */
|
||||
--MENU-SECTIONS-BG-color:#252c31; /* Background color of other sections */
|
||||
--MENU-SECTIONS-LINK-color: #ccc; /* Color of links in menu */
|
||||
--MENU-SECTIONS-LINK-HOVER-color: #e6e6e6; /* Color of links in menu, when hovered */
|
||||
--MENU-SECTION-ACTIVE-CATEGORY-color: #777; /* Color of active category text */
|
||||
--MENU-SECTION-ACTIVE-CATEGORY-BG-color: #fff; /* Color of background for the active category (only) */
|
||||
|
||||
--MENU-VISITED-color: #33a1ff; /* Color of 'page visited' icons in menu */
|
||||
--MENU-SECTION-HR-color: #20272b; /* Color of <hr> separator in menu */
|
||||
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--MAIN-TEXT-color) !important;
|
||||
}
|
||||
|
||||
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 {
|
||||
border-color: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
h2, h3, h4, h5 {
|
||||
color: var(--MAIN-TITLES-TEXT-color) !important;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--MAIN-LINK-color);
|
||||
}
|
||||
|
||||
.anchor {
|
||||
color: var(--MAIN-ANCHOR-color);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--MAIN-LINK-HOVER-color);
|
||||
}
|
||||
|
||||
#sidebar ul li.visited > a .read-icon {
|
||||
color: var(--MENU-VISITED-color);
|
||||
}
|
||||
|
||||
#body a.highlight:after {
|
||||
display: block;
|
||||
content: "";
|
||||
height: 1px;
|
||||
width: 0%;
|
||||
-webkit-transition: width 0.5s ease;
|
||||
-moz-transition: width 0.5s ease;
|
||||
-ms-transition: width 0.5s ease;
|
||||
transition: width 0.5s ease;
|
||||
background-color: var(--MAIN-LINK-HOVER-color);
|
||||
}
|
||||
#sidebar {
|
||||
background-color: var(--MENU-SECTIONS-BG-color);
|
||||
}
|
||||
#sidebar #header-wrapper {
|
||||
background: var(--MENU-HEADER-BG-color);
|
||||
color: var(--MENU-SEARCH-BOX-color);
|
||||
border-color: var(--MENU-HEADER-BORDER-color);
|
||||
}
|
||||
#sidebar .searchbox {
|
||||
border-color: var(--MENU-SEARCH-BOX-color);
|
||||
background: var(--MENU-SEARCH-BG-color);
|
||||
}
|
||||
#sidebar ul.topics > li.parent, #sidebar ul.topics > li.active {
|
||||
background: var(--MENU-SECTIONS-ACTIVE-BG-color);
|
||||
}
|
||||
#sidebar .searchbox * {
|
||||
color: var(--MENU-SEARCH-BOX-ICONS-color);
|
||||
}
|
||||
|
||||
#sidebar a {
|
||||
color: var(--MENU-SECTIONS-LINK-color);
|
||||
}
|
||||
|
||||
#sidebar a:hover {
|
||||
color: var(--MENU-SECTIONS-LINK-HOVER-color);
|
||||
}
|
||||
|
||||
#sidebar ul li.active > a {
|
||||
background: var(--MENU-SECTION-ACTIVE-CATEGORY-BG-color);
|
||||
color: var(--MENU-SECTION-ACTIVE-CATEGORY-color) !important;
|
||||
}
|
||||
|
||||
#sidebar hr {
|
||||
border-color: var(--MENU-SECTION-HR-color);
|
||||
}
|
||||
```
|
||||
|
||||
Puis, configurez le paramètre `themeVariant` avec le nom de votre variante. C'est tout !
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Modifier le schéma de couleur par défaut. Peut être "red", "blue", "green".
|
||||
themeVariant = "lemien"
|
||||
```
|
Before Width: | Height: | Size: 239 KiB |
Before Width: | Height: | Size: 240 KiB |
Before Width: | Height: | Size: 239 KiB |
@ -1,12 +0,0 @@
|
||||
---
|
||||
title: Content
|
||||
weight: 10
|
||||
chapter: true
|
||||
pre: "<b>2. </b>"
|
||||
---
|
||||
|
||||
### Chapter 2
|
||||
|
||||
# Content
|
||||
|
||||
Find out how to create and organize your content quickly and intuitively.
|
@ -1,12 +0,0 @@
|
||||
---
|
||||
title: Contenu
|
||||
weight: 10
|
||||
chapter: true
|
||||
pre: "<b>2. </b>"
|
||||
---
|
||||
|
||||
### Chapitre 2
|
||||
|
||||
# Contenu
|
||||
|
||||
Découvrez comment créer et organiser votre contenu facilement et intuitivement.
|
@ -1,57 +0,0 @@
|
||||
---
|
||||
title: Archetypes
|
||||
weight: 10
|
||||
---
|
||||
|
||||
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/).
|
||||
|
||||
It is pre-configured skeleton pages with default front matter. Please refer to the documentation for types of page to understand the differences.
|
||||
|
||||
## Chapter {#archetypes-chapter}
|
||||
|
||||
To create a Chapter page, run the following commands
|
||||
|
||||
```
|
||||
hugo new --kind chapter <name>/_index.md
|
||||
```
|
||||
|
||||
It will create a page with predefined Front-Matter:
|
||||
|
||||
```markdown
|
||||
+++
|
||||
title = "{{ replace .Name "-" " " | title }}"
|
||||
date = {{ .Date }}
|
||||
weight = 5
|
||||
chapter = true
|
||||
pre = "<b>X. </b>"
|
||||
+++
|
||||
|
||||
### Chapter X
|
||||
|
||||
# Some Chapter title
|
||||
|
||||
Lorem Ipsum.
|
||||
```
|
||||
|
||||
## Default
|
||||
|
||||
To create a default page, run either one of the following commands
|
||||
|
||||
```
|
||||
# Either
|
||||
hugo new <chapter>/<name>/_index.md
|
||||
# Or
|
||||
hugo new <chapter>/<name>.md
|
||||
```
|
||||
|
||||
It will create a page with predefined Front-Matter:
|
||||
|
||||
```markdown
|
||||
+++
|
||||
title = "{{ replace .Name "-" " " | title }}"
|
||||
date = {{ .Date }}
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
Lorem Ipsum.
|
||||
```
|
@ -1,57 +0,0 @@
|
||||
---
|
||||
title: Archétypes
|
||||
weight: 10
|
||||
---
|
||||
|
||||
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/).
|
||||
|
||||
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.
|
||||
|
||||
## Chapitre {#archetypes-chapter}
|
||||
|
||||
Pour créer un chapitre, lancez les commandes suivantes
|
||||
|
||||
```
|
||||
hugo new --kind chapter <name>/_index.md
|
||||
```
|
||||
|
||||
Cela crééra une page avec le Front Matter suivant:
|
||||
|
||||
```markdown
|
||||
+++
|
||||
title = "{{ replace .Name "-" " " | title }}"
|
||||
date = {{ .Date }}
|
||||
weight = 5
|
||||
chapter = true
|
||||
pre = "<b>X. </b>"
|
||||
+++
|
||||
|
||||
### Chapter X
|
||||
|
||||
# Some Chapter title
|
||||
|
||||
Lorem Ipsum.
|
||||
```
|
||||
|
||||
## Défaut
|
||||
|
||||
Pour créer une page classique, lancer l'une des deux commandes suivantes
|
||||
|
||||
```
|
||||
# Soit
|
||||
hugo new <chapter>/<name>/_index.md
|
||||
# Ou
|
||||
hugo new <chapter>/<name>.md
|
||||
```
|
||||
|
||||
Cela crééra une page avec le Front Matter suivant:
|
||||
|
||||
```markdown
|
||||
+++
|
||||
title = "{{ replace .Name "-" " " | title }}"
|
||||
date = {{ .Date }}
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
Lorem Ipsum.
|
||||
```
|
@ -1,78 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Multilingual and i18n
|
||||
weight: 30
|
||||
---
|
||||
|
||||
**Learn theme** is fully compatible with Hugo multilingual mode.
|
||||
|
||||
It provides:
|
||||
|
||||
- Translation strings for default values (English and French). Feel free to contribute !
|
||||
- Automatic menu generation from multilingual content
|
||||
- In-browser language switching
|
||||
|
||||
![I18n menu](/en/cont/i18n/images/i18n-menu.gif)
|
||||
|
||||
## Basic configuration
|
||||
|
||||
After learning [how Hugo handle multilingual websites](https://gohugo.io/content-management/multilingual), define your languages in your `config.toml` file.
|
||||
|
||||
For example with current French and English website.
|
||||
|
||||
```toml
|
||||
# English is the default language
|
||||
defaultContentLanguage = "en"
|
||||
# Force to have /en/my-page and /fr/my-page routes, even for default language.
|
||||
defaultContentLanguageInSubdir= true
|
||||
|
||||
[Languages]
|
||||
[Languages.en]
|
||||
title = "Documentation for Hugo Learn Theme"
|
||||
weight = 1
|
||||
languageName = "English"
|
||||
|
||||
[Languages.fr]
|
||||
title = "Documentation du thème Hugo Learn"
|
||||
weight = 2
|
||||
languageName = "Français"
|
||||
```
|
||||
|
||||
Then, for each new page, append the *id* of the language to the file.
|
||||
|
||||
- Single file `my-page.md` is split in two files:
|
||||
- in English: `my-page.en.md`
|
||||
- in French: `my-page.fr.md`
|
||||
- Single file `_index.md` is split in two files:
|
||||
- in English: `_index.en.md`
|
||||
- in French: `_index.fr.md`
|
||||
|
||||
{{% notice info %}}
|
||||
Be aware that only translated pages are displayed in menu. It's not replaced with default language content.
|
||||
{{% /notice %}}
|
||||
|
||||
{{% notice tip %}}
|
||||
Use [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) Front Matter parameter to translate urls too.
|
||||
{{% /notice %}}
|
||||
|
||||
## Overwrite translation strings
|
||||
|
||||
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.
|
||||
|
||||
To override these values, create a new file in your local i18n folder `i18n/<idlanguage>.toml` and inspire yourself from the theme `themes/hugo-theme-learn/i18n/en.toml`
|
||||
|
||||
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 !
|
||||
|
||||
## Disable language switching
|
||||
|
||||
Switching the language in the browser is a great feature, but for some reasons you may want to disable it.
|
||||
|
||||
Just set `disableLanguageSwitchingButton=true` in your `config.toml`
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# When using mulitlingual website, disable the switch language button.
|
||||
disableLanguageSwitchingButton = true
|
||||
```
|
||||
|
||||
![I18n menu](/en/cont/i18n/images/i18n-menu.gif)
|
@ -1,78 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Multi-langue et i18n
|
||||
weight: 30
|
||||
---
|
||||
|
||||
**Learn** est complètement compatible avec le mode multi-langue d'Hugo.
|
||||
|
||||
Il fournit :
|
||||
|
||||
- Des *translation strings* pour les valeurs par défaut utilisées par le thème (Anglais et Français). N'hésitez pas à contribuer !
|
||||
- Génération automatique du menu avec le contenu multi-langue
|
||||
- Modification de la langue dans le navigateur
|
||||
|
||||
![I18n menu](/en/cont/i18n/images/i18n-menu.gif)
|
||||
|
||||
## Configuration simple
|
||||
|
||||
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`.
|
||||
|
||||
Par exemple, pour ce site, avec du contenu en français et en anglais.
|
||||
|
||||
```toml
|
||||
# Anglais est la langue par défaut
|
||||
defaultContentLanguage = "en"
|
||||
# Force d'avoir /en/ma-page et /fr/ma-page routes, même avec la langue par défaut.
|
||||
defaultContentLanguageInSubdir= true
|
||||
|
||||
[Languages]
|
||||
[Languages.en]
|
||||
title = "Documentation for Hugo Learn Theme"
|
||||
weight = 1
|
||||
languageName = "English"
|
||||
|
||||
[Languages.fr]
|
||||
title = "Documentation du thème Hugo Learn"
|
||||
weight = 2
|
||||
languageName = "Français"
|
||||
```
|
||||
|
||||
Puis, pour chaque nouvelle page, ajoutez *l'id* de la langue du fichier.
|
||||
|
||||
- Le fichier `my-page.md` est découpé en deux fichiers :
|
||||
- en anglais : `my-page.en.md`
|
||||
- en français : `my-page.fr.md`
|
||||
- Le fichier `_index.md` est découpé en deux fichiers :
|
||||
- en anglais: `_index.en.md`
|
||||
- en français: `_index.fr.md`
|
||||
|
||||
{{% notice info %}}
|
||||
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.
|
||||
{{% /notice %}}
|
||||
|
||||
{{% notice tip %}}
|
||||
Utilisez le paramètre du Front Matter [slug](https://gohugo.io/content-management/multilingual/#translate-your-content) pour traduire également les URLs.
|
||||
{{% /notice %}}
|
||||
|
||||
## Surcharger les *translation strings*
|
||||
|
||||
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.
|
||||
|
||||
Pour surcharger ces valeurs, créer un nouveau fichier dans votre dossier i18n local `i18n/<idlanguage>.toml` et inspirez vous du thème `themes/hugo-theme-learn/i18n/en.toml`
|
||||
|
||||
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) !
|
||||
|
||||
## Désactiver le changement de langue
|
||||
|
||||
Vous pouvez changer de langue directement dans le navigateur. C'est une super fonctionnalité, mais vous avez peut-être besoin de la désactiver.
|
||||
|
||||
Pour ce faire, ajouter le paramètre `disableLanguageSwitchingButton=true` dans votre `config.toml`
|
||||
|
||||
```toml
|
||||
[params]
|
||||
# Quand vous utilisez un site en multi-langue, désactive le bouton de changment de langue.
|
||||
disableLanguageSwitchingButton = true
|
||||
```
|
||||
|
||||
![I18n menu](/en/cont/i18n/images/i18n-menu.gif)
|
Before Width: | Height: | Size: 24 KiB |
@ -1,41 +0,0 @@
|
||||
---
|
||||
title: Icons and logos
|
||||
weight: 27
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
## Finding an icon
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
The HTML to include the heart icon is:
|
||||
|
||||
```
|
||||
<i class="fas fa-heart"></i>
|
||||
```
|
||||
|
||||
## Including in markdown
|
||||
|
||||
Paste the `<i>` HTML into markup and Font Awesome will load the relevant icon.
|
||||
|
||||
```
|
||||
Built with <i class="fas fa-heart"></i> from Grav and Hugo
|
||||
```
|
||||
|
||||
Which appears as
|
||||
|
||||
Built with <i class="fas fa-heart"></i> from Grav and Hugo
|
||||
|
||||
## Customising icons
|
||||
|
||||
Font Awesome provides many ways to modify the icon
|
||||
|
||||
* Change colour (by default the icon will inherit the parent colour)
|
||||
* Increase or decrease size
|
||||
* Rotate
|
||||
* Combine with other icons
|
||||
|
||||
Check the full documentation on [web fonts with CSS](https://fontawesome.com/how-to-use/web-fonts-with-css) for more.
|
@ -1,692 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Markdown syntax
|
||||
weight: 15
|
||||
---
|
||||
|
||||
{{% notice note %}}
|
||||
This page is a shameful copy of the great [Grav original page](http://learn.getgrav.org/content/markdown).
|
||||
Only difference is information about image customization ([resizing]({{< relref "#resizing-image" >}}), [add CSS classes]({{< relref "#add-css-classes" >}})...)
|
||||
{{% /notice%}}
|
||||
|
||||
Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages.
|
||||
|
||||
**Markdown** is a better way to write **HTML**, without all the complexities and ugliness that usually accompanies it.
|
||||
|
||||
Some of the key benefits are:
|
||||
|
||||
1. Markdown is simple to learn, with minimal extra characters so it's also quicker to write content.
|
||||
2. Less chance of errors when writing in markdown.
|
||||
3. Produces valid XHTML output.
|
||||
4. Keeps the content and the visual display separate, so you cannot mess up the look of your site.
|
||||
5. Write in any text editor or Markdown application you like.
|
||||
6. Markdown is a joy to use!
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like:
|
||||
|
||||
{{% notice info %}}
|
||||
<i class="fas fa-bookmark"></i> Bookmark this page for easy future reference!
|
||||
{{% /notice %}}
|
||||
|
||||
## Headings
|
||||
|
||||
Headings from `h1` through `h6` are constructed with a `#` for each level:
|
||||
|
||||
```markdown
|
||||
# h1 Heading
|
||||
## h2 Heading
|
||||
### h3 Heading
|
||||
#### h4 Heading
|
||||
##### h5 Heading
|
||||
###### h6 Heading
|
||||
```
|
||||
|
||||
Renders to:
|
||||
<!-- markdownlint-disable MD025 -->
|
||||
# h1 Heading
|
||||
<!-- markdownlint-enable MD025 -->
|
||||
|
||||
## h2 Heading
|
||||
|
||||
### h3 Heading
|
||||
|
||||
#### h4 Heading
|
||||
|
||||
##### h5 Heading
|
||||
|
||||
###### h6 Heading
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<h1>h1 Heading</h1>
|
||||
<h2>h2 Heading</h2>
|
||||
<h3>h3 Heading</h3>
|
||||
<h4>h4 Heading</h4>
|
||||
<h5>h5 Heading</h5>
|
||||
<h6>h6 Heading</h6>
|
||||
```
|
||||
|
||||
## Comments
|
||||
|
||||
Comments should be HTML compatible
|
||||
|
||||
```html
|
||||
<!--
|
||||
This is a comment
|
||||
-->
|
||||
```
|
||||
|
||||
Comment below should **NOT** be seen:
|
||||
|
||||
<!--
|
||||
This is a comment
|
||||
-->
|
||||
|
||||
## Horizontal Rules
|
||||
|
||||
The HTML `<hr>` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a `<hr>` with any of the following:
|
||||
|
||||
* `___`: three consecutive underscores
|
||||
* `---`: three consecutive dashes
|
||||
* `***`: three consecutive asterisks
|
||||
|
||||
renders to:
|
||||
|
||||
___
|
||||
|
||||
## Body Copy
|
||||
|
||||
Body copy written as normal, plain text will be wrapped with `<p></p>` tags in the rendered HTML.
|
||||
|
||||
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
|
||||
<p>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.</p>
|
||||
```
|
||||
|
||||
## Emphasis
|
||||
|
||||
### Bold
|
||||
|
||||
For emphasizing a snippet of text with a heavier font-weight.
|
||||
|
||||
The following snippet of text is **rendered as bold text**.
|
||||
|
||||
```markdown
|
||||
**rendered as bold text**
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
<!-- markdownlint-disable MD036 -->
|
||||
**rendered as bold text**
|
||||
<!-- markdownlint-enable MD036 -->
|
||||
|
||||
and this HTML
|
||||
|
||||
```html
|
||||
<strong>rendered as bold text</strong>
|
||||
```
|
||||
|
||||
### Italics
|
||||
|
||||
For emphasizing a snippet of text with italics.
|
||||
|
||||
The following snippet of text is _rendered as italicized text_.
|
||||
|
||||
```markdown
|
||||
_rendered as italicized text_
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
<!-- markdownlint-disable MD036 -->
|
||||
_rendered as italicized text_
|
||||
<!-- markdownlint-enable MD036 -->
|
||||
|
||||
and this HTML:
|
||||
|
||||
```html
|
||||
<em>rendered as italicized text</em>
|
||||
```
|
||||
|
||||
### Strikethrough
|
||||
|
||||
In GFM (GitHub flavored Markdown) you can do strikethroughs.
|
||||
|
||||
```markdown
|
||||
~~Strike through this text.~~
|
||||
```
|
||||
|
||||
Which renders to:
|
||||
|
||||
~~Strike through this text.~~
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<del>Strike through this text.</del>
|
||||
```
|
||||
|
||||
## Blockquotes
|
||||
|
||||
For quoting blocks of content from another source within your document.
|
||||
|
||||
Add `>` before any text you want to quote.
|
||||
|
||||
```markdown
|
||||
> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
|
||||
|
||||
and this HTML:
|
||||
|
||||
```html
|
||||
<blockquote>
|
||||
<p><strong>Fusion Drive</strong> combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.</p>
|
||||
</blockquote>
|
||||
```
|
||||
|
||||
Blockquotes can also be nested:
|
||||
|
||||
```markdown
|
||||
> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
|
||||
>
|
||||
> > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
|
||||
>
|
||||
> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
|
||||
>
|
||||
> > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
|
||||
>
|
||||
> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.
|
||||
|
||||
## Notices
|
||||
|
||||
{{% notice note %}}
|
||||
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:
|
||||
|
||||
```markdown
|
||||
* valid bullet
|
||||
- valid bullet
|
||||
+ valid bullet
|
||||
```
|
||||
|
||||
For example
|
||||
|
||||
```markdown
|
||||
+ Lorem ipsum dolor sit amet
|
||||
+ Consectetur adipiscing elit
|
||||
+ Integer molestie lorem at massa
|
||||
+ Facilisis in pretium nisl aliquet
|
||||
+ Nulla volutpat aliquam velit
|
||||
- Phasellus iaculis neque
|
||||
- Purus sodales ultricies
|
||||
- Vestibulum laoreet porttitor sem
|
||||
- Ac tristique libero volutpat at
|
||||
+ Faucibus porta lacus fringilla vel
|
||||
+ Aenean sit amet erat nunc
|
||||
+ Eget porttitor lorem
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
<!-- markdownlint-disable MD004 -->
|
||||
+ Lorem ipsum dolor sit amet
|
||||
+ Consectetur adipiscing elit
|
||||
+ Integer molestie lorem at massa
|
||||
+ Facilisis in pretium nisl aliquet
|
||||
+ Nulla volutpat aliquam velit
|
||||
- Phasellus iaculis neque
|
||||
- Purus sodales ultricies
|
||||
- Vestibulum laoreet porttitor sem
|
||||
- Ac tristique libero volutpat at
|
||||
+ Faucibus porta lacus fringilla vel
|
||||
+ Aenean sit amet erat nunc
|
||||
+ Eget porttitor lorem
|
||||
<!-- markdownlint-enable MD004 -->
|
||||
|
||||
And this HTML
|
||||
|
||||
```html
|
||||
<ul>
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
<li>Integer molestie lorem at massa</li>
|
||||
<li>Facilisis in pretium nisl aliquet</li>
|
||||
<li>Nulla volutpat aliquam velit
|
||||
<ul>
|
||||
<li>Phasellus iaculis neque</li>
|
||||
<li>Purus sodales ultricies</li>
|
||||
<li>Vestibulum laoreet porttitor sem</li>
|
||||
<li>Ac tristique libero volutpat at</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Faucibus porta lacus fringilla vel</li>
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
### Ordered
|
||||
|
||||
A list of items in which the order of items does explicitly matter.
|
||||
|
||||
```markdown
|
||||
1. Lorem ipsum dolor sit amet
|
||||
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
|
||||
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
|
||||
|
||||
And this HTML:
|
||||
|
||||
```html
|
||||
<ol>
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
<li>Integer molestie lorem at massa</li>
|
||||
<li>Facilisis in pretium nisl aliquet</li>
|
||||
<li>Nulla volutpat aliquam velit</li>
|
||||
<li>Faucibus porta lacus fringilla vel</li>
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ol>
|
||||
```
|
||||
|
||||
**TIP**: If you just use `1.` for each number, Markdown will automatically number each item. For example:
|
||||
|
||||
```markdown
|
||||
1. Lorem ipsum dolor sit amet
|
||||
1. Consectetur adipiscing elit
|
||||
1. Integer molestie lorem at massa
|
||||
1. Facilisis in pretium nisl aliquet
|
||||
1. Nulla volutpat aliquam velit
|
||||
1. Faucibus porta lacus fringilla vel
|
||||
1. Aenean sit amet erat nunc
|
||||
1. Eget porttitor lorem
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
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
|
||||
|
||||
## Code
|
||||
|
||||
### Inline code
|
||||
|
||||
Wrap inline snippets of code with `` ` ``.
|
||||
|
||||
```markdown
|
||||
In this example, `<section></section>` should be wrapped as **code**.
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
In this example, `<section></section>` should be wrapped as **code**.
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<p>In this example, <code><section></section></code> should be wrapped as <strong>code</strong>.</p>
|
||||
```
|
||||
|
||||
### Indented code
|
||||
|
||||
Or indent several lines of code by at least two spaces, as in:
|
||||
|
||||
```markdown
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
<!-- markdownlint-disable MD046 -->
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
<!-- markdownlint-enable MD046 -->
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<pre>
|
||||
<code>
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
</code>
|
||||
</pre>
|
||||
```
|
||||
|
||||
### Block code "fences"
|
||||
|
||||
Use "fences" ```` ``` ```` to block in multiple lines of code.
|
||||
|
||||
```markdown
|
||||
Sample text here...
|
||||
```
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<pre>
|
||||
<code>Sample text here...</code>
|
||||
</pre>
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
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:
|
||||
|
||||
```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']
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
```markdown
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
|
||||
And this HTML:
|
||||
|
||||
```html
|
||||
<table>
|
||||
<tr>
|
||||
<th>Option</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>data</td>
|
||||
<td>path to data files to supply the data that will be passed into templates.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>engine</td>
|
||||
<td>engine to be used for processing templates. Handlebars is the default.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ext</td>
|
||||
<td>extension to be used for dest files.</td>
|
||||
</tr>
|
||||
</table>
|
||||
```
|
||||
|
||||
### Right aligned text
|
||||
|
||||
Adding a colon on the right side of the dashes below any heading will right align text for that column.
|
||||
|
||||
```markdown
|
||||
| Option | Description |
|
||||
| ------:| -----------:|
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
```
|
||||
|
||||
| Option | Description |
|
||||
| ------:| -----------:|
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
|
||||
## Links
|
||||
|
||||
### Basic link
|
||||
|
||||
```markdown
|
||||
[Assemble](http://assemble.io)
|
||||
```
|
||||
|
||||
Renders to (hover over the link, there is no tooltip):
|
||||
|
||||
[Assemble](http://assemble.io)
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<a href="http://assemble.io">Assemble</a>
|
||||
```
|
||||
|
||||
### Add a tooltip
|
||||
|
||||
```markdown
|
||||
[Upstage](https://github.com/upstage/ "Visit Upstage!")
|
||||
```
|
||||
|
||||
Renders to (hover over the link, there should be a tooltip):
|
||||
|
||||
[Upstage](https://github.com/upstage/ "Visit Upstage!")
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<a href="https://github.com/upstage/" title="Visit Upstage!">Upstage</a>
|
||||
```
|
||||
|
||||
### Named Anchors
|
||||
|
||||
Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters:
|
||||
|
||||
```markdown
|
||||
# Table of Contents
|
||||
* [Chapter 1](#chapter-1)
|
||||
* [Chapter 2](#chapter-2)
|
||||
* [Chapter 3](#chapter-3)
|
||||
```
|
||||
|
||||
will jump to these sections:
|
||||
|
||||
```markdown
|
||||
## Chapter 1 <a id="chapter-1"></a>
|
||||
Content for chapter one.
|
||||
|
||||
## Chapter 2 <a id="chapter-2"></a>
|
||||
Content for chapter one.
|
||||
|
||||
## Chapter 3 <a id="chapter-3"></a>
|
||||
Content for chapter one.
|
||||
```
|
||||
**NOTE** that specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works.
|
||||
|
||||
## Images {#images}
|
||||
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
|
||||
|
||||
### Alternative usage : note images
|
||||
|
||||
```markdown
|
||||
![Alt text][id]
|
||||
```
|
||||
|
||||
![Alt text][id]
|
||||
|
||||
With a reference later in the document defining the URL location:
|
||||
|
||||
[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat"
|
||||
|
||||
[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat"
|
||||
|
||||
### Resizing image
|
||||
|
||||
Add HTTP parameters `width` and/or `height` to the link image to resize the image. Values are CSS values (default is `auto`).
|
||||
|
||||
```markdown
|
||||
![Minion](https://octodex.github.com/images/minion.png?width=20pc)
|
||||
```
|
||||
|
||||
![Minion](https://octodex.github.com/images/minion.png?width=20pc)
|
||||
|
||||
```markdown
|
||||
![Minion](https://octodex.github.com/images/minion.png?height=50px)
|
||||
```
|
||||
|
||||
![Minion](https://octodex.github.com/images/minion.png?height=50px)
|
||||
|
||||
```markdown
|
||||
![Minion](https://octodex.github.com/images/minion.png?height=50px&width=300px)
|
||||
```
|
||||
|
||||
![Minion](https://octodex.github.com/images/minion.png?height=50px&width=300px)
|
||||
|
||||
### Add CSS classes
|
||||
|
||||
Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow`and `border` are available but you could define other ones.
|
||||
|
||||
```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)
|
||||
```
|
@ -1,666 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Syntaxe Markdown
|
||||
weight: 15
|
||||
---
|
||||
|
||||
{{% notice note %}}
|
||||
Cette page est une copie de la [doc de Grav](http://learn.getgrav.org/content/markdown).
|
||||
La seule différence porte sur la personalisation des images ([taille]({{< relref "#resizing-image" >}}), [ajout de classes CSS]({{< relref "#add-css-classes" >}})...)
|
||||
Pour des raisons évidentes, cette page n'a pas été traduites en français 😁
|
||||
{{% /notice%}}
|
||||
|
||||
Let's face it: Writing content for the Web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages.
|
||||
|
||||
**Markdown** is a better way to write **HTML**, without all the complexities and ugliness that usually accompanies it.
|
||||
|
||||
Some of the key benefits are:
|
||||
|
||||
1. Markdown is simple to learn, with minimal extra characters so it's also quicker to write content.
|
||||
2. Less chance of errors when writing in markdown.
|
||||
3. Produces valid XHTML output.
|
||||
4. Keeps the content and the visual display separate, so you cannot mess up the look of your site.
|
||||
5. Write in any text editor or Markdown application you like.
|
||||
6. Markdown is a joy to use!
|
||||
|
||||
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.
|
||||
> -- <cite>John Gruber</cite>
|
||||
|
||||
|
||||
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
|
||||
|
||||
Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like:
|
||||
|
||||
{{% notice info %}}
|
||||
<i class="fas fa-bookmark"></i> Bookmark this page for easy future reference!
|
||||
{{% /notice %}}
|
||||
|
||||
## Headings
|
||||
|
||||
Headings from `h1` through `h6` are constructed with a `#` for each level:
|
||||
|
||||
```markdown
|
||||
# h1 Heading
|
||||
## h2 Heading
|
||||
### h3 Heading
|
||||
#### h4 Heading
|
||||
##### h5 Heading
|
||||
###### h6 Heading
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
# h1 Heading
|
||||
## h2 Heading
|
||||
### h3 Heading
|
||||
#### h4 Heading
|
||||
##### h5 Heading
|
||||
###### h6 Heading
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<h1>h1 Heading</h1>
|
||||
<h2>h2 Heading</h2>
|
||||
<h3>h3 Heading</h3>
|
||||
<h4>h4 Heading</h4>
|
||||
<h5>h5 Heading</h5>
|
||||
<h6>h6 Heading</h6>
|
||||
```
|
||||
|
||||
## Comments
|
||||
|
||||
Comments should be HTML compatible
|
||||
|
||||
```html
|
||||
<!--
|
||||
This is a comment
|
||||
-->
|
||||
```
|
||||
Comment below should **NOT** be seen:
|
||||
|
||||
<!--
|
||||
This is a comment
|
||||
-->
|
||||
|
||||
|
||||
## Horizontal Rules
|
||||
|
||||
The HTML `<hr>` element is for creating a "thematic break" between paragraph-level elements. In markdown, you can create a `<hr>` with any of the following:
|
||||
|
||||
* `___`: three consecutive underscores
|
||||
* `---`: three consecutive dashes
|
||||
* `***`: three consecutive asterisks
|
||||
|
||||
renders to:
|
||||
|
||||
___
|
||||
|
||||
---
|
||||
|
||||
***
|
||||
|
||||
|
||||
## Body Copy
|
||||
|
||||
Body copy written as normal, plain text will be wrapped with `<p></p>` tags in the rendered HTML.
|
||||
|
||||
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
|
||||
<p>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.</p>
|
||||
```
|
||||
|
||||
## Emphasis
|
||||
|
||||
### Bold
|
||||
For emphasizing a snippet of text with a heavier font-weight.
|
||||
|
||||
The following snippet of text is **rendered as bold text**.
|
||||
|
||||
```markdown
|
||||
**rendered as bold text**
|
||||
```
|
||||
renders to:
|
||||
|
||||
**rendered as bold text**
|
||||
|
||||
and this HTML
|
||||
|
||||
```html
|
||||
<strong>rendered as bold text</strong>
|
||||
```
|
||||
|
||||
### Italics
|
||||
For emphasizing a snippet of text with italics.
|
||||
|
||||
The following snippet of text is _rendered as italicized text_.
|
||||
|
||||
```markdown
|
||||
_rendered as italicized text_
|
||||
```
|
||||
|
||||
renders to:
|
||||
|
||||
_rendered as italicized text_
|
||||
|
||||
and this HTML:
|
||||
|
||||
```html
|
||||
<em>rendered as italicized text</em>
|
||||
```
|
||||
|
||||
|
||||
### strikethrough
|
||||
In GFM (GitHub flavored Markdown) you can do strikethroughs.
|
||||
|
||||
```markdown
|
||||
~~Strike through this text.~~
|
||||
```
|
||||
Which renders to:
|
||||
|
||||
~~Strike through this text.~~
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<del>Strike through this text.</del>
|
||||
```
|
||||
|
||||
## Blockquotes
|
||||
|
||||
For quoting blocks of content from another source within your document.
|
||||
|
||||
Add `>` before any text you want to quote.
|
||||
|
||||
```markdown
|
||||
> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
> **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
|
||||
|
||||
and this HTML:
|
||||
|
||||
```html
|
||||
<blockquote>
|
||||
<p><strong>Fusion Drive</strong> combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.</p>
|
||||
</blockquote>
|
||||
```
|
||||
|
||||
Blockquotes can also be nested:
|
||||
|
||||
```markdown
|
||||
> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
|
||||
>
|
||||
> > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
|
||||
>
|
||||
> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
|
||||
>
|
||||
> > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
|
||||
>
|
||||
> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.
|
||||
|
||||
## Notices
|
||||
|
||||
{{% notice note %}}
|
||||
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:
|
||||
|
||||
```markdown
|
||||
* valid bullet
|
||||
- valid bullet
|
||||
+ valid bullet
|
||||
```
|
||||
|
||||
For example
|
||||
|
||||
```markdown
|
||||
+ Lorem ipsum dolor sit amet
|
||||
+ Consectetur adipiscing elit
|
||||
+ Integer molestie lorem at massa
|
||||
+ Facilisis in pretium nisl aliquet
|
||||
+ Nulla volutpat aliquam velit
|
||||
- Phasellus iaculis neque
|
||||
- Purus sodales ultricies
|
||||
- Vestibulum laoreet porttitor sem
|
||||
- Ac tristique libero volutpat at
|
||||
+ Faucibus porta lacus fringilla vel
|
||||
+ Aenean sit amet erat nunc
|
||||
+ Eget porttitor lorem
|
||||
```
|
||||
Renders to:
|
||||
|
||||
+ Lorem ipsum dolor sit amet
|
||||
+ Consectetur adipiscing elit
|
||||
+ Integer molestie lorem at massa
|
||||
+ Facilisis in pretium nisl aliquet
|
||||
+ Nulla volutpat aliquam velit
|
||||
- Phasellus iaculis neque
|
||||
- Purus sodales ultricies
|
||||
- Vestibulum laoreet porttitor sem
|
||||
- Ac tristique libero volutpat at
|
||||
+ Faucibus porta lacus fringilla vel
|
||||
+ Aenean sit amet erat nunc
|
||||
+ Eget porttitor lorem
|
||||
|
||||
And this HTML
|
||||
|
||||
```html
|
||||
<ul>
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
<li>Integer molestie lorem at massa</li>
|
||||
<li>Facilisis in pretium nisl aliquet</li>
|
||||
<li>Nulla volutpat aliquam velit
|
||||
<ul>
|
||||
<li>Phasellus iaculis neque</li>
|
||||
<li>Purus sodales ultricies</li>
|
||||
<li>Vestibulum laoreet porttitor sem</li>
|
||||
<li>Ac tristique libero volutpat at</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Faucibus porta lacus fringilla vel</li>
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ul>
|
||||
```
|
||||
|
||||
### Ordered
|
||||
|
||||
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
|
||||
```
|
||||
Renders to:
|
||||
|
||||
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
|
||||
|
||||
And this HTML:
|
||||
|
||||
```html
|
||||
<ol>
|
||||
<li>Lorem ipsum dolor sit amet</li>
|
||||
<li>Consectetur adipiscing elit</li>
|
||||
<li>Integer molestie lorem at massa</li>
|
||||
<li>Facilisis in pretium nisl aliquet</li>
|
||||
<li>Nulla volutpat aliquam velit</li>
|
||||
<li>Faucibus porta lacus fringilla vel</li>
|
||||
<li>Aenean sit amet erat nunc</li>
|
||||
<li>Eget porttitor lorem</li>
|
||||
</ol>
|
||||
```
|
||||
|
||||
**TIP**: If you just use `1.` for each number, Markdown will automatically number each item. For example:
|
||||
|
||||
```markdown
|
||||
1. Lorem ipsum dolor sit amet
|
||||
1. Consectetur adipiscing elit
|
||||
1. Integer molestie lorem at massa
|
||||
1. Facilisis in pretium nisl aliquet
|
||||
1. Nulla volutpat aliquam velit
|
||||
1. Faucibus porta lacus fringilla vel
|
||||
1. Aenean sit amet erat nunc
|
||||
1. Eget porttitor lorem
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
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
|
||||
|
||||
## Code
|
||||
|
||||
### Inline code
|
||||
Wrap inline snippets of code with `` ` ``.
|
||||
|
||||
```markdown
|
||||
In this example, `<section></section>` should be wrapped as **code**.
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
In this example, `<section></section>` should be wrapped with **code**.
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<p>In this example, <code><section></section></code> should be wrapped with <strong>code</strong>.</p>
|
||||
```
|
||||
|
||||
### Indented code
|
||||
|
||||
Or indent several lines of code by at least four spaces, as in:
|
||||
|
||||
<pre>
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
</pre>
|
||||
|
||||
Renders to:
|
||||
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<pre>
|
||||
<code>
|
||||
// Some comments
|
||||
line 1 of code
|
||||
line 2 of code
|
||||
line 3 of code
|
||||
</code>
|
||||
</pre>
|
||||
```
|
||||
|
||||
|
||||
### Block code "fences"
|
||||
|
||||
Use "fences" ```` ``` ```` to block in multiple lines of code.
|
||||
|
||||
<pre>
|
||||
``` markup
|
||||
Sample text here...
|
||||
```
|
||||
</pre>
|
||||
|
||||
|
||||
```
|
||||
Sample text here...
|
||||
```
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<pre>
|
||||
<code>Sample text here...</code>
|
||||
</pre>
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
<pre>
|
||||
```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']
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
```
|
||||
</pre>
|
||||
|
||||
Renders to:
|
||||
|
||||
```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']
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
```markdown
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
```
|
||||
|
||||
Renders to:
|
||||
|
||||
| Option | Description |
|
||||
| ------ | ----------- |
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
|
||||
And this HTML:
|
||||
|
||||
```html
|
||||
<table>
|
||||
<tr>
|
||||
<th>Option</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>data</td>
|
||||
<td>path to data files to supply the data that will be passed into templates.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>engine</td>
|
||||
<td>engine to be used for processing templates. Handlebars is the default.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>ext</td>
|
||||
<td>extension to be used for dest files.</td>
|
||||
</tr>
|
||||
</table>
|
||||
```
|
||||
|
||||
### Right aligned text
|
||||
|
||||
Adding a colon on the right side of the dashes below any heading will right align text for that column.
|
||||
|
||||
```markdown
|
||||
| Option | Description |
|
||||
| ------:| -----------:|
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
```
|
||||
|
||||
| Option | Description |
|
||||
| ------:| -----------:|
|
||||
| data | path to data files to supply the data that will be passed into templates. |
|
||||
| engine | engine to be used for processing templates. Handlebars is the default. |
|
||||
| ext | extension to be used for dest files. |
|
||||
|
||||
## Links
|
||||
|
||||
### Basic link
|
||||
|
||||
```markdown
|
||||
[Assemble](http://assemble.io)
|
||||
```
|
||||
|
||||
Renders to (hover over the link, there is no tooltip):
|
||||
|
||||
[Assemble](http://assemble.io)
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<a href="http://assemble.io">Assemble</a>
|
||||
```
|
||||
|
||||
|
||||
### Add a title
|
||||
|
||||
```markdown
|
||||
[Upstage](https://github.com/upstage/ "Visit Upstage!")
|
||||
```
|
||||
|
||||
Renders to (hover over the link, there should be a tooltip):
|
||||
|
||||
[Upstage](https://github.com/upstage/ "Visit Upstage!")
|
||||
|
||||
HTML:
|
||||
|
||||
```html
|
||||
<a href="https://github.com/upstage/" title="Visit Upstage!">Upstage</a>
|
||||
```
|
||||
|
||||
### Named Anchors
|
||||
|
||||
Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters:
|
||||
|
||||
```markdown
|
||||
# Table of Contents
|
||||
* [Chapter 1](#chapter-1)
|
||||
* [Chapter 2](#chapter-2)
|
||||
* [Chapter 3](#chapter-3)
|
||||
```
|
||||
will jump to these sections:
|
||||
|
||||
```markdown
|
||||
## Chapter 1 <a id="chapter-1"></a>
|
||||
Content for chapter one.
|
||||
|
||||
## Chapter 2 <a id="chapter-2"></a>
|
||||
Content for chapter one.
|
||||
|
||||
## Chapter 3 <a id="chapter-3"></a>
|
||||
Content for chapter one.
|
||||
```
|
||||
**NOTE** that specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works.
|
||||
|
||||
|
||||
## Images {#images}
|
||||
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
|
||||
|
||||
### Alternative usage : note images
|
||||
|
||||
```markdown
|
||||
![Alt text][id]
|
||||
```
|
||||
![Alt text][id]
|
||||
|
||||
With a reference later in the document defining the URL location:
|
||||
|
||||
[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat"
|
||||
|
||||
[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat"
|
||||
|
||||
### Resizing image
|
||||
|
||||
Add HTTP parameters `width` and/or `height` to the link image to resize the image. Values are CSS values (default is `auto`).
|
||||
|
||||
```markdown
|
||||
![Minion](https://octodex.github.com/images/minion.png?width=20pc)
|
||||
```
|
||||
|
||||
![Minion](https://octodex.github.com/images/minion.png?width=20pc)
|
||||
|
||||
```markdown
|
||||
![Minion](https://octodex.github.com/images/minion.png?height=50px)
|
||||
```
|
||||
|
||||
![Minion](https://octodex.github.com/images/minion.png?height=50px)
|
||||
|
||||
```markdown
|
||||
![Minion](https://octodex.github.com/images/minion.png?height=50px&width=300px)
|
||||
```
|
||||
|
||||
![Minion](https://octodex.github.com/images/minion.png?height=50px&width=300px)
|
||||
|
||||
### Add CSS classes
|
||||
|
||||
Add a HTTP `classes` parameter to the link image to add CSS classes. `shadow`and `border` are available but you could define other ones.
|
||||
|
||||
```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)
|
@ -1,109 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Menu extra shortcuts
|
||||
weight: 25
|
||||
---
|
||||
|
||||
You can define additional menu entries or shortcuts in the navigation menu without any link to content.
|
||||
|
||||
## Basic configuration
|
||||
|
||||
Edit the website configuration `config.toml` and add a `[[menu.shortcuts]]` entry for each link your want to add.
|
||||
|
||||
Example from the current website:
|
||||
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fab fa-github'></i> Github repo"
|
||||
identifier = "ds"
|
||||
url = "https://github.com/matcornic/hugo-theme-learn"
|
||||
weight = 10
|
||||
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fas fa-camera'></i> Showcases"
|
||||
url = "/showcase"
|
||||
weight = 11
|
||||
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fas fa-bookmark'></i> Hugo Documentation"
|
||||
identifier = "hugodoc"
|
||||
url = "https://gohugo.io/"
|
||||
weight = 20
|
||||
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fas fa-bullhorn'></i> Credits"
|
||||
url = "/credits"
|
||||
weight = 30
|
||||
|
||||
By default, shortcuts are preceded by a title. This title can be disabled by setting `disableShortcutsTitle=true`.
|
||||
However, if you want to keep the title but change its value, it can be overriden by changing your local i18n translation string configuration.
|
||||
|
||||
For example, in your local `i18n/en.toml` file, add the following content
|
||||
|
||||
[Shortcuts-Title]
|
||||
other = "<Your value>"
|
||||
|
||||
Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo i18n translation strings](https://gohugo.io/content-management/multilingual/#translation-of-strings)
|
||||
|
||||
## Configuration for Multilingual mode {#i18n}
|
||||
|
||||
When using a multilingual website, you can set different menus for each language. In the `config.toml` file, prefix your menu configuration by `Languages.<language-id>`.
|
||||
|
||||
|
||||
Example from the current website:
|
||||
|
||||
[Languages]
|
||||
[Languages.en]
|
||||
title = "Documentation for Hugo Learn Theme"
|
||||
weight = 1
|
||||
languageName = "English"
|
||||
|
||||
[[Languages.en.menu.shortcuts]]
|
||||
name = "<i class='fab fa-github'></i> Github repo"
|
||||
identifier = "ds"
|
||||
url = "https://github.com/matcornic/hugo-theme-learn"
|
||||
weight = 10
|
||||
|
||||
[[Languages.en.menu.shortcuts]]
|
||||
name = "<i class='fas fa-camera'></i> Showcases"
|
||||
url = "/showcase"
|
||||
weight = 11
|
||||
|
||||
[[Languages.en.menu.shortcuts]]
|
||||
name = "<i class='fas fa-bookmark'></i> Hugo Documentation"
|
||||
identifier = "hugodoc"
|
||||
url = "https://gohugo.io/"
|
||||
weight = 20
|
||||
|
||||
[[Languages.en.menu.shortcuts]]
|
||||
name = "<i class='fas fa-bullhorn'></i> Credits"
|
||||
url = "/credits"
|
||||
weight = 30
|
||||
|
||||
[Languages.fr]
|
||||
title = "Documentation du thème Hugo Learn"
|
||||
weight = 2
|
||||
languageName = "Français"
|
||||
|
||||
[[Languages.fr.menu.shortcuts]]
|
||||
name = "<i class='fab fa-github'></i> Repo Github"
|
||||
identifier = "ds"
|
||||
url = "https://github.com/matcornic/hugo-theme-learn"
|
||||
weight = 10
|
||||
|
||||
[[Languages.fr.menu.shortcuts]]
|
||||
name = "<i class='fas fa-camera'></i> Vitrine"
|
||||
url = "/showcase"
|
||||
weight = 11
|
||||
|
||||
[[Languages.fr.menu.shortcuts]]
|
||||
name = "<i class='fas fa-bookmark'></i> Documentation Hugo"
|
||||
identifier = "hugodoc"
|
||||
url = "https://gohugo.io/"
|
||||
weight = 20
|
||||
|
||||
[[Languages.fr.menu.shortcuts]]
|
||||
name = "<i class='fas fa-bullhorn'></i> Crédits"
|
||||
url = "/credits"
|
||||
weight = 30
|
||||
|
||||
Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo multilingual menus](https://gohugo.io/content-management/multilingual/#menus)
|
@ -1,109 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Raccourcis du menu
|
||||
weight: 25
|
||||
---
|
||||
|
||||
Vous pouvez définir des entrées ou raccourcis supplémentaires dans le menu sans avoir besoin d'être lié à un contenu du site.
|
||||
|
||||
## Configuration simple
|
||||
|
||||
Editez le fichier de configuration `config.toml` et ajoutez une entrée `[[menu.shortcuts]]` pour chaque lien que vous voulez ajouter.
|
||||
|
||||
Exemple pour ce site:
|
||||
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fab fa-github'></i> Github repo"
|
||||
identifier = "ds"
|
||||
url = "https://github.com/matcornic/hugo-theme-learn"
|
||||
weight = 10
|
||||
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fas fa-camera'></i> Showcases"
|
||||
url = "/showcase"
|
||||
weight = 11
|
||||
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fas fa-bookmark'></i> Hugo Documentation"
|
||||
identifier = "hugodoc"
|
||||
url = "https://gohugo.io/"
|
||||
weight = 20
|
||||
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fas fa-bullhorn'></i> Credits"
|
||||
url = "/credits"
|
||||
weight = 30
|
||||
|
||||
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`.
|
||||
Cependant, si vous voulez garder le titre mais changer sa valeur, vous pouvez modifier votre configuration multilangue locale en changeant les *translation string*.
|
||||
|
||||
Par exemple, dans votre fichier local `i18n/en.toml`, ajouter le contenu
|
||||
|
||||
[Shortcuts-Title]
|
||||
other = "<Votre valeur>"
|
||||
|
||||
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)
|
||||
|
||||
## Configuration pour le mode multi-langue {#i18n}
|
||||
|
||||
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.<language-id>`.
|
||||
|
||||
|
||||
Par exemple, avec ce site :
|
||||
|
||||
[Languages]
|
||||
[Languages.en]
|
||||
title = "Documentation for Hugo Learn Theme"
|
||||
weight = 1
|
||||
languageName = "English"
|
||||
|
||||
[[Languages.en.menu.shortcuts]]
|
||||
name = "<i class='fab fa-github'></i> Github repo"
|
||||
identifier = "ds"
|
||||
url = "https://github.com/matcornic/hugo-theme-learn"
|
||||
weight = 10
|
||||
|
||||
[[Languages.en.menu.shortcuts]]
|
||||
name = "<i class='fas fa-camera'></i> Showcases"
|
||||
url = "/showcase"
|
||||
weight = 11
|
||||
|
||||
[[Languages.en.menu.shortcuts]]
|
||||
name = "<i class='fas fa-bookmark'></i> Hugo Documentation"
|
||||
identifier = "hugodoc"
|
||||
url = "https://gohugo.io/"
|
||||
weight = 20
|
||||
|
||||
[[Languages.en.menu.shortcuts]]
|
||||
name = "<i class='fas fa-bullhorn'></i> Credits"
|
||||
url = "/credits"
|
||||
weight = 30
|
||||
|
||||
[Languages.fr]
|
||||
title = "Documentation du thème Hugo Learn"
|
||||
weight = 2
|
||||
languageName = "Français"
|
||||
|
||||
[[Languages.fr.menu.shortcuts]]
|
||||
name = "<i class='fab fa-github'></i> Repo Github"
|
||||
identifier = "ds"
|
||||
url = "https://github.com/matcornic/hugo-theme-learn"
|
||||
weight = 10
|
||||
|
||||
[[Languages.fr.menu.shortcuts]]
|
||||
name = "<i class='fas fa-camera'></i> Vitrine"
|
||||
url = "/showcase"
|
||||
weight = 11
|
||||
|
||||
[[Languages.fr.menu.shortcuts]]
|
||||
name = "<i class='fas fa-bookmark'></i> Documentation Hugo"
|
||||
identifier = "hugodoc"
|
||||
url = "https://gohugo.io/"
|
||||
weight = 20
|
||||
|
||||
[[Languages.fr.menu.shortcuts]]
|
||||
name = "<i class='fas fa-bullhorn'></i> Crédits"
|
||||
url = "/credits"
|
||||
weight = 30
|
||||
|
||||
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)
|
@ -1,166 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Pages organization
|
||||
weight: 5
|
||||
---
|
||||
|
||||
In **Hugo**, pages are the core of your site. Once it is configured, pages are definitely the added value to your documentation site.
|
||||
|
||||
## Folders
|
||||
|
||||
Organize your site like [any other Hugo project](https://gohugo.io/content/organization/). Typically, you will have a *content* folder with all your pages.
|
||||
|
||||
content
|
||||
├── level-one
|
||||
│ ├── level-two
|
||||
│ │ ├── level-three
|
||||
│ │ │ ├── level-four
|
||||
│ │ │ │ ├── _index.md <-- /level-one/level-two/level-three/level-four
|
||||
│ │ │ │ ├── page-4-a.md <-- /level-one/level-two/level-three/level-four/page-4-a
|
||||
│ │ │ │ ├── page-4-b.md <-- /level-one/level-two/level-three/level-four/page-4-b
|
||||
│ │ │ │ └── page-4-c.md <-- /level-one/level-two/level-three/level-four/page-4-c
|
||||
│ │ │ ├── _index.md <-- /level-one/level-two/level-three
|
||||
│ │ │ ├── page-3-a.md <-- /level-one/level-two/level-three/page-3-a
|
||||
│ │ │ ├── page-3-b.md <-- /level-one/level-two/level-three/page-3-b
|
||||
│ │ │ └── page-3-c.md <-- /level-one/level-two/level-three/page-3-c
|
||||
│ │ ├── _index.md <-- /level-one/level-two
|
||||
│ │ ├── page-2-a.md <-- /level-one/level-two/page-2-a
|
||||
│ │ ├── page-2-b.md <-- /level-one/level-two/page-2-b
|
||||
│ │ └── page-2-c.md <-- /level-one/level-two/page-2-c
|
||||
│ ├── _index.md <-- /level-one
|
||||
│ ├── page-1-a.md <-- /level-one/page-1-a
|
||||
│ ├── page-1-b.md <-- /level-one/page-1-b
|
||||
│ └── page-1-c.md <-- /level-one/page-1-c
|
||||
├── _index.md <-- /
|
||||
└── page-top.md <-- /page-top
|
||||
|
||||
{{% notice note %}}
|
||||
`_index.md` is required in each folder, it’s your “folder home page”
|
||||
{{% /notice %}}
|
||||
|
||||
## Types
|
||||
|
||||
**Hugo-theme-learn** defines two types of pages. *Default* and *Chapter*. Both can be used at any level of the documentation, the only difference being layout display.
|
||||
|
||||
A **Chapter** displays a page meant to be used as introduction for a set of child pages. Commonly, it contains a simple title and a catch line to define content that can be found under it.
|
||||
You can define any HTML as prefix for the menu. In the example below, it's just a number but that could be an [icon](https://fortawesome.github.io/Font-Awesome/).
|
||||
|
||||
![Chapter page](/en/cont/pages/images/pages-chapter.png?width=50pc)
|
||||
|
||||
```markdown
|
||||
+++
|
||||
title = "Basics"
|
||||
chapter = true
|
||||
weight = 5
|
||||
pre = "<b>1. </b>"
|
||||
+++
|
||||
|
||||
### Chapter 1
|
||||
|
||||
# Basics
|
||||
|
||||
Discover what this Hugo theme is all about and the core-concepts behind it.
|
||||
```
|
||||
|
||||
To tell **Hugo-theme-learn** to consider a page as a chapter, set `chapter=true` in the Front Matter of the page.
|
||||
|
||||
A **Default** page is any other content page.
|
||||
|
||||
![Default page](/en/cont/pages/images/pages-default.png?width=50pc)
|
||||
|
||||
```toml
|
||||
+++
|
||||
title = "Installation"
|
||||
weight = 15
|
||||
+++
|
||||
```
|
||||
|
||||
The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/).
|
||||
|
||||
## Create your project
|
||||
|
||||
Hugo provides a `new` command to create a new website.
|
||||
|
||||
```
|
||||
hugo new site <new_project>
|
||||
```
|
||||
|
||||
**Hugo-theme-learn** provides [archetypes]({{< relref "cont/archetypes.en.md" >}}) to help you create this kind of pages.
|
||||
|
||||
## Front Matter configuration
|
||||
|
||||
Each Hugo page has to define a [Front Matter](https://gohugo.io/content/front-matter/) in *yaml*, *toml* or *json*.
|
||||
|
||||
**Hugo-theme-learn** uses the following parameters on top of Hugo ones :
|
||||
|
||||
```toml
|
||||
+++
|
||||
# Table of content (toc) is enabled by default. Set this parameter to true to disable it.
|
||||
# Note: Toc is always disabled for chapter pages
|
||||
disableToc = "false"
|
||||
# If set, this will be used for the page's menu entry (instead of the `title` attribute)
|
||||
menuTitle = ""
|
||||
# The title of the page in menu will be prefixed by this HTML content
|
||||
pre = ""
|
||||
# The title of the page in menu will be postfixed by this HTML content
|
||||
post = ""
|
||||
# Set the page as a chapter, changing the way it's displayed
|
||||
chapter = false
|
||||
# Hide a menu entry by setting this to true
|
||||
hidden = false
|
||||
# Display name of this page modifier. If set, it will be displayed in the footer.
|
||||
LastModifierDisplayName = ""
|
||||
# Email of this page modifier. If set with LastModifierDisplayName, it will be displayed in the footer
|
||||
LastModifierEmail = ""
|
||||
+++
|
||||
```
|
||||
|
||||
### Add icon to a menu entry
|
||||
|
||||
In the page frontmatter, add a `pre` param to insert any HTML code before the menu label. The example below uses the Github icon.
|
||||
|
||||
```toml
|
||||
+++
|
||||
title = "Github repo"
|
||||
pre = "<i class='fab fa-github'></i> "
|
||||
+++
|
||||
```
|
||||
|
||||
![Title with icon](/en/cont/pages/images/frontmatter-icon.png)
|
||||
|
||||
### Ordering sibling menu/page entries
|
||||
|
||||
Hugo provides a [flexible way](https://gohugo.io/content/ordering/) to handle order for your pages.
|
||||
|
||||
The simplest way is to set `weight` parameter to a number.
|
||||
|
||||
```toml
|
||||
+++
|
||||
title = "My page"
|
||||
weight = 5
|
||||
+++
|
||||
```
|
||||
|
||||
### Using a custom title for menu entries
|
||||
|
||||
By default, **Hugo-theme-learn** will use a page's `title` attribute for the menu item (or `linkTitle` if defined).
|
||||
|
||||
But a page's title has to be descriptive on its own while the menu is a hierarchy.
|
||||
We've added the `menuTitle` parameter for that purpose:
|
||||
|
||||
For example (for a page named `content/install/linux.md`):
|
||||
|
||||
```toml
|
||||
+++
|
||||
title = "Install on Linux"
|
||||
menuTitle = "Linux"
|
||||
+++
|
||||
```
|
||||
|
||||
## Homepage
|
||||
|
||||
To configure your home page, you basically have three choices:
|
||||
|
||||
1. Create an `_index.md` document in `content` folder and fill the file with *Markdown content*
|
||||
2. Create an `index.html` file in the `static` folder and fill the file with *HTML content*
|
||||
3. Configure your server to automatically redirect home page to one your documentation page
|
@ -1,146 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Organisation des pages
|
||||
weight: 5
|
||||
---
|
||||
|
||||
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 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
|
||||
│ ├── niveau-deux
|
||||
│ │ ├── niveau-trois
|
||||
│ │ │ ├── niveau-quatre
|
||||
│ │ │ │ ├── _index.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre
|
||||
│ │ │ │ ├── page-4-a.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-a
|
||||
│ │ │ │ ├── page-4-b.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-b
|
||||
│ │ │ │ └── page-4-c.md <-- /niveau-un/niveau-deux/niveau-trois/niveau-quatre/page-4-c
|
||||
│ │ │ ├── _index.md <-- /niveau-un/niveau-deux/niveau-trois
|
||||
│ │ │ ├── page-3-a.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-a
|
||||
│ │ │ ├── page-3-b.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-b
|
||||
│ │ │ └── page-3-c.md <-- /niveau-un/niveau-deux/niveau-trois/page-3-c
|
||||
│ │ ├── _index.md <-- /niveau-un/niveau-deux
|
||||
│ │ ├── page-2-a.md <-- /niveau-un/niveau-deux/page-2-a
|
||||
│ │ ├── page-2-b.md <-- /niveau-un/niveau-deux/page-2-b
|
||||
│ │ └── page-2-c.md <-- /niveau-un/niveau-deux/page-2-c
|
||||
│ ├── _index.md <-- /niveau-un
|
||||
│ ├── page-1-a.md <-- /niveau-un/page-1-a
|
||||
│ ├── page-1-b.md <-- /niveau-un/page-1-b
|
||||
│ └── page-1-c.md <-- /niveau-un/page-1-c
|
||||
├── _index.md <-- /
|
||||
└── premiere-page.md <-- /premiere-page
|
||||
|
||||
{{% notice note %}}
|
||||
Le fichier `_index.md` est obligatoire dans chaque dossier, c'est en quelque sorte votre page d'accueil pour le dossier.
|
||||
{{% /notice %}}
|
||||
|
||||
## Types
|
||||
|
||||
**Hugo-theme-learn** définit deux types de pages. *Défaut* et *Chapitre*. Les deux sont utilisables à n'importe quel niveau du site, la seule différence est dans l'affichage.
|
||||
|
||||
Un **Chapitre** affiche une page vouée à être une introduction pour un ensemble de pages filles. Habituellement, il va seulement contenir un titre et un résumé de la section.
|
||||
Vous pouvez définir n'importe quel contenu HTML comme préfixe de l'entrée du menu. Dans l'exemple ci-dessous, c'est juste un nombre mais vous pourriez utiliser une [icône](https://fortawesome.github.io/Font-Awesome/).
|
||||
|
||||
![Page Chapitre](/en/cont/pages/images/pages-chapter.png?width=50pc)
|
||||
|
||||
```markdown
|
||||
+++
|
||||
title = "Démarrage"
|
||||
weight = 5
|
||||
pre = "<b>1. </b>"
|
||||
chapter = true
|
||||
+++
|
||||
|
||||
### Chapitre 1
|
||||
|
||||
# Démarrage
|
||||
|
||||
Découvrez comment utiliser ce thème Hugo et apprenez en les concepts
|
||||
```
|
||||
|
||||
Pour dire à **Hugo-theme-learn** de considérer la page comme un chapitre, configure `chapter=true` dans le Front Matter de la page.
|
||||
|
||||
Une page **Défaut** est n'importe quelle autre page.
|
||||
|
||||
![Page défaut](/en/cont/pages/images/pages-default.png?width=50pc)
|
||||
|
||||
+++
|
||||
title = "Installation"
|
||||
weight = 15
|
||||
+++
|
||||
|
||||
The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you to train by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/).
|
||||
|
||||
## Create your project
|
||||
|
||||
Hugo provides a `new` command to create a new website.
|
||||
|
||||
```
|
||||
hugo new site <new_project>
|
||||
```
|
||||
|
||||
**Hugo-theme-learn** fournit des [archétypes]({{< relref "cont/archetypes.fr.md" >}}) pour vous aider à créer ce type de pages.
|
||||
|
||||
## Configuration des Front Matter
|
||||
|
||||
Chaque page Hugo doit définir un [Front Matter](https://gohugo.io/content/front-matter/) dans le format *yaml*, *toml* ou *json*.
|
||||
|
||||
**Hugo-theme-learn** utilise les paramètres suivant en plus de ceux définis par Hugo:
|
||||
|
||||
```toml
|
||||
+++
|
||||
# Le Sommaire (table of content = toc) est activé par défaut. Modifier ce paramètre à true pour le désactiver.
|
||||
# Note: Le sommaire est toujours désactivé pour les chapitres
|
||||
disableToc = "false"
|
||||
# Le titre de la page dans le menu sera préfixé par ce contentu HTML
|
||||
pre = ""
|
||||
# Le titre de la page dans le menu sera suffixé par ce contentu HTML
|
||||
post = ""
|
||||
# Modifier le type de la page pour changer l'affichage
|
||||
chapter = false
|
||||
# Cache la page du menu
|
||||
hidden = false
|
||||
# Nom de la personne qui a modifié la page. Quand configuré, sera affiché dans le pied de page.
|
||||
LastModifierDisplayName = ""
|
||||
# Email de la personne qui a modifié la page. Quand configuré, sera affiché dans le pied de page.
|
||||
LastModifierEmail = ""
|
||||
+++
|
||||
```
|
||||
|
||||
### Ajouter une icône à une entrée du menu
|
||||
|
||||
Dans le Front Matter, ajouter un paramètre `pre` pour insérer du code HTML qui s'affichera avant le label du menu. L'exemple ci-dessous utilise l'icône de Github.
|
||||
|
||||
```toml
|
||||
+++
|
||||
title = "Repo Github"
|
||||
pre = "<i class='fab fa-github'></i> "
|
||||
+++
|
||||
```
|
||||
|
||||
![Titre avec icône](/en/cont/pages/images/frontmatter-icon.png)
|
||||
|
||||
### Ordonner les entrées dans le menu
|
||||
|
||||
Hugo permet de modifier facilement [l'ordre des menu](https://gohugo.io/content/ordering/).
|
||||
|
||||
La manière la plus simple est de configurer le paramètre `weight` avec un nombre.
|
||||
|
||||
```toml
|
||||
+++
|
||||
title = "Ma page"
|
||||
weight = 5
|
||||
+++
|
||||
```
|
||||
|
||||
## Page d'accueil
|
||||
|
||||
Pour configurer votre page d'accueil, vous avez trois choix:
|
||||
|
||||
1. Créer une page `_index.md` dans le dossier `content` et remplissez le fichier avec du *contenu Markdown*
|
||||
2. Créer une page `index.html` dans le dossier `static` et remplissez le fichier avec du *contenu HTML*
|
||||
3. Configurez votre serveur pour automatiquement rediriger la page d'accueil vers l'une de vos pages.
|
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 196 KiB |
@ -1,89 +0,0 @@
|
||||
---
|
||||
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.
|
||||
|
||||
<!-- markdownlint-disable MD046 -->
|
||||
```plaintext
|
||||
```json
|
||||
[
|
||||
{
|
||||
"title": "apples",
|
||||
"count": [12000, 20000],
|
||||
"description": {"text": "...", "sensitive": false}
|
||||
},
|
||||
{
|
||||
"title": "oranges",
|
||||
"count": [17500, null],
|
||||
"description": {"text": "...", "sensitive": false}
|
||||
}
|
||||
]
|
||||
```
|
||||
```
|
||||
<!-- markdownlint-disable MD046 -->
|
||||
|
||||
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/)
|
@ -1,39 +0,0 @@
|
||||
---
|
||||
date: 2018-11-29T08:41:44+01:00
|
||||
title: Tags
|
||||
weight: 40
|
||||
tags: ["documentation", "tutorial"]
|
||||
---
|
||||
|
||||
*Learn theme* support one default taxonomy of gohugo: the *tag* feature.
|
||||
|
||||
## Configuration
|
||||
|
||||
Just add tags to any page:
|
||||
|
||||
```markdown
|
||||
---
|
||||
date: 2018-11-29T08:41:44+01:00
|
||||
title: Theme tutorial
|
||||
weight: 15
|
||||
tags: ["tutorial", "theme"]
|
||||
---
|
||||
```
|
||||
|
||||
## Behavior
|
||||
|
||||
|
||||
The tags are displayed at the top of the page, in their insertion order.
|
||||
|
||||
Each tag is a link to a *Taxonomy* page displaying all the articles with the given tag.
|
||||
|
||||
## List all the tags
|
||||
|
||||
In the `config.toml` file you can add a shortcut to display all the tags
|
||||
|
||||
```toml
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fas fa-tags'></i> Tags"
|
||||
url = "/tags"
|
||||
weight = 30
|
||||
```
|
@ -1,40 +0,0 @@
|
||||
---
|
||||
date: 2018-11-29T08:41:44+01:00
|
||||
title: Tags
|
||||
weight: 40
|
||||
tags: ["documentation", "tutorial"]
|
||||
---
|
||||
|
||||
|
||||
Le *thème Learn* supporte une des taxonomy par défaut de GoHugo : les tags.
|
||||
|
||||
## Configuration
|
||||
|
||||
Il suffit d'ajouter un tableau de tags sur la page :
|
||||
|
||||
```markdown
|
||||
---
|
||||
date: 2018-11-29T08:41:44+01:00
|
||||
title: Tutoriel pour le thème
|
||||
weight: 15
|
||||
tags: ["tutoriel", "theme"]
|
||||
---
|
||||
```
|
||||
|
||||
## Comportement
|
||||
|
||||
Les tags sont affichés en haut de la page, dans l'ordre dans lequel ils ont été saisis.
|
||||
|
||||
Chaque tag est un lien vers une page *Taxonomy*, qui affiche tous les article avec ce tag.
|
||||
|
||||
|
||||
## Liste des tags
|
||||
|
||||
Il est possible de rajouter un raccourci dans le fichier `config.toml` afin d'afficher une page listant tous les tags
|
||||
|
||||
```toml
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fas fa-tags'></i> Tags"
|
||||
url = "/tags"
|
||||
weight = 30
|
||||
```
|
12
content/self-host/_index.en.md
Executable file
@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Self-host
|
||||
weight: 5
|
||||
pre: "<b>1. </b>"
|
||||
chapter: true
|
||||
---
|
||||
|
||||
### Chapter 1
|
||||
|
||||
# Self-host
|
||||
|
||||
We are continuously developing the server, if you have any comments, please join our [Discord](https://discord.com/invite/nDceKgxnkV) discussion.
|
12
content/self-host/_index.fr.md
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Auto-hébergeur
|
||||
weight: 5
|
||||
pre: "<b>1. </b>"
|
||||
chapter: true
|
||||
---
|
||||
|
||||
### Chapitre 1
|
||||
|
||||
# Auto-hébergeur
|
||||
|
||||
Nous développons continuellement le serveur, si vous avez des commentaires, veuillez rejoindre notre discussion [Discord](https://discord.com/invite/nDceKgxnkV).
|
12
content/self-host/_index.zh.md
Executable file
@ -0,0 +1,12 @@
|
||||
---
|
||||
title: 自建服务器
|
||||
weight: 5
|
||||
pre: "<b>1. </b>"
|
||||
chapter: true
|
||||
---
|
||||
|
||||
### 章节 1
|
||||
|
||||
# 自建服务器
|
||||
|
||||
我们在持续开发服务器,如果您有什么意见,请加入我们的[Discord](https://discord.com/invite/nDceKgxnkV)讨论。
|
BIN
content/self-host/install/.DS_Store
vendored
Normal file
67
content/self-host/install/_index.en.md
Normal file
@ -0,0 +1,67 @@
|
||||
---
|
||||
title: Installation
|
||||
weight: 10
|
||||
---
|
||||
|
||||
## Set up your own cloud by following simple steps
|
||||
-----------
|
||||
|
||||
### STEP-1 : Download server-side software programs
|
||||
|
||||
[Download](https://github.com/rustdesk/rustdesk-server/) or use docker rustdesk/rustdesk-server, **Note:** You need [buy license](https://rustdesk.com/server/) When using this software
|
||||
|
||||
Three platform versions provided:
|
||||
- Linux
|
||||
- Windows
|
||||
|
||||
Below tutorial is based on Linux build.
|
||||
|
||||
There are two executables:
|
||||
- hbbs - RustDesk ID/Rendezvous server
|
||||
- hbbr - RustDesk relay server
|
||||
|
||||
They are built on Centos7, tested on Centos7/8, Ubuntu 18/20.
|
||||
|
||||
### STEP-2 : Run hbbs and hbbr on server
|
||||
|
||||
Run hbbs/hbbr on your server (Centos or Ubuntu). We suggust you use [pm2](https://pm2.keymetrics.io/) managing your service.
|
||||
|
||||
By default, hbbs listens on 21115(tcp) and 21116(tcp/udp), hbbr listens on 21117(tcp). Be sure to open these ports in the firewall.
|
||||
|
||||
- TCP(21115, 21116, 21117)
|
||||
- UDP(21116)
|
||||
|
||||
Please run with "-h" option to see help if you wanna choose your own port.
|
||||
|
||||
#### Docker example
|
||||
```
|
||||
sudo docker image pull rustdesk/rustdesk-server
|
||||
sudo docker run --name hbbr -p 21117:21117 -v `pwd`:/root -it --rm rustdesk/rustdesk-server hbbr -m <registered_email>
|
||||
sudo docker run --name hbbs -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -v `pwd`:/root -it --rm rustdesk/rustdesk-server hbbs -r <relay-server-ip> -m <registered_email>
|
||||
```
|
||||
- Note: If you wish to host the server on your own for demonstration or testing purposes, you can specificy `demo` within the `<registered_email>` flag. This will allow your server to run for 30 days.
|
||||
|
||||
|
||||
### STEP-3 : Set hbbs/hbbr address on client-side
|
||||
|
||||
Click on menu button on the right side of ID as below, choose "ID/Relay Server".
|
||||
|
||||
![](/docs/en/self-host/install/images/server-set-menu.png)
|
||||
|
||||
Please input hbbs host or ip address in ID server input box on remote and local side, and hbbr host or ip address in relay server input box on remote side.
|
||||
|
||||
e.g.
|
||||
|
||||
```
|
||||
hbbs.yourhost.com
|
||||
hbbr.yourhost.com
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
hbbs.yourhost.com:21116
|
||||
hbbr.yourhost.com:21117
|
||||
```
|
||||
|
||||
![](/docs/en/self-host/install/images/server-set-window.png)
|
42
content/self-host/install/_index.fr.md
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Linux
|
||||
weight: 10
|
||||
---
|
||||
|
||||
|
||||
### Installer NodeJs
|
||||
Veuillez [Télécharger](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi) et installer.
|
||||
NodeJs est l'environnement d'exécution de pm2, vous devez donc d'abord installer NodeJs。
|
||||
|
||||
### Installer pm2
|
||||
Entrez ci-dessous dans cmd.exe, appuyez sur la touche Entrée pour chaque ligne et exécutez-les ligne par ligne.
|
||||
```
|
||||
npm install -g pm2
|
||||
npm install pm2-windows-startup -g
|
||||
pm2-startup install
|
||||
```
|
||||
|
||||
### Exécutez hbbr et hbbs
|
||||
Téléchargez la version Windows du [programme serveur](https://github.com/rustdesk/rustdesk-server/releases), en supposant que vous la décompressez sur le lecteur C. Exécutez respectivement les quatre lignes de commandes suivantes.
|
||||
```
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m <Adresse e-mail enregistrée>
|
||||
pm2 start hbbs.exe -- -r <L'adresse de l'hôte sur lequel hbbr est exécuté> -m <Adresse e-mail enregistrée>
|
||||
pm2 save
|
||||
```
|
||||
|
||||
### Afficher le journal
|
||||
```
|
||||
pm2 log hbbr
|
||||
pm2 log hbbs
|
||||
```
|
||||
|
||||
### Modifier l'e-mail
|
||||
Par exemple, la nouvelle adresse e-mail enregistrée est test@test.com, et l'adresse publique de hbbr est test.hbbr.com
|
||||
```
|
||||
pm2 delete hbbr hbbs
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m test@test.com
|
||||
pm2 start hbbs.exe -- -r test.hbbr.com -m test@test.com
|
||||
pm2 save
|
||||
```
|
79
content/self-host/install/_index.zh.md
Normal file
@ -0,0 +1,79 @@
|
||||
---
|
||||
title: 安装
|
||||
weight: 10
|
||||
---
|
||||
|
||||
## 如何自建中继
|
||||
-----------
|
||||
|
||||
### 步骤1: 下载服务器端软件程序
|
||||
|
||||
[下载](https://gitee.com/rustdesk/rustdesk-server/)或者使用docker rustdesk/rustdesk-server,**注意**: 你需要[购买许可](https://rustdesk.com/server/)才能正常运行本程序
|
||||
|
||||
提供三个版本:
|
||||
- Linux
|
||||
- Windows
|
||||
|
||||
以下针对Linux版本做使用说明。
|
||||
|
||||
有两个可执行文件:
|
||||
- hbbs - RustDesk ID注册服务器
|
||||
- hbbr - RustDesk 中继服务器
|
||||
|
||||
下载后务必
|
||||
```
|
||||
chmod a+x hbbs hbbr
|
||||
```
|
||||
|
||||
Linux版本在Centos7构建,在 Centos7/8,Ubuntu 18/20上测试过,Debian系列的发行版本应该都没有问题。如果有其他发行版本需求,请联系我。
|
||||
|
||||
#### 服务器要求
|
||||
硬件要求很低,最低配置的云服务器就可以了,CPU和内存要求都是最小的。关于网络大小,如果TCP打洞直连失败,就要耗费中继流量,一个中继连接的流量在30k-3M每秒之间(1920x1080屏幕),取决于清晰度设置和画面变化,如果只是办公需求,平均在100K。
|
||||
|
||||
### 步骤2: 在服务器上运行 hbbs 和 hbbr
|
||||
|
||||
在服务器上运行 hbbs/hbbr (Centos 或 Ubuntu)。建议使用[pm2](https://pm2.keymetrics.io/) 管理服务。
|
||||
|
||||
需要先运行 hbbr, 可以不带任何参数;
|
||||
然后运行 hbbs:
|
||||
```
|
||||
./hbbs -r <hbbr运行所在主机的地址>
|
||||
```
|
||||
hhbs的-r参数不是必须的,他只是方便你不用在客户端指定中继服务器。客户端指定的中继服务器优先级高于这个。
|
||||
|
||||
默认情况下,hbbs 监听21114(tcp), 21115(tcp), 21116(tcp/udp), 21118(tcp),hbbr 监听21117(tcp), 21119(tcp)。务必在防火墙开启这几个端口, **请注意21116同时要开启TCP和UDP**。其中21115是hbbs用作NAT类型测试,21116/UDP是hbbs用作ID注册与心跳服务,21116/TCP是hbbs用作TCP打洞与连接服务,21117是hbbr用作中继服务, 21118和21119是为了支持网页客户端,21114是网页控制台和API。
|
||||
|
||||
- TCP(21114, 21115, 21116, 21117, 21118, 21119)
|
||||
- UDP(21116)
|
||||
|
||||
如果你想选择**自己的端口**,使用 “-h” 选项查看帮助。
|
||||
|
||||
#### Docker示范
|
||||
```
|
||||
sudo docker image pull rustdesk/rustdesk-server
|
||||
sudo docker run --name hbbr -p 21117:21117 -p 21119:21119 -v `pwd`:/root -it --rm rustdesk/rustdesk-server hbbr -m <registered_email>
|
||||
sudo docker run --name hbbs -p 21114:21114 -p 21115:21115 -p 21116:21116 -p 21116:21116/udp -p 21118:21118 -v `pwd`:/root -it --rm rustdesk/rustdesk-server hbbs -r <relay-server-ip> -m <registered_email>
|
||||
```
|
||||
|
||||
### 步骤3: 在客户端设置 hbbs/hbbr 地址
|
||||
|
||||
点击 ID 右侧的菜单按钮如下,选择“ ID/中继服务器”。
|
||||
|
||||
![](/docs/en/self-host/install/images/server-set-menu-zh.png)
|
||||
|
||||
在 ID 服务器输入框中(被控端+主控端)输入 hbbs 主机或 ip 地址,在中继服务器输入框中(被控制的一端,主控端无需设置)输入 hbbr 主机或 ip 地址。
|
||||
|
||||
**请注意**图中的Key不是指的注册邮箱,对应的是hhbr/hhbs的-k参数,这是为了防止别人盗用你的hbbr/hbbs使用。
|
||||
|
||||
例如:
|
||||
|
||||
```
|
||||
hbbs.yourhost.com
|
||||
```
|
||||
|
||||
或者
|
||||
|
||||
```
|
||||
hbbs.yourhost.com:21116
|
||||
```
|
||||
![](/docs/en/self-host/install/images/server-set-window-zh.png)
|
BIN
content/self-host/install/images/.DS_Store
vendored
Normal file
BIN
content/self-host/install/images/server-set-menu-zh.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
content/self-host/install/images/server-set-menu.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
content/self-host/install/images/server-set-window-zh.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
content/self-host/install/images/server-set-window.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
42
content/self-host/windows/_index.en.md
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Windows
|
||||
weight: 20
|
||||
---
|
||||
|
||||
|
||||
### Install NodeJs
|
||||
Please [Download](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi) and install.
|
||||
NodeJs is the runtime environment of pm2, so you need to install NodeJs first。
|
||||
|
||||
### Install pm2
|
||||
Enter belows in cmd.exe, press the Enter key for each line, and run them line by line.
|
||||
```
|
||||
npm install -g pm2
|
||||
npm install pm2-windows-startup -g
|
||||
pm2-startup install
|
||||
```
|
||||
|
||||
### Run hbbr and hbbs
|
||||
Download the windows version of [server program](https://github.com/rustdesk/rustdesk-server/releases), assuming you unzip it to the C drive. Run the following four lines of commands respectively.
|
||||
```
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m <Registered email address>
|
||||
pm2 start hbbs.exe -- -r <The address of the host where hbbr is running> -m <Registered email address>
|
||||
pm2 save
|
||||
```
|
||||
|
||||
### View log
|
||||
```
|
||||
pm2 log hbbr
|
||||
pm2 log hbbs
|
||||
```
|
||||
|
||||
### Modify email
|
||||
For example, the new registered email address is test@test.com, and the public address of hbbr is test.hbbr.com
|
||||
```
|
||||
pm2 delete hbbr hbbs
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m test@test.com
|
||||
pm2 start hbbs.exe -- -r test.hbbr.com -m test@test.com
|
||||
pm2 save
|
||||
```
|
42
content/self-host/windows/_index.fr.md
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
title: Windows
|
||||
weight: 20
|
||||
---
|
||||
|
||||
|
||||
### Installer NodeJs
|
||||
Veuillez [Télécharger](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi) et installer.
|
||||
NodeJs est l'environnement d'exécution de pm2, vous devez donc d'abord installer NodeJs。
|
||||
|
||||
### Installer pm2
|
||||
Entrez ci-dessous dans cmd.exe, appuyez sur la touche Entrée pour chaque ligne et exécutez-les ligne par ligne.
|
||||
```
|
||||
npm install -g pm2
|
||||
npm install pm2-windows-startup -g
|
||||
pm2-startup install
|
||||
```
|
||||
|
||||
### Exécutez hbbr et hbbs
|
||||
Téléchargez la version Windows du [programme serveur](https://github.com/rustdesk/rustdesk-server/releases), en supposant que vous la décompressez sur le lecteur C. Exécutez respectivement les quatre lignes de commandes suivantes.
|
||||
```
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m <Adresse e-mail enregistrée>
|
||||
pm2 start hbbs.exe -- -r <L'adresse de l'hôte sur lequel hbbr est exécuté> -m <Adresse e-mail enregistrée>
|
||||
pm2 save
|
||||
```
|
||||
|
||||
### Afficher le journal
|
||||
```
|
||||
pm2 log hbbr
|
||||
pm2 log hbbs
|
||||
```
|
||||
|
||||
### Modifier l'e-mail
|
||||
Par exemple, la nouvelle adresse e-mail enregistrée est test@test.com, et l'adresse publique de hbbr est test.hbbr.com
|
||||
```
|
||||
pm2 delete hbbr hbbs
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m test@test.com
|
||||
pm2 start hbbs.exe -- -r test.hbbr.com -m test@test.com
|
||||
pm2 save
|
||||
```
|
41
content/self-host/windows/_index.zh.md
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
title: Windows
|
||||
weight: 20
|
||||
---
|
||||
|
||||
### 安装NodeJs
|
||||
请点击[下载](https://nodejs.org/dist/v16.14.2/node-v16.14.2-x86.msi)安装,可能会有点慢,如果卡顿太久,尝试关掉重新安装。
|
||||
NodeJs是pm2的运行时环境,所以要先安装NodeJs。
|
||||
|
||||
### 安装pm2
|
||||
在cmd.exe中分别输入下面三行,每一行都要按回车键,一行一行运行。
|
||||
```
|
||||
npm install -g pm2
|
||||
npm install pm2-windows-startup -g
|
||||
pm2-startup install
|
||||
```
|
||||
|
||||
### 运行hbbr和hbbs
|
||||
下载Windows版本[服务器程序](https://gitee.com/rustdesk/rustdesk-server/releases),假设你解压缩到了C盘下。分别运行下面四行命令。
|
||||
```
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m 注册邮箱地址
|
||||
pm2 start hbbs.exe -- -r hbbr运行所在主机的地址 -m 注册邮箱地址
|
||||
pm2 save
|
||||
```
|
||||
|
||||
### 查看log
|
||||
```
|
||||
pm2 log hbbr
|
||||
pm2 log hbbs
|
||||
```
|
||||
|
||||
### 更换注册邮箱
|
||||
比如新的注册邮箱是test@test.com,hbbr的公网地址是test.hbbr.com
|
||||
```
|
||||
pm2 delete hbbr hbbs
|
||||
cd c:\rustdesk-server-windows-x64
|
||||
pm2 start hbbr.exe -- -m test@test.com
|
||||
pm2 start hbbs.exe -- -r test.hbbr.com -m test@test.com
|
||||
pm2 save
|
||||
```
|
@ -1,16 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Shortcodes
|
||||
pre: "<b>3. </b>"
|
||||
weight: 15
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
To avoid this limitations, Hugo created [shortcodes](https://gohugo.io/extras/shortcodes/). A shortcode is a simple snippet inside a page.
|
||||
|
||||
**Hugo-theme-learn** provides multiple shortcodes on top of existing ones.
|
||||
|
||||
{{%children style="h2" description="true" %}}
|
@ -1,16 +0,0 @@
|
||||
---
|
||||
date: 2016-04-09T16:50:16+02:00
|
||||
title: Shortcodes
|
||||
pre: "<b>3. </b>"
|
||||
weight: 15
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
**Hugo-theme-learn** fournit de multiple shortcodes en plus de ceux existant.
|
||||
|
||||
{{%children style="h2" description="true" %}}
|
Before Width: | Height: | Size: 18 KiB |
@ -1 +0,0 @@
|
||||
This file was downloaded from Hugo Learn Theme.
|
@ -1,85 +0,0 @@
|
||||
---
|
||||
title: Attachments
|
||||
description : "The Attachments shortcode displays a list of files attached to a page."
|
||||
---
|
||||
|
||||
The Attachments shortcode displays a list of files attached to a page.
|
||||
|
||||
{{% attachments /%}}
|
||||
|
||||
## Usage
|
||||
|
||||
The shortcurt lists files found in a **specific folder**.
|
||||
Currently, it support two implementations for pages
|
||||
|
||||
1. If your page is a markdown file, attachements must be placed in a **folder** named like your page and ending with **.files**.
|
||||
|
||||
> * content
|
||||
> * _index.md
|
||||
> * page.files
|
||||
> * attachment.pdf
|
||||
> * page.md
|
||||
|
||||
2. If your page is a **folder**, attachements must be placed in a nested **'files'** folder.
|
||||
|
||||
> * content
|
||||
> * _index.md
|
||||
> * page
|
||||
> * index.md
|
||||
> * files
|
||||
> * attachment.pdf
|
||||
|
||||
Be aware that if you use a multilingual website, you will need to have as many folders as languages.
|
||||
|
||||
That's all!
|
||||
|
||||
### Parameters
|
||||
|
||||
| Parameter | Default | Description |
|
||||
|:--|:--|:--|
|
||||
| title | "Attachments" | List's title |
|
||||
| style | "" | Choose between "orange", "grey", "blue" and "green" for nice style |
|
||||
| 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). |
|
||||
|
||||
For example:
|
||||
|
||||
* To match a file suffix of '.jpg', use `.*\.jpg$` (not `*.jpg`).
|
||||
* To match file names ending in '.jpg' or '.png', use `.*\.(jpg|png)$`.
|
||||
|
||||
### Examples
|
||||
|
||||
#### List of attachments ending in pdf or mp4
|
||||
|
||||
|
||||
{{%/*attachments title="Related files" pattern=".*\.(pdf|mp4)$"/*/%}}
|
||||
|
||||
renders as
|
||||
|
||||
{{%attachments title="Related files" pattern=".*\.(pdf|mp4)$"/%}}
|
||||
|
||||
#### Colored styled box
|
||||
|
||||
{{%/*attachments style="orange" /*/%}}
|
||||
|
||||
renders as
|
||||
|
||||
{{% attachments style="orange" /%}}
|
||||
|
||||
|
||||
{{%/*attachments style="grey" /*/%}}
|
||||
|
||||
renders as
|
||||
|
||||
{{% attachments style="grey" /%}}
|
||||
|
||||
{{%/*attachments style="blue" /*/%}}
|
||||
|
||||
renders as
|
||||
|
||||
{{% attachments style="blue" /%}}
|
||||
|
||||
{{%/*attachments style="green" /*/%}}
|
||||
|
||||
renders as
|
||||
|
||||
{{% attachments style="green" /%}}
|
Before Width: | Height: | Size: 18 KiB |
@ -1 +0,0 @@
|
||||
Ce fichier a été téléchargé à partir du Hugo Learn Theme.
|
@ -1,85 +0,0 @@
|
||||
---
|
||||
title: Attachments (Pièces jointes)
|
||||
description : "The Attachments shortcode displays a list of files attached to a page."
|
||||
---
|
||||
|
||||
Le shortcode *Attachments* affiche une liste de pièces jointes d'une page.
|
||||
|
||||
{{% attachments /%}}
|
||||
|
||||
## Utilisation
|
||||
|
||||
Le shortcode affiche la liste de fichiers trouvés dans un **dossier spécifique**
|
||||
A l'heure actuelle, il supporte deux implémentations
|
||||
|
||||
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**.
|
||||
|
||||
> * content
|
||||
> * _index.md
|
||||
> * page.files
|
||||
> * attachment.pdf
|
||||
> * page.md
|
||||
|
||||
2. Si votre page est un **dossier**, les pièces jointes doivent être placées dans un dossier fils **'files'**.
|
||||
|
||||
> * content
|
||||
> * _index.md
|
||||
> * page
|
||||
> * index.md
|
||||
> * files
|
||||
> * attachment.pdf
|
||||
|
||||
Attention, si votre site est multi-langue, vous devrez avec autant de dossier qu'il y a de langues.
|
||||
|
||||
C'est tout !
|
||||
|
||||
### Paramètres
|
||||
|
||||
| Paramètre | Défaut | Description |
|
||||
|:--|:--|:--|
|
||||
| title | "Pièces jointes" | Titre de la liste |
|
||||
| style | "" | Choisir entre "orange", "grey", "blue" et "green" pour un style plus sympa |
|
||||
| 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). |
|
||||
|
||||
Par exemple:
|
||||
|
||||
* Pour trouver les fichiers avec le suffixe '.jpg', utilisez `.*\.jpg$` (pas `*.jpg`).
|
||||
* Pour trouver les fichiers avec les suffixe '.jpg' ou '.png', utilisez `.*\.(jpg|png)$`.
|
||||
|
||||
### Exemples
|
||||
|
||||
#### Lister les pièces jointes de type pdf ou mp4
|
||||
|
||||
|
||||
{{%/*attachments title="Fichiers associés" pattern=".*\.(pdf|mp4)$"/*/%}}
|
||||
|
||||
s'affiche comme
|
||||
|
||||
{{%attachments title="Fichiers associés" pattern=".*\.(pdf|mp4)$"/%}}
|
||||
|
||||
#### Modifier le style
|
||||
|
||||
{{%/*attachments style="orange" /*/%}}
|
||||
|
||||
s'affiche comme
|
||||
|
||||
{{% attachments style="orange" /%}}
|
||||
|
||||
|
||||
{{%/*attachments style="grey" /*/%}}
|
||||
|
||||
s'affiche comme
|
||||
|
||||
{{% attachments style="grey" /%}}
|
||||
|
||||
{{%/*attachments style="blue" /*/%}}
|
||||
|
||||
s'affiche comme
|
||||
|
||||
{{% attachments style="blue" /%}}
|
||||
|
||||
{{%/*attachments style="green" /*/%}}
|
||||
|
||||
s'affiche comme
|
||||
|
||||
{{% attachments style="green" /%}}
|
@ -1,16 +0,0 @@
|
||||
---
|
||||
title: Button
|
||||
description : "Nice buttons on your page."
|
||||
---
|
||||
|
||||
A button is a just a clickable button with optional icon.
|
||||
|
||||
```
|
||||
{{%/* button href="https://getgrav.org/" */%}}Get Grav{{%/* /button */%}}
|
||||
{{%/* button href="https://getgrav.org/" icon="fas fa-download" */%}}Get Grav with icon{{%/* /button */%}}
|
||||
{{%/* button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" */%}}Get Grav with icon right{{%/* /button */%}}
|
||||
```
|
||||
|
||||
{{% button href="https://getgrav.org/" %}}Get Grav{{% /button %}}
|
||||
{{% button href="https://getgrav.org/" icon="fas fa-download" %}}Get Grav with icon{{% /button %}}
|
||||
{{% button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" %}}Get Grav with icon right{{% /button %}}
|
@ -1,16 +0,0 @@
|
||||
---
|
||||
title: Button (Bouton)
|
||||
description : "De beaux boutons sur votre page."
|
||||
---
|
||||
|
||||
Le shortcode *button* est simplement un bouton cliquable avec une icône optionnelle.
|
||||
|
||||
```
|
||||
{{%/* button href="https://getgrav.org/" */%}}Téléchargez Grav{{%/* /button */%}}
|
||||
{{%/* button href="https://getgrav.org/" icon="fas fa-download" */%}}Téléchargez Grav avec icône{{%/* /button */%}}
|
||||
{{%/* button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" */%}}Téléchargez Grav avec icône à droite{{%/* /button */%}}
|
||||
```
|
||||
|
||||
{{% button href="https://getgrav.org/" %}}Téléchargez Grav{{% /button %}}
|
||||
{{% button href="https://getgrav.org/" icon="fas fa-download" %}}Téléchargez Grav avec icône{{% /button %}}
|
||||
{{% button href="https://getgrav.org/" icon="fas fa-download" icon-position="right" %}}Téléchargez Grav avec icône à droite{{% /button %}}
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
title : Children
|
||||
description : List the child pages of a page
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
## Usage
|
||||
|
||||
| Parameter | Default | Description |
|
||||
|:--|:--|:--|
|
||||
| page | _current_ | Specify the page name (section name) to display children for |
|
||||
| style | "li" | Choose the style used to display descendants. It could be any HTML tag name |
|
||||
| showhidden | "false" | When true, child pages hidden from the menu will be displayed |
|
||||
| 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/) |
|
||||
| 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 |
|
||||
| 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 |
|
||||
|
||||
## Demo
|
||||
|
||||
{{%/* children */%}}
|
||||
|
||||
{{% children %}}
|
||||
|
||||
{{%/* children description="true" */%}}
|
||||
|
||||
{{%children description="true" %}}
|
||||
|
||||
{{%/* children depth="3" showhidden="true" */%}}
|
||||
|
||||
{{% children depth="3" showhidden="true" %}}
|
||||
|
||||
{{%/* children style="h2" depth="3" description="true" */%}}
|
||||
|
||||
{{% children style="h2" depth="3" description="true" %}}
|
||||
|
||||
{{%/* children style="div" depth="999" */%}}
|
||||
|
||||
{{% children style="div" depth="999" %}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
title : Children (Pages filles)
|
||||
description : Liste les pages filles de la page
|
||||
---
|
||||
|
||||
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.
|
||||
|
||||
## Utilisation
|
||||
|
||||
| Paramètre | Défaut | Description |
|
||||
|:--|:--|:--|
|
||||
| page | _current_ | Spécifie le nom de la page (nom de la section) à afficher |
|
||||
| style | "li" | Choisi le style à utiliser pour afficher les descendants. Cela peut être n'importe quel balise HTML |
|
||||
| showhidden | "false" | Quand *true*, pages filles cachées dans le menu seront affichées quand même |
|
||||
| description | "false" | Permet d'inclure le texte de la description de la page sous chaque entré de la liste.<br/>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/) |
|
||||
| depth | 1 | Nombre de descendants à afficher. Par exemple, si la valeur est 2, le shortcode va afficher 2 niveaux de pages filels. <br/> **Astuce:** Utilisez 999 pour avoir tous les descendants|
|
||||
| sort | <rien> | Tri les pages filles par<br><li><strong>Weight</strong> - Poids</li><li><strong>Name</strong> - Nom</li><li><strong>Identifier</strong> - Trier alphabétiquement par identifiant configuré dans le front matter</li><li><strong>URL</strong> - URL</li> |
|
||||
|
||||
## Démo
|
||||
|
||||
{{%/* children */%}}
|
||||
|
||||
{{% children %}}
|
||||
|
||||
{{%/* children description="true" */%}}
|
||||
|
||||
{{%children description="true" %}}
|
||||
|
||||
{{%/* children depth="3" showhidden="true" */%}}
|
||||
|
||||
{{% children depth="3" showhidden="true" %}}
|
||||
|
||||
{{%/* children style="h2" depth="3" description="true" */%}}
|
||||
|
||||
{{% children style="h2" depth="3" description="true" %}}
|
||||
|
||||
{{%/* children style="div" depth="999" */%}}
|
||||
|
||||
{{% children style="div" depth="999" %}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 1"
|
||||
description = "This is a demo child page"
|
||||
+++
|
||||
|
||||
This is a demo child page
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 1"
|
||||
description = "Ceci est une page test"
|
||||
+++
|
||||
|
||||
Ceci est une page de demo
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 1-1"
|
||||
description = "This is a demo child page"
|
||||
+++
|
||||
|
||||
This is a demo child page
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 1-1"
|
||||
description = "Ceci est une page test"
|
||||
+++
|
||||
|
||||
Ceci est une page de demo
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 1-1-1"
|
||||
description = "This is a demo child page"
|
||||
+++
|
||||
|
||||
This is a demo child page
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 1-1-1"
|
||||
description = "Ceci est une page test"
|
||||
+++
|
||||
|
||||
Ceci est une page de demo
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 1-1-1-1"
|
||||
description = "This is a demo child page"
|
||||
+++
|
||||
|
||||
This is a demo child page
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 1-1-1-1"
|
||||
description = "Ceci est une page test"
|
||||
+++
|
||||
|
||||
Ceci est une page de demo
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 1-1-1-1-1"
|
||||
description = "This is a demo child page"
|
||||
+++
|
||||
|
||||
This is a demo child page
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 1-1-1-1-1"
|
||||
description = "Ceci est une page test"
|
||||
+++
|
||||
|
||||
Ceci est une page de demo
|
@ -1,11 +0,0 @@
|
||||
+++
|
||||
title = "page 2"
|
||||
description = ""
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -1,11 +0,0 @@
|
||||
+++
|
||||
title = "page 2"
|
||||
description = ""
|
||||
+++
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page test 3"
|
||||
description = "This is a page test"
|
||||
+++
|
||||
|
||||
This is a test 3 demo child page
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page test 3"
|
||||
description = "Ceci est une page test"
|
||||
+++
|
||||
|
||||
Ceci est une page de demo test 3
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 3"
|
||||
description = "This is a demo child page"
|
||||
+++
|
||||
|
||||
This is a demo child page, not displayed in the menu
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page 3"
|
||||
description = "Ceci est une page test"
|
||||
+++
|
||||
|
||||
Ceci est une page de demo
|
@ -1,7 +0,0 @@
|
||||
+++
|
||||
title = "page 4"
|
||||
description = "This is a demo child page"
|
||||
hidden = true
|
||||
+++
|
||||
|
||||
This is a demo child page, not displayed in the menu
|
@ -1,7 +0,0 @@
|
||||
+++
|
||||
title = "page 4"
|
||||
description = "Ceci est une page test"
|
||||
hidden = true
|
||||
+++
|
||||
|
||||
Ceci est une page de demo
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page test"
|
||||
description = "This is a page test"
|
||||
+++
|
||||
|
||||
This is a test demo child page
|
@ -1,6 +0,0 @@
|
||||
+++
|
||||
title = "page test"
|
||||
description = "Ceci est une page test"
|
||||
+++
|
||||
|
||||
Ceci est une page de demo
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
title : Expand
|
||||
description : "Displays an expandable/collapsible section of text on your page"
|
||||
---
|
||||
|
||||
The Expand shortcode displays an expandable/collapsible section of text on your page.
|
||||
Here is an example
|
||||
|
||||
{{%expand%}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
{{%/expand%}}
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
this shortcode takes exactly one optional parameter to define the text that appears next to the expand/collapse icon. (default is "Expand me...")
|
||||
|
||||
{{%/*expand "Is this learn theme rocks ?" */%}}Yes !.{{%/* /expand*/%}}
|
||||
|
||||
{{%expand "Is this learn theme rocks ?" %}}Yes !{{% /expand%}}
|
||||
|
||||
# Demo
|
||||
|
||||
{{%/*expand*/%}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
{{%/* /expand*/%}}
|
||||
|
||||
|
||||
{{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}}
|
@ -1,45 +0,0 @@
|
||||
---
|
||||
title : Expand
|
||||
description : "Affiche une section de texte qui se plie et se déplie"
|
||||
---
|
||||
|
||||
Le shortcode *Expand* affiche une section de texte qui se plie et se déplie.
|
||||
Ci-dessous un exemple.
|
||||
|
||||
{{%expand%}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
{{%/expand%}}
|
||||
|
||||
|
||||
## Utilisation
|
||||
|
||||
|
||||
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...")
|
||||
|
||||
{{%/*expand "Est-ce que ce thème envoie du pâté ?" */%}}Oui !.{{%/* /expand*/%}}
|
||||
|
||||
{{%expand "Est-ce que ce thème envoie du pâté ?" %}}Oui !{{% /expand%}}
|
||||
|
||||
# Demo
|
||||
|
||||
{{%/*expand*/%}}
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
{{%/* /expand*/%}}
|
||||
|
||||
|
||||
{{%expand%}}Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
|
||||
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
|
||||
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
|
||||
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
|
||||
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
|
||||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.{{% /expand%}}
|
@ -1,210 +0,0 @@
|
||||
---
|
||||
title : "Mermaid"
|
||||
description : "Generation of diagram and flowchart from text in a similar manner as markdown"
|
||||
---
|
||||
|
||||
[Mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown.
|
||||
|
||||
Just insert your mermaid code in the `mermaid` shortcode and that's it.
|
||||
|
||||
## Flowchart example
|
||||
|
||||
{{</*mermaid align="left"*/>}}
|
||||
graph LR;
|
||||
A[Hard edge] -->|Link text| B(Round edge)
|
||||
B --> C{Decision}
|
||||
C -->|One| D[Result one]
|
||||
C -->|Two| E[Result two]
|
||||
{{</* /mermaid */>}}
|
||||
|
||||
renders as
|
||||
|
||||
{{<mermaid align="left">}}
|
||||
graph LR;
|
||||
A[Hard edge] -->|Link text| B(Round edge)
|
||||
B --> C{Decision}
|
||||
C -->|One| D[Result one]
|
||||
C -->|Two| E[Result two]
|
||||
{{</mermaid>}}
|
||||
|
||||
## Sequence example
|
||||
|
||||
{{</* mermaid */>}}
|
||||
sequenceDiagram
|
||||
participant Alice
|
||||
participant Bob
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Rational thoughts <br/>prevail...
|
||||
John-->Alice: Great!
|
||||
John->Bob: How about you?
|
||||
Bob-->John: Jolly good!
|
||||
{{</* /mermaid */>}}
|
||||
|
||||
renders as
|
||||
|
||||
{{<mermaid>}}
|
||||
sequenceDiagram
|
||||
participant Alice
|
||||
participant Bob
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Rational thoughts <br/>prevail...
|
||||
John-->Alice: Great!
|
||||
John->Bob: How about you?
|
||||
Bob-->John: Jolly good!
|
||||
{{</mermaid>}}
|
||||
|
||||
## GANTT Example
|
||||
|
||||
{{</* mermaid */>}}
|
||||
gantt
|
||||
dateFormat YYYY-MM-DD
|
||||
title Adding GANTT diagram functionality to mermaid
|
||||
section A section
|
||||
Completed task :done, des1, 2014-01-06,2014-01-08
|
||||
Active task :active, des2, 2014-01-09, 3d
|
||||
Future task : des3, after des2, 5d
|
||||
Future task2 : des4, after des3, 5d
|
||||
section Critical tasks
|
||||
Completed task in the critical line :crit, done, 2014-01-06,24h
|
||||
Implement parser and jison :crit, done, after des1, 2d
|
||||
Create tests for parser :crit, active, 3d
|
||||
Future task in critical line :crit, 5d
|
||||
Create tests for renderer :2d
|
||||
Add to mermaid :1d
|
||||
{{</* /mermaid */>}}
|
||||
|
||||
|
||||
renders as
|
||||
|
||||
{{<mermaid>}}
|
||||
gantt
|
||||
dateFormat YYYY-MM-DD
|
||||
title Adding GANTT diagram functionality to mermaid
|
||||
section A section
|
||||
Completed task :done, des1, 2014-01-06,2014-01-08
|
||||
Active task :active, des2, 2014-01-09, 3d
|
||||
Future task : des3, after des2, 5d
|
||||
Future task2 : des4, after des3, 5d
|
||||
section Critical tasks
|
||||
Completed task in the critical line :crit, done, 2014-01-06,24h
|
||||
Implement parser and jison :crit, done, after des1, 2d
|
||||
Create tests for parser :crit, active, 3d
|
||||
Future task in critical line :crit, 5d
|
||||
Create tests for renderer :2d
|
||||
Add to mermaid :1d
|
||||
{{</mermaid>}}
|
||||
|
||||
|
||||
### Class example
|
||||
|
||||
{{</* mermaid */>}}
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
Class03 *-- Class04
|
||||
Class05 o-- Class06
|
||||
Class07 .. Class08
|
||||
Class09 --> C2 : Where am i?
|
||||
Class09 --* C3
|
||||
Class09 --|> Class07
|
||||
Class07 : equals()
|
||||
Class07 : Object[] elementData
|
||||
Class01 : size()
|
||||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
Class08 <--> C2: Cool label
|
||||
{{</* /mermaid */>}}
|
||||
|
||||
renders as
|
||||
|
||||
|
||||
{{<mermaid>}}
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
Class03 *-- Class04
|
||||
Class05 o-- Class06
|
||||
Class07 .. Class08
|
||||
Class09 --> C2 : Where am i?
|
||||
Class09 --* C3
|
||||
Class09 --|> Class07
|
||||
Class07 : equals()
|
||||
Class07 : Object[] elementData
|
||||
Class01 : size()
|
||||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
Class08 <--> C2: Cool label
|
||||
{{</mermaid>}}
|
||||
|
||||
|
||||
### Git example
|
||||
|
||||
{{</* mermaid */>}}
|
||||
gitGraph:
|
||||
options
|
||||
{
|
||||
"nodeSpacing": 150,
|
||||
"nodeRadius": 10
|
||||
}
|
||||
end
|
||||
commit
|
||||
branch newbranch
|
||||
checkout newbranch
|
||||
commit
|
||||
commit
|
||||
checkout master
|
||||
commit
|
||||
commit
|
||||
merge newbranch
|
||||
{{</* /mermaid*/>}}
|
||||
|
||||
renders as
|
||||
|
||||
{{<mermaid>}}
|
||||
gitGraph:
|
||||
options
|
||||
{
|
||||
"nodeSpacing": 150,
|
||||
"nodeRadius": 10
|
||||
}
|
||||
end
|
||||
commit
|
||||
branch newbranch
|
||||
checkout newbranch
|
||||
commit
|
||||
commit
|
||||
checkout master
|
||||
commit
|
||||
commit
|
||||
merge newbranch
|
||||
{{</mermaid>}}
|
||||
|
||||
### State Diagrams
|
||||
|
||||
{{</* mermaid */>}}
|
||||
stateDiagram-v2
|
||||
open: Open Door
|
||||
closed: Closed Door
|
||||
locked: Locked Door
|
||||
open --> closed: Close
|
||||
closed --> locked: Lock
|
||||
locked --> closed: Unlock
|
||||
closed --> open: Open
|
||||
{{</* /mermaid */>}}
|
||||
|
||||
renders as
|
||||
|
||||
{{<mermaid>}}
|
||||
stateDiagram-v2
|
||||
open: Open Door
|
||||
closed: Closed Door
|
||||
locked: Locked Door
|
||||
open --> closed: Close
|
||||
closed --> locked: Lock
|
||||
locked --> closed: Unlock
|
||||
closed --> open: Open
|
||||
{{</mermaid>}}
|