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

241 lines
5.4 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. Here are some [Git GUI clients](https://git-scm.com/downloads/guis), if the CLI feels too hard.
  45. Here is a nice tutorial (in french) : https://openclassrooms.com/fr/courses/1233741-gerez-vos-codes-source-avec-git
  46. > Note that during the alpha we're using port `10022` for ssh.
  47. #### Via Local Website
  48. 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)
  49. to instantly preview their changes, and use the powerful Grav's admin tools for page edition.
  50. ## Enhanced Markdown
  51. The point of Markdown (compared to raw HTML) is the _readability of the source_.
  52. ### Markdown Cheatsheet
  53. # Header like h1
  54. ## Header like h2
  55. ###### Header like h6
  56. _italic_
  57. __underlined__
  58. *bold*
  59. **strong**
  60. ~~strike-through~~
  61. `inline->code()`
  62. ```python
  63. import antigravity
  64. antigravity.apply()
  65. ```
  66. Go [there](https://…)
  67. [Current chapter](.)
  68. [Parent chapter](..)
  69. [Sibling chapter](../another-chapter)
  70. [Child chapter](chapter)
  71. [Anchor in the page](#slug-of-header)
  72. ![Description of the image](local-image.png)
  73. ! blue notice
  74. !! green notice
  75. !!! orange notice
  76. !!!! red notice
  77. !!!!
  78. !!!! another line on the red notice
  79. > More at Gitlab's [Markdown documentation](https://docs.gitlab.com/ee/user/markdown.html).
  80. ### Emoticons ✨
  81. Just type or paste the unicode character, modern browsers will do the rest.
  82. Here's a handy list: https://unicode.org/emoji/charts/full-emoji-list.html
  83. ### LateX
  84. You can use LateX in the courses.
  85. For example, the following
  86. $E = m \cdot c^2$
  87. yields $E = m \cdot c^2$
  88. !!!! Make sure to *add trailing spaces* to expressions like `\cdot`,
  89. !!!! or you'll end up with broken formulas.
  90. #### Multiline
  91. The preferred way is to use a `math` code block, like so:
  92. ```math
  93. \overrightarrow{F}_{L} = q \cdot (
  94. \overrightarrow{E}
  95. +
  96. \overrightarrow{v}
  97. \wedge
  98. \overrightarrow{B}
  99. )
  100. ```
  101. The `math` code block also works in GitLab's preview.
  102. _You can also use the `$$` syntax, but GitLab won't understand it._
  103. !! Generous spacing greatly improves the readability of the source.
  104. ### Flowcharts
  105. > _Any resemblance to real persons, living or dead, is purely coincidental._
  106. ```mermaid
  107. graph TB
  108. subgraph M3P2
  109. Draft[Draft]
  110. File[File]
  111. Website[Website]
  112. Pipeline[Pipeline]
  113. end
  114. Sponsor((Sponsor))
  115. Teacher((Teacher))
  116. Student((Student))
  117. Engineer((Engineer))
  118. Student --> |studies| Website
  119. Student --> |loves| Sponsor
  120. Student --> |respects| Teacher
  121. Student --> |complements| Draft
  122. Teacher -.- Engineer
  123. Sponsor --> |feeds| Teacher
  124. Sponsor --> |feeds| Engineer
  125. Teacher --> |reviews| Draft
  126. File --> |triggers| Pipeline
  127. Draft -.- File
  128. Pipeline --> |updates| Website
  129. Teacher --> |authors| File
  130. Engineer --> |specifies| File
  131. Engineer --> |maintains| Pipeline
  132. Engineer --> |hosts| Website
  133. ```
  134. ```mermaid
  135. graph TB
  136. subgraph M3P2
  137. Draft[Draft]
  138. File[File]
  139. Website[Website]
  140. Pipeline[Pipeline]
  141. end
  142. Sponsor((Sponsor))
  143. Teacher((Teacher))
  144. Student((Student))
  145. Engineer((Engineer))
  146. Student --> |studies| Website
  147. Student --> |loves| Sponsor
  148. Student --> |respects| Teacher
  149. Student --> |complements| Draft
  150. Teacher -.- Engineer
  151. Sponsor --> |feeds| Teacher
  152. Sponsor --> |feeds| Engineer
  153. Teacher --> |reviews| Draft
  154. File --> |triggers| Pipeline
  155. Draft -.- File
  156. Pipeline --> |updates| Website
  157. Teacher --> |authors| File
  158. Engineer --> |specifies| File
  159. Engineer --> |maintains| Pipeline
  160. Engineer --> |hosts| Website
  161. ```