Skip to content

Commit f4b4d4a

Browse files
authored
Merge pull request #1 from matcornic/master
sync
2 parents c8fc099 + 18212e6 commit f4b4d4a

File tree

30 files changed

+596
-14
lines changed

30 files changed

+596
-14
lines changed

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# https://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_size = 2
9+
indent_style = space
10+
trim_trailing_whitespace = true
11+
12+
[*.js]
13+
insert_final_newline = true
14+
15+
[*.md]
16+
trim_trailing_whitespace = false
-39.1 KB
Loading
-141 KB
Loading
-142 KB
Loading
-141 KB
Loading
-90.9 KB
Loading
-114 KB
Loading
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
date: 2018-11-29T08:41:44+01:00
3+
title: Tags
4+
weight: 40
5+
tags: ["documentation", "tutorial"]
6+
---
7+
8+
*Learn theme* support one default taxonomy of gohugo: the *tag* feature.
9+
10+
## Configuration
11+
12+
Just add tags to any page:
13+
14+
```markdown
15+
---
16+
date: 2018-11-29T08:41:44+01:00
17+
title: Theme tutorial
18+
weight: 15
19+
tags: ["tutorial", "theme"]
20+
---
21+
```
22+
23+
## Behavior
24+
25+
26+
The tags are displayed at the top of the page, in their insertion order.
27+
28+
Each tag is a link to a *Taxonomy* page displaying all the articles with the given tag.
29+
30+
## List all the tags
31+
32+
In the `config.toml` file you can add a shortcut to display all the tags
33+
34+
```toml
35+
[[menu.shortcuts]]
36+
name = "<i class='fas fa-tags'></i> Tags"
37+
url = "/tags"
38+
weight = 30
39+
```
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
date: 2018-11-29T08:41:44+01:00
3+
title: Tags
4+
weight: 40
5+
tags: ["documentation", "tutorial"]
6+
---
7+
8+
9+
Le *thème Learn* supporte une des taxonomy par défaut de GoHugo : les tags.
10+
11+
## Configuration
12+
13+
Il suffit d'ajouter un tableau de tags sur la page :
14+
15+
```markdown
16+
---
17+
date: 2018-11-29T08:41:44+01:00
18+
title: Tutoriel pour le thème
19+
weight: 15
20+
tags: ["tutoriel", "theme"]
21+
---
22+
```
23+
24+
## Comportement
25+
26+
Les tags sont affichés en haut de la page, dans l'ordre dans lequel ils ont été saisis.
27+
28+
Chaque tag est un lien vers une page *Taxonomy*, qui affiche tous les article avec ce tag.
29+
30+
31+
## Liste des tags
32+
33+
Il est possible de rajouter un raccourci dans le fichier `config.toml` afin d'afficher une page listant tous les tags
34+
35+
```toml
36+
[[menu.shortcuts]]
37+
name = "<i class='fas fa-tags'></i> Tags"
38+
url = "/tags"
39+
weight = 30
40+
```

exampleSite/content/shortcodes/mermaid.en.md

Lines changed: 181 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ description : "Generation of diagram and flowchart from text in a similar manner
88
Just insert your mermaid code in the `mermaid` shortcode and that's it.
99

1010
## Flowchart example
11+
1112
{{</*mermaid align="left"*/>}}
1213
graph LR;
1314
A[Hard edge] -->|Link text| B(Round edge)
@@ -26,6 +27,28 @@ graph LR;
2627
C -->|Two| E[Result two]
2728
{{< /mermaid >}}
2829

30+
or you can use this alternative syntax:
31+
32+
<pre>
33+
```mermaid
34+
graph LR;
35+
A[Hard edge] -->|Link text| B(Round edge)
36+
B --> C{Decision}
37+
C -->|One| D[Result one]
38+
C -->|Two| E[Result two]
39+
```
40+
</pre>
41+
42+
renders as
43+
44+
```mermaid
45+
graph LR;
46+
A[Hard edge] -->|Link text| B(Round edge)
47+
B --> C{Decision}
48+
C -->|One| D[Result one]
49+
C -->|Two| E[Result two]
50+
```
51+
2952
## Sequence example
3053

3154
{{</*mermaid*/>}}
@@ -58,6 +81,40 @@ sequenceDiagram
5881
Bob-->John: Jolly good!
5982
{{< /mermaid >}}
6083

