🇨🇴 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.

157 lines
2.8 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 <h1>
  46. ## Header <h2>
  47. ###### Header <h6>
  48. *emphasis*
  49. **strong**
  50. Go [there](https://…)
  51. [Current chapter](.)
  52. [Parent chapter](..)
  53. [Sibling chapter](../another-chapter)
  54. [Child chapter](chapter)
  55. ![Description of the image](local-image.png)
  56. ! blue notice
  57. !! green notice
  58. !!! orange notice
  59. !!!! red notice
  60. !!!!
  61. !!!! still the same red notice
  62. ```
  63. > More at Gitlab's [Markdown documentation](https://docs.gitlab.com/ee/user/markdown.html).
  64. ### LateX
  65. You can use LateX in the courses :
  66. $`E = m \cdot c^2`$
  67. yields $`E = m \cdot c^2`$
  68. > You can omit the _backticks_ (`) but the preview in gitlab won't work.
  69. ### Mermaid
  70. You can display flowcharts in the courses :
  71. ``` mermaid
  72. graph LR
  73. subgraph Course
  74. File[File]
  75. end
  76. Student((Student))
  77. Student --> |reads| File
  78. ```
  79. yields
  80. ``` mermaid
  81. graph LR
  82. subgraph Course
  83. File[File]
  84. end
  85. Student((Student))
  86. Student --> |reads| File
  87. ```
  88. > `LR` is for Left to Right. You could use `TB` for Top to Bottom.
  89. GANTT diagrams and sequence diagrams are also available.
  90. Read on [mermaid's documentation](https://mermaidjs.github.io/) for more information.
  91. ### Table demo
  92. | A | B | | D | |
  93. |---|---|---|---|---|
  94. | | | | | |
  95. | | | X | | |
  96. | | | X | | _test_ |