Skip to content
This repository was archived by the owner on Mar 7, 2022. It is now read-only.

Commit 8f20ecb

Browse files
author
Gerkin
committed
docs: ✏️ Added readme
1 parent 1e34192 commit 8f20ecb

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,51 @@
1-
typedoc-plugin-tutorials
1+
# Typedoc-plugin-tutorials
2+
3+
This typedoc plugin allows you to create tutorials for your typedoc documentation. Those tutorial pages will be generated using your theme. The tutorial index is added as a doc page visible in the global menu of your documentation. This page generates a basic index page containing all your tutorials.
4+
5+
Example generated tutorials page: https://gerkindev.github.io/vuejs-datatable/tutorials/index.html
6+
7+
Example `typedoc.json` file:
8+
9+
```json
10+
{
11+
"tutorials-map": "./tutorials/tutorials.json",
12+
"tutorials-directory": "./tutorials"
13+
}
14+
```
15+
16+
In this examples, tutorials general informations (**title**, description & children) will be loaded from `./tutorials/tutorials.json`. Markdown files (`.md`) are expected to be found under the `./tutorials` directory.
17+
18+
Example `tutorials.json` file
19+
20+
```json
21+
{
22+
"my-first-tutorial": {
23+
"title": "My first tutorial",
24+
"description": "This tutorial is just an introduction",
25+
"children": {
26+
"my-second-tutorial": {
27+
"title": "My second tutorial",
28+
"description": "This tutorial is a child of the 1st tutorial"
29+
}
30+
}
31+
},
32+
"hello-world": {
33+
"title": "Hello world"
34+
}
35+
}
36+
```
37+
38+
This configuration will look for `my-first-tutorial.md`, `my-second-tutorial.md` & `hello-world.md` in the specified tutorials directory and render them as tutorial pages.
39+
40+
Each tutorial key **must** be unique, even through children.
41+
42+
In your doc comments, linking with tutorials can be done the following ways:
43+
44+
```ts
45+
/**
46+
* This is the description of the doc comment. Here is a link to [[tutorial:my-first-tutorial]].
47+
*
48+
* @tutorial my-second-tutorial An optional descriptionto attach to the tutorial
49+
*/
50+
void myFunc(){}
51+
```

0 commit comments

Comments
 (0)