From 269d122967fa782128cefded01e6479a3e2ab1bd Mon Sep 17 00:00:00 2001 From: Goutte Date: Fri, 15 Mar 2019 18:00:34 +0100 Subject: [PATCH] Add a draft of the specs of the files paths. --- SPECIFICATIONS.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/SPECIFICATIONS.md b/SPECIFICATIONS.md index 3b02ff0f7..0a7ff1eae 100644 --- a/SPECIFICATIONS.md +++ b/SPECIFICATIONS.md @@ -3,6 +3,29 @@ > Contributions welcome! + +## Files Paths + +``` +[/]/chapter-.. +or +[/]/--<type>.<language>.<format> +or +??? +``` + +- `topic`: lowercase alphanumeric topic name (in english, sorry) +- `NN`: level of the course, an integer with always two digits +- `type`: one of : + + - `textbook` + - `cheatsheet` (?) + - `annex` + +- `language`: 2 letter lowercase language code +- `format`: `md` for markdown + + ## Courses Model Each Course MUST have: @@ -11,7 +34,7 @@ Each Course MUST have: - one Title - one Content - one Topic -- one Language `ISO 639-1` (two letter code, eg: `fr`) +- one Language `ISO 639-1` (two letter code, eg: `fr`) or (`ISO 3166-1 alpha-2` ? ← countries) Each course MAY have @@ -20,6 +43,7 @@ Each course MAY have Keep it simple, for now. There will be room for events (class projects, etc.) later. + ## Course File Format We should probably follow something akin to [what Grav does](https://learn.getgrav.org/15/content/content-pages). @@ -107,6 +131,7 @@ Directory names MUST : - be alphanumeric only, plus `-` and `_`. - validate with case-sensitivity the regex `^[a-z][a-z0-9_-]+[a-z0-9]$` + ## Possible driver implementations - with Grav @@ -116,10 +141,12 @@ Directory names MUST : Multiple frontends may be buit to display these courses. + ## Tips - http://flagpedia.net/emoji + ## TODO - Look up https://schema.org/Course and comply somehow