mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
Fix markdown guide
This commit is contained in:
parent
d8a43cbd25
commit
94cba7fa6b
2 changed files with 30 additions and 30 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
Markdown is a markup language created in 2004, many add-ons developing the possibilities of this language exist. The objective of this guide is to aim for the exhaustiveness of the possibilities of this formatting language within the framework of the YunoHost documentation and not Markdown languages in general.
|
||||
|
||||
Markdown allows text to be formatted using tags, it allows *human* reading of the text; even with formatting. Even if only one notepad is needed there are many markdowns software (Markdown on [framalibre.org](https://framalibre.org/recherche-par-crit-res?keys=markdown)). It is relatively easy to use.
|
||||
Markdown allows text to be formatted using tags, it allows *human* reading of the text; even with formatting. Even if only one notepad is needed there are many markdowns software (Markdown on [framalibre.org (fr)](https://framalibre.org/recherche-par-crit-res?keys=markdown)). It is relatively easy to use.
|
||||
|
||||
## The different levels of titles
|
||||
|
||||
|
@ -12,8 +12,8 @@ By writing titles as follows:
|
|||
## Level 2 title
|
||||
### Level 3 title
|
||||
#### Level 4 title
|
||||
### Level 5 title
|
||||
#### Level 6 title
|
||||
##### Level 5 title
|
||||
###### Level 6 title
|
||||
```
|
||||
|
||||
They appear like this:
|
||||
|
@ -21,8 +21,8 @@ They appear like this:
|
|||
## Level 2 title
|
||||
### Level 3 title
|
||||
#### Level 4 title
|
||||
### Level 5 title
|
||||
#### Level 6 title
|
||||
##### Level 5 title
|
||||
###### Level 6 title
|
||||
|
||||
## Formatting in paragraphs
|
||||
|
||||
|
@ -42,7 +42,7 @@ For text in *italic you have to frame it with an asterisk* `*`
|
|||
To write **bold text by two asterisks** `**`
|
||||
You can also ~~bar the text~~ by framing it with two tildes `~`
|
||||
|
||||
## Create links ##
|
||||
## Create links
|
||||
|
||||
To create a link to a site outside of the YunoHost documentation:
|
||||
|
||||
|
@ -53,13 +53,13 @@ To create a link to a site outside of the YunoHost documentation:
|
|||
will be displayed as such:
|
||||
[Text to display](https://lelien.tld)
|
||||
|
||||
It is the same for the documentation pages, except that the link is internal. It refers to the wiki file, without language and file extension (the `_en.md`) :
|
||||
It is the same for the documentation pages, except that the link is internal. It refers to the wiki file, without language and file extension (the `_fr.md`) :
|
||||
```markdown
|
||||
[Wiki Page](/write_documentation)
|
||||
```
|
||||
|
||||
The link will return to the page with the correct language setting if the page exists.
|
||||
Wiki page](/write_documentation)
|
||||
[Wiki page](/write_documentation)
|
||||
|
||||
### Create anchors
|
||||
An anchor allows you to make a link to a specific point in a page, that's how the indexes at the top of the page work. To create an anchor, you need to insert code at the anchor location in the following form :
|
||||
|
@ -75,28 +75,28 @@ It is also possible to return an anchor directly to the title, noting the link i
|
|||
All that remains is to designate the anchor to the text you want to make interactive:
|
||||
|
||||
```markdown
|
||||
[My Anchor Returns to Lists] [#AnchorName]
|
||||
[My Anchor that refers to the title of the tables](#the tables)
|
||||
[My Anchor Returns to Lists](#anchorname)
|
||||
[My Anchor that refers to the title of the tables](#tables)
|
||||
```
|
||||
|
||||
[My Anchor Returns to Lists] [#AnchorName]
|
||||
[My Anchor that refers to the title of the tables](#the tables)
|
||||
[My Anchor Returns to Lists](#anchorame)
|
||||
[My Anchor that refers to the title of the tables](#tables)
|
||||
|
||||
## Displaying images
|
||||
|
||||
To display images, the principle is the same as for links, except that a `!` is added before the text to be displayed, which is considered here as the text to be displayed if the image cannot be loaded. A description of the image is appropriate.
|
||||
|
||||
```markdown
|
||||
[Yunohost Logo](/images/logo.png)
|
||||
![Yunohost Logo](/images/logo.png)
|
||||
```
|
||||
[Yunohost Logo](/images/logo.png)
|
||||
![Yunohost Logo](/images/logo.png)
|
||||
|
||||
|
||||
It is possible to make a link with an image, for example :
|
||||
```markdown
|
||||
[! [Yunohost Logo](/images/logo.png)](/write_documentation)
|
||||
[![Yunohost Logo](/images/logo.png)](/write_documentation)
|
||||
```
|
||||
[! [Yunohost Logo](/images/logo.png)](/write_documentation)
|
||||
[![Yunohost Logo](/images/logo.png)](/write_documentation)
|
||||
|
||||
The insert of *text to be displayed if the image cannot be loaded* between the brackets in the image link is not mandatory but strongly recommended.
|
||||
|
||||
|
@ -121,7 +121,7 @@ Will be displayed :
|
|||
|
||||
## Lists
|
||||
|
||||
Lists allow to display a series of texts in an easy presentation, this is how indexes such as the [contributing documentation](contributordoc) page are written.
|
||||
Lists allow to display a series of texts in an easy presentation, this is how indexes such as the [contributing documentation](/contributordoc) page are written.
|
||||
|
||||
### Ordered lists
|
||||
|
||||
|
@ -161,7 +161,7 @@ You get:
|
|||
3. List 5
|
||||
4. list 6
|
||||
|
||||
### Unordered lists<a name="nomdelancre"></a>
|
||||
### Unordered lists<a name="anchorname"></a>
|
||||
|
||||
To create an unordered list, use the symbols `*`, `+` or `*`. This will not change the appearance of the marker in the text output. It is the incrementing of the list that will define the visual. For a better reading of the plain text, it may be good to use the different symbols to mark the increment, but it is the three spaces before the sub-list that will indicate the increment.
|
||||
As such:
|
||||
|
@ -203,21 +203,21 @@ This will read:
|
|||
To create an array, use the vertical bar `|` and dashes `--`. It is mandatory to add a line of dashes under the first line of the table. There is no constraint in the size of the table. It is possible to format the array with the `:` in the second row of the array, three options are available:
|
||||
|
||||
| Left aligned column | Centered column | Right aligned column |
|
||||
|:-------------------------|:---------------:|-------------------------:|
|
||||
|:--------------------|:---------------:|---------------------:|
|
||||
|`:-----` | `:----:` | `-----:` |
|
||||
|
||||
```markdown
|
||||
|| One table | | One column | | One second | | As many as you want |
|
||||
|:--------------:|:-----------:|:-----------:|:--------------------:|
|
||||
| **One table** | One column | One second | As many as you want |
|
||||
|:-------------:|:----------:|:----------:|:-------------------:|
|
||||
| | And formatted line | | And bold text | | Or *italic* |
|
||||
| More lines | |! [An image](/images/cd.jpg) | [Or a link](/contributordoc) |
|
||||
| More lines | |![An image](/images/cd.jpg) | [Or a link](/contributordoc) |
|
||||
```
|
||||
Which would say this:
|
||||
|
||||
| ? A table ? ? A column ? ? A second ? ? As many as you want ?
|
||||
|:--------------:|:-----------:|:-----------:|:--------------------:|
|
||||
| **One table** | One column | One second | As many as you want |
|
||||
|:-------------:|:----------:|:----------:|:-------------------:|
|
||||
| | And formatted line | | And bold text | | Or *italic* |
|
||||
| More lines | |! [An image](/images/cd.jpg) | [Or a link](/contributordoc) |
|
||||
| More lines | |![An image](/images/cd.jpg) | [Or a link](/contributordoc) |
|
||||
|
||||
## Code block
|
||||
|
||||
|
@ -244,9 +244,9 @@ At least three low pitched accents at the opening and closing of the block and t
|
|||
|
||||
## Useful links
|
||||
|
||||
+ The documentation of the original Markdown language: [daringfireball.net/projects/markdown (en)](https://daringfireball.net/projects/markdown/)
|
||||
+ The documentation of the original Markdown language: [daringfireball.net/projects/markdown](https://daringfireball.net/projects/markdown/)
|
||||
+ Markdown Tutorial on [markdowntutorial.com](https://markdowntutorial.com)
|
||||
|
||||
## Going further ##
|
||||
## Going further
|
||||
|
||||
In a more general way, to understand how a text is formatted just inspect the source document with a note application. This does not mean that the YunoHost wiki will be able to exploit it. There are many other possibilities to use markdown syntax, feel free to add missing features. If you've noticed some missing features and/or have questions, please contact us on [the forum](https://forum.yunohost.org) or by direct message on the IRC room: **#yunohost** on [irc.freenode.net](https://irc.freenode.net).
|
||||
|
|
|
@ -65,11 +65,11 @@ Le lien renverra vers la page avec la bonne configuration de langue si la page e
|
|||
Une ancre permet de faire un lien vers un point précis dans une page, c'est comme ça que fonctionnent les index en haut de page. Pour créer une ancre, il faut insérer du code à l'endroit de l'ancre sous la forme suivante :
|
||||
|
||||
```markdown
|
||||
Du texte qui sera ne sait même pas qu'il a une ancre <a name="NomDeLAncre"></a>
|
||||
Du texte qui sera ne sait même pas qu'il a une ancre <a name="nomancre"></a>
|
||||
```
|
||||
|
||||
Ce qui s'affiche :
|
||||
Du texte qui sera ne sait même pas qu'il a une ancre <a name="NomDeLAncres"></a>
|
||||
Du texte qui sera ne sait même pas qu'il a une ancre <a name="nomancre"></a>
|
||||
|
||||
Il est aussi possible de directement renvoyer une ancre au titre, en notant le lien en minuscule avec des `-` à la place des espaces.
|
||||
Il ne reste plus qu'à désigner l'ancre au texte que l'on souhaite rendre interactif :
|
||||
|
@ -121,7 +121,7 @@ S'affichera :
|
|||
|
||||
## Les listes
|
||||
|
||||
Les listes permettent d'afficher une suite de textes dans une présentation facile, c'est ainsi que sont rédiger les index tels que celui de la page de la [documentation contributeur](contributordoc).
|
||||
Les listes permettent d'afficher une suite de textes dans une présentation facile, c'est ainsi que sont rédiger les index tels que celui de la page de la [documentation contributeur](/contributordoc).
|
||||
|
||||
### Listes ordonnées
|
||||
|
||||
|
|
Loading…
Reference in a new issue