-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Readme rendering for a better home page (ia-z#77)
* Readme rendering for a better home page * Keep the link between rendering and build * Target main as default branch * Scheduling on deployment pipeline * Use custom secret to make deplyment * Go for pixel size for rendering * New stage to commit and push Co-authored-by: Lucas Pauzies <[email protected]>
- Loading branch information
Showing
11 changed files
with
914 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<h1 align="center">{{ title }}</h1> | ||
<p align="center"> | ||
Cours & Ressources pour l'IA {{#isBuilding}} (En construction) {{/isBuilding}} | ||
</p> | ||
<p align="center"> | ||
<a href="https://discord.gg/nmnuf6USVT"> | ||
<img alt="discord server invitation link" src="https://cdn.cdnlogo.com/logos/d/47/discord.svg" style="width: 25%"> | ||
</a> | ||
</p> | ||
|
||
## Sommaire | ||
|
||
- [Presentation](#presentation) | ||
- [Perimètre](#perimètre) | ||
- [Organisation](#organisation) | ||
- [Communauté](#communauté) | ||
- [Equipe](#equipe) | ||
|
||
--- | ||
|
||
## Presentation | ||
**{{ title }}** est une plateforme en ligne offrant un enseignement complet en data science. Elle est destinée à un public ayant un bagage en mathématiques, python et sciences informatiques de niveau supérieur ou égal au BAC. | ||
|
||
{{ title }} est conçue pour fournir des enseignements destinés à un public déjà sensibilisé et dans l’optique de fournir la meilleure qualité de support pédagogique et didactique. | ||
|
||
#### Perimètre | ||
- La plateforme web a pour objectif de former et sensibiliser à la data science | ||
- Les enseignements apportés sont segmentés en notions, elles-mêmes découpées en cours | ||
- Les cours ont pour but de donner une information claire, concise au possible et illustrée par des exemples | ||
- Possibilité d’ajouter des ressources externes à la fin de chaque cours pour approfondir les cours disponibles sur la plateforme | ||
- La plateforme web recense tous les éléments cités au-dessus | ||
- La plateforme web a pour unique but d’être éducative. Elle ne véhicule donc ni promotion, ni opinions | ||
|
||
|
||
--- | ||
## Organisation | ||
|
||
- Nouveau membre du projet {{ title }} ? | ||
|
||
* Accèdez au document d'onboarding : ia-z/organisation/onboarding.md | ||
* Accèdez au document de bonnes pratiques git : ia-z/organisation/workflow_git.md | ||
* Accèdez au template d'écriture de cours : ia-z/organisation/template_chapitre.md | ||
|
||
- Pour suggérer un nouveau cours ou pour toutes suggestions, réagissez à ce fil de discussion pour nous en faire part : https://github.com/ia-z/ia-z/discussions/categories/ideas ou créez une issue détaillée avec le bon tag associé. | ||
- Si un cours contient une erreur ou vous rencontrez un problème technique, ouvrez une issue dédiée puis soumettez une PR directement. | ||
|
||
--- | ||
## Communauté | ||
|
||
- Nous communiquons sur le serveur de la communauté [](https://discord.gg/nmnuf6USVT). | ||
Commencez par accepter le réglement et vous présenter dans le channel [#présentation](https://discord.gg/v4nKnCcEqF) pour accéder aux autres salons. | ||
|
||
|
||
## Equipe | ||
|
||
### Fondateur | ||
|
||
<p style="margin-top: 2px"> | ||
<a href="https://github.com/anisayari" style="display: flex; align-items : center; text-decoration: none; color: inherit;"> | ||
<img src="https://avatars.githubusercontent.com/u/10380894?v=4" style="width: 36px; margin-top: 2px"> | ||
Anis Ayari | ||
</a> | ||
</p> | ||
|
||
### Contributeurs | ||
|
||
<p style="display: flex; flex-wrap: wrap; gap: 10px; margin-top: 2px"> | ||
{{#contributors}} | ||
<a href="{{ github_profile }}" style="display: flex; align-items : center; text-decoration: none; color: inherit; width: {{ width_markup }}"> | ||
<img src="{{ avatar }}" style="width: {{ width_avatar }}; margin-top: 2px"> | ||
{{ login }} | ||
</a> | ||
{{/contributors}} | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
const Mustache = require("mustache"); | ||
const fs = require("fs"); | ||
const request = require("sync-request"); | ||
const MUSTACHE_FILE = "./.github/dynamic-rendering/main.mustache"; | ||
const README_FILE = "README.md" | ||
|
||
/** Functions to retrieve data from github API */ | ||
|
||
function getContributors() { | ||
let apiEndPoint = "https://api.github.com/repos/ia-z/ia-z/contributors" | ||
let headers = { "User-Agent": "request" } | ||
let response = request("GET", apiEndPoint, { headers }) | ||
let parsedResponse = JSON.parse(response.getBody("utf8")) | ||
return parsedResponse | ||
.filter(contributor => contributor.type.toLowerCase() !== "bot") | ||
.sort((c1, c2) => c2.contributions - c1.contributions) | ||
.map(contributor => { | ||
return { | ||
avatar: contributor.avatar_url, | ||
login: contributor.login, | ||
github_profile: contributor.html_url, | ||
width_markup: "150px", | ||
width_avatar: "36px" | ||
} | ||
}) | ||
} | ||
|
||
/** Define DATA to be rendered through Mustache */ | ||
|
||
let DATA = { | ||
title: "IA-Z", | ||
isBuilding: true, | ||
contributors: getContributors() | ||
} | ||
|
||
/** | ||
* Generate README from Mustache Template | ||
* @param {Object} mustacheData | ||
*/ | ||
function generateReadMe(mustacheData) { | ||
fs.readFile(MUSTACHE_FILE, (err, data) => { | ||
if (err) throw err; | ||
const output = Mustache.render(data.toString(), mustacheData); | ||
fs.writeFileSync(README_FILE, output); | ||
}); | ||
} | ||
|
||
generateReadMe(DATA); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ venv/ | |
|
||
# Notebook outputs | ||
**/iframe_figures/ | ||
|
||
# Mustache rendering | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.