🇨🇴 Una base de datos de cursos en diferentes lenguajes. 🇫🇷 Une base de données de cours dans différents langages. 🇳🇴 En database med kurs på forskjellige språk. 🇺🇸 A flat-file database of courses in multiple languages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
2.9 KiB

  1. ## Git
  2. ### The easy way
  3. Use Gitlab's WebIDE.
  4. You won't be able to 100% accurately preview the result until you commit and the servers are updated.
  5. ### The powerful way
  6. Run the website locally and preview your changes instantly.
  7. Head over to the [sources of the server instance](https://m3p2.ljbac.com/m3p2/grav-website) to learn how to set it up.
  8. ## File Structure
  9. Each page is a directory.
  10. ### File names
  11. We define as *slug-case* what some call *kebab-case*.
  12. - lowercase
  13. - alphanumeric
  14. - joined with `-`
  15. - `a-z`, no diacritics
  16. - starts with a letter (probably best)
  17. #### Directories
  18. `[<NN>.]<slug>`
  19. The numbers prefix can be ignored when building links, its purpose is to order sibling pages.
  20. Set the english slug ; localized slugs can be set in frontmatters like so:
  21. ```yaml
  22. title: Joyeux Noël!
  23. slug: joyeux-noel
  24. ```
  25. #### Markdown files
  26. `<template>[.<lang>].md`
  27. The *name of the file* will define the *template of the page*, that is how the content will appear.
  28. > For example, the template `columns` will display the children of the page as columns.
  29. The available templates are :
  30. - `default`
  31. - `portal`
  32. - `topics`
  33. - `topic`
  34. - `columns`
  35. - `textbook`
  36. - `cheatsheet`
  37. - `annex`
  38. Right now there are not many differences between the various templates but there may be later.
  39. #### Other files
  40. - Use **slug-case** with the occasional snake between slugs.
  41. - Be expressive. This is an exercise in aphorisms. `fig-a_rays-through-convex-lens.png`
  42. - use a ISO 639-1 code as suffix like an extension like so: `textbook.fr.md`.
  43. ### Markdown Cheatsheet
  44. ```
  45. # Header like h1
  46. ## Header like h2
  47. ###### Header like h6
  48. _italic_
  49. __underlined__
  50. *bold*
  51. **strong**
  52. ~~strike-through~~
  53. Go [there](https://…)
  54. [Current chapter](.)
  55. [Parent chapter](..)
  56. [Sibling chapter](../another-chapter)
  57. [Child chapter](chapter)
  58. ![Description of the image](local-image.png)
  59. ! blue notice
  60. !! green notice
  61. !!! orange notice
  62. !!!! red notice
  63. !!!!
  64. !!!! another line on the red notice
  65. ```
  66. > More at Gitlab's [Markdown documentation](https://docs.gitlab.com/ee/user/markdown.html).
  67. ### LateX
  68. You can use LateX in the courses :
  69. $`E = m \cdot c^2`$
  70. yields $`E = m \cdot c^2`$
  71. > You can omit the _backticks_ (`) but the preview in gitlab won't work.
  72. ### Mermaid
  73. You can display flowcharts in the courses :
  74. ``` mermaid
  75. graph LR
  76. subgraph Course
  77. File[File]
  78. end
  79. Student((Student))
  80. Student --> |reads| File
  81. ```
  82. yields
  83. ``` mermaid
  84. graph LR
  85. subgraph Course
  86. File[File]
  87. end
  88. Student((Student))
  89. Student --> |reads| File
  90. ```
  91. > `LR` is for Left to Right. You could use `TB` for Top to Bottom.
  92. GANTT diagrams and sequence diagrams are also available.
  93. Read on [mermaid's documentation](https://mermaidjs.github.io/) for more information.
  94. ### Table demo
  95. | A | B | | D | |
  96. |---|---|---|---|---|
  97. | | | | | |
  98. | | | X | | |
  99. | | | X | | _test_ |