Browse Source

Add a draft of the specs of the files paths.

keep-around/f3106a32ca956f46d95a6c485cea5899eb30aed9
Goutte 7 years ago
parent
commit
269d122967
  1. 29
      SPECIFICATIONS.md

29
SPECIFICATIONS.md

@ -3,6 +3,29 @@
> Contributions welcome! > Contributions welcome!
## Files Paths
```
<topic>[/<topic>]/chapter<NN>-<type>.<language>.<format>
or
<topic>[/<topic>]/<NN>-<title>-<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 ## Courses Model
Each Course MUST have: Each Course MUST have:
@ -11,7 +34,7 @@ Each Course MUST have:
- one Title - one Title
- one Content - one Content
- one Topic - 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 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. Keep it simple, for now. There will be room for events (class projects, etc.) later.
## Course File Format ## Course File Format
We should probably follow something akin to [what Grav does](https://learn.getgrav.org/15/content/content-pages). 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 `_`. - be alphanumeric only, plus `-` and `_`.
- validate with case-sensitivity the regex `^[a-z][a-z0-9_-]+[a-z0-9]$` - validate with case-sensitivity the regex `^[a-z][a-z0-9_-]+[a-z0-9]$`
## Possible driver implementations ## Possible driver implementations
- with Grav - with Grav
@ -116,10 +141,12 @@ Directory names MUST :
Multiple frontends may be buit to display these courses. Multiple frontends may be buit to display these courses.
## Tips ## Tips
- http://flagpedia.net/emoji - http://flagpedia.net/emoji
## TODO ## TODO
- Look up https://schema.org/Course and comply somehow - Look up https://schema.org/Course and comply somehow

Loading…
Cancel
Save