This readme will outline the steps to create a Tutorial on the Tutorial page of the curriculum platform and how to create a page in the Dev Tools section of the Launchpad curriculum platform.
Tutorials
Definitions
-
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 in the root of the repo.-
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.
cp templates/tutorial-temp.md /content/en/tutorials/<module-name>/<tutorial-name.md>
-
Edit the header/ metadata in the new tutorial: Update the
parent:
field in the header, with the identifier from theconfig/_default/menus/menus.en.toml
file:title: "Title (Tutorial)" description: "Deep/Shallow Dive Tutorial – Subtitle" draft: false menu: tutorials: parent: "<identifier of tutorial module>"
- 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
- For example, to add to the Introduction to IPFS module, you would replace
- To add the tutorial within a curriculum module as well, under the
menu
field, add an additional two lines with acurriculm
field with the correct file from menus.en.toml:
menu: tutorials: parent: "tutorials-ipfs" curriculum: parent: "curriculum-ipfs"
-
To create a new set of tutorials or Module, follow these steps:
-
Create a new directory
mkdir /content/en/tutorials/<your-tutorial-module-name>
-
Copy the
.md
template into your new module folder incontent/en/tutorials/<your-tutorial-module-name
(or make a directory with a markdown file if the tutorial has images) -
In
config/_default/menus/menus.en.toml
add a new field:[[tutorials]] name = "<Name that will render on the page>" weight = <make 10 higher than the previous one > identifier = "<tutorial-id-for-header>" [tutorials.params] category = "libp2p" image = "/tutorials/libp2p.png"
name
This will render on the webpageweight
controls what order tutorials are displayed in, make it 10 higheridentifier
iscategory
create a new unique category name, just make sure it's uniqueimage' - Find an image and upload to
static/tutorials` directory
-
When you have created this, mark @enoldev or @walkerlj0 as a reviewer in Github
- Copy the markdown file from
templates/dev-tool-temp.md
to a new.md
file, or or a directory with a markdown file namedindex.md
incontent/en/curriculum/dev-tools
- Update the
weight
field to be 10 after the very last dev-tools page in this example, the last page is currently spice.md, and you would want to make the next page have a weight of 80
- Create a new directory
- Add .md Files
- Update
config/_default/menus/menus.en.toml
[[curriculum]]
name = "<New Curriculum Name>"
weight = 20
identifier = "curriculum-<name>"
[curriculum.params]
image = "/logos/ipfs.svg"
width = 100
height = 100
section = "<make up a unique section>"
description = "<Short description>"