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

234 lines
5.1 KiB

7 years ago
7 years ago
7 years ago
7 years ago
  1. ---
  2. title: Contributing
  3. slug: contributing
  4. ---
  5. ## Philosophy
  6. Each course is subject to the license its original authors chose.
  7. Translations should probably follow the same license as the original works.
  8. ! @cmeny Drop a line here about the structure with 4 levels.
  9. ## How it works
  10. - 📖 *Flat files*
  11. - [enhanced markdown](#enhanced-markdown) for content
  12. - [YAML frontmatter](https://learn.getgrav.org/15/content/headers) for metadata
  13. - 🦊 *Continuous integration* using [GitLab (Ruby)](https://m3p2.ljbac.com)
  14. - edit courses from your browser, using GitLab's WebIDE
  15. - 🌎 *Decentralized versioning* using [Git](https://en.wikipedia.org/wiki/Git)
  16. - asynchronous and offline collaboration
  17. - scales to thousands of contributors
  18. - 🚀 *HTML generation* using [Grav (PHP)](https://m3p2.ljbac.com/m3p2/grav-website)
  19. - basically the new WordPress, _but much better_
  20. - vibrant and growing community in 2019
  21. ## Data Flow
  22. Here's a breakdown of three different ways of contributing to the courses.
  23. ```mermaid
  24. graph RL
  25. User(Teacher)
  26. Website[M3P2 Website]
  27. Local[Local Website]
  28. Git[Git]
  29. GitLab[GitLab]
  30. User --> |contributes via| Git
  31. User --> |contributes via| GitLab
  32. User --> |contributes via| Local
  33. Local --> |triggers| Git
  34. Git --> |triggers| GitLab
  35. GitLab --> |updates| Website
  36. ```
  37. <marquee>🐠</marquee>
  38. #### Via GitLab
  39. You only need a modern browser to [use the WebIDE](https://m3p2.ljbac.com/-/ide/project/m3p2/courses/edit/master/-/).
  40. !!! GitLab's preview may differ slightly from the end result.
  41. #### Via Git
  42. Setting up a Git client can be intimidating, but it allows offline edition of the courses.
  43. You can use your favorite text editor.
  44. #### Via Local Website
  45. This third level of edition is for experts who can [run the website locally](https://m3p2.ljbac.com/m3p2/grav-website#run-locally-for-fast-development)
  46. to instantly preview their changes, and use Grav's admin tools for page edition.
  47. ## Enhanced Markdown
  48. The point of Markdown (compared to raw HTML) is the _readability of the source_.
  49. ### Markdown Cheatsheet
  50. # Header like h1
  51. ## Header like h2
  52. ###### Header like h6
  53. _italic_
  54. __underlined__
  55. *bold*
  56. **strong**
  57. ~~strike-through~~
  58. `inline->code()`
  59. ```python
  60. import antigravity
  61. antigravity.apply()
  62. ```
  63. Go [there](https://…)
  64. [Current chapter](.)
  65. [Parent chapter](..)
  66. [Sibling chapter](../another-chapter)
  67. [Child chapter](chapter)
  68. [Anchor in the page](#slug-of-header)
  69. ![Description of the image](local-image.png)
  70. ! blue notice
  71. !! green notice
  72. !!! orange notice
  73. !!!! red notice
  74. !!!!
  75. !!!! another line on the red notice
  76. > More at Gitlab's [Markdown documentation](https://docs.gitlab.com/ee/user/markdown.html).
  77. ### Emoticons ✨
  78. Just type or paste the unicode character, modern browsers will do the rest.
  79. Here's a handy list: https://unicode.org/emoji/charts/full-emoji-list.html
  80. ### LateX
  81. You can use LateX in the courses.
  82. For example, the following
  83. $E = m \cdot c^2$
  84. yields $E = m \cdot c^2$
  85. !!!! Make sure to *add trailing spaces* to expressions like `\cdot`,
  86. !!!! or you'll end up with broken formulas.
  87. #### Multiline
  88. The preferred way is to use a `math` code block, like so:
  89. ```math
  90. \overrightarrow{F}_{L} = q \cdot (
  91. \overrightarrow{E}
  92. +
  93. \overrightarrow{v}
  94. \wedge
  95. \overrightarrow{B}
  96. )
  97. ```
  98. The `math` code block also works in GitLab's preview.
  99. _You can also use the `$$` syntax, but GitLab won't understand it._
  100. !! Generous spacing greatly improves the readability of the source.
  101. ### Flowcharts
  102. > _Any resemblance to real persons, living or dead, is purely coincidental._
  103. ```mermaid
  104. graph TB
  105. subgraph M3P2
  106. Draft[Draft]
  107. File[File]
  108. Website[Website]
  109. Pipeline[Pipeline]
  110. end
  111. Sponsor((Sponsor))
  112. Teacher((Teacher))
  113. Student((Student))
  114. Engineer((Engineer))
  115. Student --> |studies| Website
  116. Student --> |loves| Sponsor
  117. Student --> |respects| Teacher
  118. Student --> |complements| Draft
  119. Teacher -.- Engineer
  120. Sponsor --> |feeds| Teacher
  121. Sponsor --> |feeds| Engineer
  122. Teacher --> |reviews| Draft
  123. File --> |triggers| Pipeline
  124. Draft -.- File
  125. Pipeline --> |updates| Website
  126. Teacher --> |authors| File
  127. Engineer --> |specifies| File
  128. Engineer --> |maintains| Pipeline
  129. Engineer --> |hosts| Website
  130. ```
  131. ```mermaid
  132. graph TB
  133. subgraph M3P2
  134. Draft[Draft]
  135. File[File]
  136. Website[Website]
  137. Pipeline[Pipeline]
  138. end
  139. Sponsor((Sponsor))
  140. Teacher((Teacher))
  141. Student((Student))
  142. Engineer((Engineer))
  143. Student --> |studies| Website
  144. Student --> |loves| Sponsor
  145. Student --> |respects| Teacher
  146. Student --> |complements| Draft
  147. Teacher -.- Engineer
  148. Sponsor --> |feeds| Teacher
  149. Sponsor --> |feeds| Engineer
  150. Teacher --> |reviews| Draft
  151. File --> |triggers| Pipeline
  152. Draft -.- File
  153. Pipeline --> |updates| Website
  154. Teacher --> |authors| File
  155. Engineer --> |specifies| File
  156. Engineer --> |maintains| Pipeline
  157. Engineer --> |hosts| Website
  158. ```