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

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