84+
or you can use this alternative syntax:
85+
86+
<pre>
87+
```mermaid
88+
sequenceDiagram
89+
participant Alice
90+
participant Bob
91+
Alice->>John: Hello John, how are you?
92+
loop Healthcheck
93+
John->John: Fight against hypochondria
94+
end
95+
Note right of John: Rational thoughts <br/>prevail...
96+
John-->Alice: Great!
97+
John->Bob: How about you?
98+
Bob-->John: Jolly good!
99+
```
100+
</pre>
101+
102+
renders as
103+
104+
```mermaid
105+
sequenceDiagram
106+
participant Alice
107+
participant Bob
108+
Alice->>John: Hello John, how are you?
109+
loop Healthcheck
110+
John->John: Fight against hypochondria
111+
end
112+
Note right of John: Rational thoughts <br/>prevail...
113+
John-->Alice: Great!
114+
John->Bob: How about you?
115+
Bob-->John: Jolly good!
116+
```
117+
61118
## GANTT Example
62119

63120
{{</*mermaid*/>}}
@@ -79,7 +136,7 @@ sequenceDiagram
79136
{{</* /mermaid */>}}
80137

81138

82-
render as
139+
renders as
83140

84141
{{<mermaid>}}
85142
gantt
@@ -99,5 +156,128 @@ gantt
99156
Add to mermaid :1d
100157
{{</mermaid>}}
101158

159+
or you can use this alternative syntax:
102160

161+
<pre>
162+
```mermaid
163+
gantt
164+
dateFormat YYYY-MM-DD
165+
title Adding GANTT diagram functionality to mermaid
166+
section A section
167+
Completed task :done, des1, 2014-01-06,2014-01-08
168+
Active task :active, des2, 2014-01-09, 3d
169+
Future task : des3, after des2, 5d
170+
Future task2 : des4, after des3, 5d
171+
section Critical tasks
172+
Completed task in the critical line :crit, done, 2014-01-06,24h
173+
Implement parser and jison :crit, done, after des1, 2d
174+
Create tests for parser :crit, active, 3d
175+
Future task in critical line :crit, 5d
176+
Create tests for renderer :2d
177+
Add to mermaid :1d
178+
```
179+
</pre>
180+
181+
renders as
182+
183+
```mermaid
184+
gantt
185+
dateFormat YYYY-MM-DD
186+
title Adding GANTT diagram functionality to mermaid
187+
section A section
188+
Completed task :done, des1, 2014-01-06,2014-01-08
189+
Active task :active, des2, 2014-01-09, 3d
190+
Future task : des3, after des2, 5d
191+
Future task2 : des4, after des3, 5d
192+
section Critical tasks
193+
Completed task in the critical line :crit, done, 2014-01-06,24h
194+
Implement parser and jison :crit, done, after des1, 2d
195+
Create tests for parser :crit, active, 3d
196+
Future task in critical line :crit, 5d
197+
Create tests for renderer :2d
198+
Add to mermaid :1d
199+
```
200+
201+
### Class example
202+
203+
<pre>
204+
```mermaid
205+
classDiagram
206+
Class01 <|-- AveryLongClass : Cool
207+
Class03 *-- Class04
208+
Class05 o-- Class06
209+
Class07 .. Class08
210+
Class09 --> C2 : Where am i?
211+
Class09 --* C3
212+
Class09 --|> Class07
213+
Class07 : equals()
214+
Class07 : Object[] elementData
215+
Class01 : size()
216+
Class01 : int chimp
217+
Class01 : int gorilla
218+
Class08 <--> C2: Cool label
219+
```
220+
</pre>
221+
222+
renders as
223+
224+
```mermaid
225+
classDiagram
226+
Class01 <|-- AveryLongClass : Cool
227+
Class03 *-- Class04
228+
Class05 o-- Class06
229+
Class07 .. Class08
230+
Class09 --> C2 : Where am i?
231+
Class09 --* C3
232+
Class09 --|> Class07
233+
Class07 : equals()
234+
Class07 : Object[] elementData
235+
Class01 : size()
236+
Class01 : int chimp
237+
Class01 : int gorilla
238+
Class08 <--> C2: Cool label
239+
```
240+
241+
### Git example
242+
243+
<pre>
244+
```mermaid
245+
gitGraph:
246+
options
247+
{
248+
"nodeSpacing": 150,
249+
"nodeRadius": 10
250+
}
251+
end
252+
commit
253+
branch newbranch
254+
checkout newbranch
255+
commit
256+
commit
257+
checkout master
258+
commit
259+
commit
260+
merge newbranch
261+
```
262+
</pre>
263+
264+
renders as
103265

266+
```mermaid
267+
gitGraph:
268+
options
269+
{
270+
"nodeSpacing": 150,
271+
"nodeRadius": 10
272+
}
273+
end
274+
commit
275+
branch newbranch
276+
checkout newbranch
277+
commit
278+
commit
279+
checkout master
280+
commit
281+
commit
282+
merge newbranch
283+
```

0 commit comments

Comments
 (0)