Skip to content

Typical Tasks in Markdown

The following tasks need to be performed regularly:

  • adding a new project
  • removing a project
  • updating the submodules

Create documentation for a new project

Prerequisites:

  1. you have cloned the project to your machine

Steps:

  1. create a mkdocs.yml file in the root folder

  2. add basic content for a raw project (take another project as an example). Avoid themes configuration.

Add a new project to doc

Prerequisites:

  1. you have cloned pwrp/doc to your machine

Steps:

  1. open VSC on the pwrp/doc repo

  2. sync

  3. execute git submodule add -b $branch$ https://github.com/pwrp/$project$.git projects/$folder$/$project$ where you replace \(project\) and \(folder\)

  4. execute git submodule update --init

  5. commit and sync the master project (pwrp/doc)

  6. on GitHub, make sure the GitHub Actions build successfully

  7. on https://doc.pwrp.pro, check that the new content is appearing in the right place

Checklist:

Remove a project

Prerequisities:

  1. the project has been added as a submodule to pwrp/doc

Steps:

  1. open VSC on the pwrp/doc repo

  2. sync

  3. execute git rm projects/$folder$/$project$, replacing $folder$ and $project$

  4. commit and sync the master project (pwrp/doc)

  5. on GitHub, make sure the GitHub Actions build successfully

  6. on https://doc.pwrp.pro, check that the content is gone

Checklist:

  • The content of the project doesn't appear on https://doc.pwrp.pro anymore
  • The submodule has been removed from pwrp/doc

Update Submodule

git submodule foreach git pull origin

NOTES: for this to work, you need

  • call the git submodule add with the -b main or -b master flag. This will tell git which branch we track in the submodule.
  • to have called git submodule update --init first