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
```

View file

@ -11,6 +11,9 @@ obj: meta
- `wiki` - Wiki link - `wiki` - Wiki link
- `arch-wiki` - Arch Wiki link - `arch-wiki` - Arch Wiki link
- `rfc` - RFC Document link - `rfc` - RFC Document link
- `rev` - Date of last change (Revision)
- `mime` - Associated MIME Type
- `extension` - Associated file extensions
- `obj` - Object Type - `obj` - Object Type
## Common Frontmatter Tags for Object Types ## Common Frontmatter Tags for Object Types
@ -26,7 +29,7 @@ obj: meta
# Object Types # Object Types
- `Application` - Any application - `Application` - Any application
- `OS` - Operating System - `OS` - Operating System
- `Codec` - Media Codec - `Format` - File Format
- `FileSystem` - File System - `FileSystem` - File System
- `Emulator` - Emulator System - `Emulator` - Emulator System
- `Concept` - Concept - `Concept` - Concept

View file

@ -50,9 +50,9 @@ table android-id, flatpak-id from "/" where startswith(lower(obj), "application"
list from "/" where startswith(lower(obj), "os") list from "/" where startswith(lower(obj), "os")
``` ```
### Codecs ### Formats
```dataview ```dataview
list from "/" where startswith(lower(obj), "codec") table mime, extension from "/" where startswith(lower(obj), "format")
``` ```
### Filesystems ### Filesystems

View file

@ -7,6 +7,12 @@
"obj" "obj"
], ],
"properties": { "properties": {
"rev": {
"title": "Revision",
"description": "Date of last change to note",
"type": "string",
"format": "date"
},
"tags": { "tags": {
"type": "array", "type": "array",
"items": { "items": {