Skip to content

Commit f44e607

Browse files
author
Lindsay jo Walker
committed
initial drafts of tutorial templates
1 parent d648045 commit f44e607

6 files changed

+83
-15
lines changed

templates/README.md

+78-8
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,88 @@ This readme will outline the steps to create a Tutorial on the [Tutorial page of
55

66
## How to Create a Tutorial
77

8-
### Step 1: Create a Markdown file
9-
First, you will need to create a markdown file in the ...
8+
Definitions
9+
* Module: A set of several step-by-step modules
10+
* Tutorial: An individual page in a set of tutorials
1011

11-
### Step 2: Update ....
12+
![Tutorials & Module](tutorials-modules.png)
13+
14+
### Create a new Tutorial
15+
* First, you will need to create a markdown file (or a directory containing a markdown file, if the tutorial has images) in the `/content/en/tutorials` [directory](https://github.com/protocol/launchpad/tree/main/content/en/tutorials) in the root of the repo.
16+
* Add a tutorial to an existing tutorial module, by simply copy-pasting the tutorials template into the module folder where you will place the file.
17+
`cp templates/tutorial-temp.md /content/en/tutorials/<module-name>/<tutorial-name.md>`
18+
19+
* Edit the header/ metadata in the new tutorial:
20+
Update the `parent:` field in the header, with the identifier from the `config/_default/menus/menus.en.toml` [file](https://github.com/protocol/launchpad/blob/main/config/_default/menus/menus.en.toml):
21+
```
22+
title: "Title (Tutorial)"
23+
description: "Deep/Shallow Dive Tutorial – Subtitle"
24+
draft: false
25+
menu:
26+
tutorials:
27+
parent: "<identifier of tutorial module>"
28+
```
29+
* For example, to add to the **Introduction to IPFS** module, you would replace`"<identifier of tutorial module>"`that with `"tutorials-ipfs"` found on here in the [menus.en.toml file](https://github.com/protocol/launchpad/blob/main/config/_default/menus/menus.en.toml#L159)
30+
<br>
31+
![Tutorial Identifier](tutorial-identifier.png)
32+
* To add the tutorial within a curriculum module as well, under the `menu` field, add an additional two lines with a `curriculm` field witht he correct file from [menus.en.toml](https://github.com/protocol/launchpad/blob/main/config/_default/menus/menus.en.toml#L91):
33+
```
34+
menu:
35+
tutorials:
36+
parent: "tutorials-ipfs"
37+
curriculum:
38+
parent: "curriculum-ipfs"
39+
```
40+
41+
42+
### Create a new Module
43+
To create a new set of tutorials or Module, follow these steps:
44+
* Create a new directory
45+
`mkdir /content/en/tutorials/<your-tutorial-module-name>`
46+
* Copy the `.md` template into your new module folder in `content/en/tutorials/<your-tutorial-module-name` (or make a directory with a markdown file if the tutorial has images)
47+
* In `config/_default/menus/menus.en.toml` add a new field:
48+
```
49+
[[tutorials]]
50+
name = "<Name that will render on the page>"
51+
weight = <make 10 higher than the previous one >
52+
identifier = "<tutorial-id-for-header>"
53+
[tutorials.params]
54+
category = "libp2p"
55+
image = "/tutorials/libp2p.png"
56+
```
57+
58+
* `name` This will render on the webpage
59+
* `weight` controls what order tutorials are displayed in, make it 10 higher
60+
* `identifier` is
61+
* `category` create a new unique category name, just make sure it's unique
62+
* `image' - Find an image and upload to `static/tutorials` [directory](https://github.com/protocol/launchpad/tree/main/static/tutorials)
63+
64+
* When you have created this, mark @enoldev or @walkerlj0 as a reviewer in Github
1265
13-
### Step 3: Add ....
1466
1567
## How to Create a Dev Tools Page
1668
17-
### Step 1: Create a Markdown file
18-
First, you will need to create a markdown file in the ...
69+
* Create a Markdown file or a directory with a markddown file in `content/en/curriculum/dev-tools`
70+
* Update the `weight` field to be 10 after the very last dev-tools page
71+
![Weight](weight-example.png)
72+
_in this example, the last page is currently spice.md, and you would want to make the next page havea weight of 80_
73+
74+
## How to Create a new Curriculum Module
75+
* Create a new directory
76+
* Add .md Files
77+
* Update `config/_default/menus/menus.en.toml`
78+
```
79+
[[curriculum]]
80+
name = "<New Curriculum Name>"
81+
weight = 20
82+
identifier = "curriculum-<name>"
83+
84+
[curriculum.params]
85+
image = "/logos/ipfs.svg"
86+
width = 100
87+
height = 100
88+
section = "<make up a unique section>"
89+
description = "<Short description>"
90+
```
1991
20-
### Step 2: Update ....
2192
22-
### Step 3: Add ...

templates/dev-tool-temp.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ title: "Project Name"
33
description: "Project Name – Brief Description"
44
draft: false
55
menu:
6-
7-
[//]: # ( curriculum:)
8-
9-
[//]: # ( parent: "")
6+
curriculum:
7+
parent: "curriculum-devtools"
108
weight: 0
11-
category: tutorial
9+
category: lecture
1210
level:
1311
- shallow
1412
- deep

templates/tutorial-identifier.png

423 KB
Loading

templates/tutorial-temp.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: "Title (Tutorial)"
33
description: "Deep/Shallow Dive Tutorial – Subtitle"
44
draft: false
55
menu:
6-
curriculum:
7-
parent: ""
6+
tutorials:
7+
parent: "<identifier of tutorial module>"
88
weight: 0
99
category: tutorial
1010
level:

templates/tutorials-modules.png

556 KB
Loading

templates/weight-example.png

351 KB
Loading

0 commit comments

Comments
 (0)