Skip to content

Commit

Permalink
Merge pull request #16 from BackToBasicsEpita/archetypes
Browse files Browse the repository at this point in the history
Archetypes
  • Loading branch information
Villosse authored Sep 22, 2024
2 parents 2e73bdd + 783d61d commit b421e3e
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 27 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Prérequis

Avant de commencer, assurez-vous d'avoir les outils suivants installés sur votre machine :
Avant de commencer, assurez-vous d'avoir les outils suivants installés sur votre machine, si vous utilisez **Nix** vous avez un [flake.nix](flake.nix):

- [Go](https://go.dev/) (minimum version v1.20)
- [Hugo Extended](https://gohugo.io/) (minimum version: 0.120.0)
Expand All @@ -12,7 +12,7 @@ Avant de commencer, assurez-vous d'avoir les outils suivants installés sur votr
Clonez le repository du projet :

```sh
git clone https://github.com/BackToBasicsEpita/site.git
git clone git@github.com:BackToBasicsEpita/backtobasicsepita.github.io.git
cd site
```

Expand All @@ -25,3 +25,24 @@ Pour lancer le serveur de développement et voir votre site en local :
```

Le site sera disponible à l'adresse : [http://localhost:1313](http://localhost:1313).

## Créer un sujet:

Pour créer un sujet vous aurez la documentation complète sur le site en local [localhost:1313/docs](https://localhost:1313/docs)

Si votre chapitre n'est pas disponible, vous devrez faire :
```sh
hugo -k new chapitre path/to/your/chapitre
```

Sinon/Puis :

```sh
hugo -k new cours path/to/your/course/name
```

## Comment soummettre ma fiche ?

- **Créer une branche pseudo/cours**
- **Faire une pull request**
- **Demander à ce que votre branch soit review et attendre qu'elle soit merge par un membre du bureau**
12 changes: 12 additions & 0 deletions archetypes/blog/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: "FIXME"
description: "FIXME"
summary: "FIXME"
date: {{ .Date }}
draft: false
weight: 9999
categories: []
tags: []
contributors: ["FIXME"]
cover: "path_of_the_cover/from_resources"
---
10 changes: 10 additions & 0 deletions archetypes/chapitre/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
weight: 999
title: "{{ replace .Name "-" "" | title }}"
description: "FIXME"
icon: "FIXME"
date: {{ .Date }}
draft: false
toc: true
katex: false
---
6 changes: 6 additions & 0 deletions archetypes/cours/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,11 @@
title: "{{ replace .Name "-" "" | title }}"
date: {{ .Date }}
authors: ["FIXME"]
weight: 500
description: "FIXME"
icon: "FIXME"
draft: false
toc: false
katex: true
---

9 changes: 9 additions & 0 deletions archetypes/rediff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
weight: 500
title: "{{ replace .Name "-" "" | title }} - Rediff"
date: {{ .Date }}
description: "Rediff"
draft: false

redif_url: "FIXME"
---
Binary file removed content/blog/presentation/BB.png
Binary file not shown.
Binary file not shown.
11 changes: 2 additions & 9 deletions content/blog/presentation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@ title: "BackToBasics est de retour !"
description: "Découvrez notre nouveau site, conçu pour vous offrir un accès simplifié à nos cours de soutien, tutorats et événements."
summary: "Découvrez notre nouveau site, conçu pour vous offrir un accès simplifié à nos cours de soutien, tutorats et événements."
date: 2024-08-22T19:50:00+02:00
lastmod: 2024-08-22T19:50:00+02:00
draft: false
weight: 50
categories: []
tags: []
contributors: ["Axel Thauvin"]
pinned: true
homepage: false
seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
cover: "BackToBasics_Horizontal_cover.png"
---


Expand All @@ -42,4 +35,4 @@ Pour plus d'informations, explorez notre site, inscrivez-vous à nos événement
**L'équipe BackToBasics**


<img src="BB.png" alt="drawing" width="50"/>
<img src="images/BB.png" alt="drawing" width="50"/>
1 change: 0 additions & 1 deletion content/docs/sample-subject/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ title: "Example"
description: "Sujet d'exemple pour faire un sujet"
icon: "function"
date: "2023-08-26T20:43:23+01:00"
lastmod: "2023-08-26T20:43:23+01:00"
draft: false
toc: true
katex: false
Expand Down
1 change: 0 additions & 1 deletion content/docs/sample-subject/markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ title: "Comment faire du markdown ?"
description: "Comment les sujets sont-ils écrits ?"
icon: "fluid_med"
date: "2023-08-26T20:43:23+01:00"
lastmod: "2023-08-26T20:43:23+01:00"
draft: false
toc: false
katex: true
Expand Down
11 changes: 5 additions & 6 deletions themes/lotusdocs/layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ <h1 class="text-center">{{ .Title }}</h1>
<div class="card">
{{ if site.Params.blog.showImage -}}

{{- $images := .Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- if $featured -}}
<img src = "{{ $featured.RelPermalink }}">
{{ end -}}
{{ $link := .RelPermalink }}

{{ with .Params.cover }}
<img src = "{{ $link }}/resources/{{ . }}">
{{ end }}
{{ end -}}
<div class="card-body">
<article>
Expand Down
15 changes: 7 additions & 8 deletions themes/lotusdocs/layouts/blog/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ <h1>{{ .Title }}</h1>
</div>
</div>
{{ if site.Params.blog.showImage -}}
{{- $images := .Resources.ByType "image" -}}
{{- $featured := $images.GetMatch "*feature*" -}}
{{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}}
{{- if $featured -}}
<div class="col-md-13">
<img src = "{{ $featured.RelPermalink }}">
</div>
{{ end -}}
{{ $link := .RelPermalink }}

{{ with .Params.cover }}
<div class="col-md-13">
<img src = "{{ $link }}/resources/{{ . }}">
</div>
{{ end }}
{{ end -}}
<div class="col-md-12 col-lg-9">
{{ with .Params.summary | safeHTML -}}<p class="lead">{{ . }}</p>{{ end -}}
Expand Down

0 comments on commit b421e3e

Please sign in to comment.