add meta guide

This commit is contained in:
JMARyA 2024-03-08 13:25:14 +01:00
parent 09769f10fc
commit 2525dbe0f1
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
4 changed files with 41 additions and 3 deletions

29
Guide.md Normal file
View file

@ -0,0 +1,29 @@
# Adding new note
Before committing a new note make sure the following apply:
- Note has frontmatter according to schema and content
- Check for any notes referencing your note and add a link there
- Add links to other relevant notes if you reference their content
# Changing Schema
If you propose a schema change you are responsible for updating notes affected by it. All notes should pass the schema validation.
Additionally update the `Meta.md` note.
# Validation
To ensure a valid repository structure, check this list before committing.
## Dead Links
Use [foam](https://github.com/foambubble/foam) or a similiar tool to search for and fix broken inter-note links. Links pointing to nowhere will show up as `Placeholders` if you are using foam.
## Update Revision
Don't forget to update the `rev` tag when changing a note. Update this tag to the date you last modified the note.
## Formatting
Make sure notes are correctly formatted. You can use VSCode's builtin `Format Document` function for this.
## Schema Validation
Use [mdlint](https://git.hydrar.de/mdtools/mdlint) and [mdq](https://git.hydrar.de/mdtools/mdq) to validate the schema of the notes frontmatter and make sure there are no errors:
```shell
mdq -c file.path --noheader knowledge | while IFS= read -r md; do
mdlint --ignore-missing-frontmatter "knowledge/schema.json" "$md"
done
```