Merge pull request 'Fusion de l'article simplecite et préparation du DnD' (#1) from wip into main
Some checks failed
ci/woodpecker/manual/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/manual/woodpecker Pipeline failed
Reviewed-on: https://gitea.polarolouis.fr/polarolouis/blog/pulls/1
This commit is contained in:
commit
913c091a5b
8 changed files with 83 additions and 2 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -1,3 +1,6 @@
|
||||||
[submodule "themes/paper"]
|
[submodule "themes/paper"]
|
||||||
path = themes/paper
|
path = themes/paper
|
||||||
url = https://github.com/nanxiaobei/hugo-paper.git
|
url = https://github.com/nanxiaobei/hugo-paper.git
|
||||||
|
[submodule "themes/hugo-simplecite"]
|
||||||
|
path = themes/hugo-simplecite
|
||||||
|
url = https://github.com/joksas/hugo-simplecite
|
||||||
|
|
|
||||||
4
content/posts/math/avantage-dnd/bib.json
Normal file
4
content/posts/math/avantage-dnd/bib.json
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
[
|
||||||
|
{"id":"IntroductionDonjonsDragons","accessed":{"date-parts":[["2024",4,13]]},"citation-key":"IntroductionDonjonsDragons","title":"Introduction » Donjons & Dragons - D&D 5e","type":"webpage","URL":"https://www.aidedd.org/regles/"},
|
||||||
|
{"id":"perkinsBasicRulesVersion2018","author":[{"family":"Perkins","given":"Christopher"},{"family":"Lee","given":"Peter"},{"family":"Townshend","given":"Steve"},{"family":"Cordell","given":"Bruce R"},{"family":"Mohan","given":"Kim"}],"citation-key":"perkinsBasicRulesVersion2018","issued":{"date-parts":[["2018",11]]},"language":"en","source":"Zotero","title":"D&D Basic Rules, Version 1.0, Released November 2018","type":"book"}
|
||||||
|
]
|
||||||
24
content/posts/math/avantage-dnd/index.md
Normal file
24
content/posts/math/avantage-dnd/index.md
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
+++
|
||||||
|
title = "Probabilités de la mécanique d'avantage dans Donjons & Dragons"
|
||||||
|
date = 2024-04-13T21:13:56+02:00
|
||||||
|
draft = true
|
||||||
|
math = true
|
||||||
|
bibliography = true
|
||||||
|
+++
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
Sur le site [aidedd.org]() à partir des *Basic Rules* {{<cite "perkinsBasicRulesVersion2018">}}, les auteurs définissent l'avantage (et le désavantage) comme :
|
||||||
|
>Parfois un jet de caractéristique, d’attaque ou de sauvegarde se fait dans des conditions particulières qui entraînent un avantage ou un désavantage. Un avantage reflète des circonstances favorables à une action (et par conséquent au d20), un désavantage implique le contraire. L’un comme l’autre nécessite de lancer deux fois le d20. Sur un avantage, le meilleur des deux jets sera conservé ; sur un désavantage, ce sera le moins bon. Par exemple vous obtenez 17 et 5, un désavantage conclura sur 5, un avantage sur 17.
|
||||||
|
|
||||||
|
L'exemple décrit donne par exemple $D_1 = 5, D_2 = 17$ et ainsi l'évènement considéré est alors $\max(D_1, D_2) \geq t$ avec $t$ un certain seuil.
|
||||||
|
|
||||||
|
Nous nous proposons ici de réaliser les calculs de probabilités des évènements et de les comparer au lancer de dés sans avantage.
|
||||||
|
|
||||||
|
## Cas de l'avantage avec 2 dés à 20 faces
|
||||||
|
|
||||||
|
## Cas de l'avantage avec $n$ dés à $N$ faces
|
||||||
|
|
||||||
|
## Bibliographie
|
||||||
|
|
||||||
|
{{<references>}}
|
||||||
3
content/posts/tech/hugo-simplecite/bib.json
Normal file
3
content/posts/tech/hugo-simplecite/bib.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
[
|
||||||
|
{"id":"joksasJoksasHugosimplecite2024","abstract":"Citations in Hugo websites.","accessed":{"date-parts":[["2024",4,13]]},"author":[{"family":"Joksas","given":"Dovydas"}],"citation-key":"joksasJoksasHugosimplecite2024","genre":"HTML","issued":{"date-parts":[["2024",3,14]]},"license":"MIT","original-date":{"date-parts":[["2021",5,3]]},"source":"GitHub","title":"joksas/hugo-simplecite","type":"software","URL":"https://github.com/joksas/hugo-simplecite"}
|
||||||
|
]
|
||||||
43
content/posts/tech/hugo-simplecite/index.md
Normal file
43
content/posts/tech/hugo-simplecite/index.md
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
+++
|
||||||
|
title = 'Utiliser le thème hugo-simplecite pour des citations'
|
||||||
|
date = 2024-04-13T22:04:22+02:00
|
||||||
|
draft = false
|
||||||
|
+++
|
||||||
|
|
||||||
|
Pour pouvoir faire de belles citations dans les articles de blog en utilisant par exemple un extrait de bibliographie Zotero il faut suivre les étapes suivantes (obtenues depuis le github du thème {{<cite "joksasJoksasHugosimplecite2024">}}) :
|
||||||
|
|
||||||
|
1. Installer le theme en tant que Git Submodule
|
||||||
|
```bash
|
||||||
|
git submodule add https://github.com/joksas/hugo-simplecite themes/hugo-simplecite
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Ajouter le thème dans `hugo.toml`:
|
||||||
|
```toml
|
||||||
|
theme = ['paper', 'hugo-simplecite']
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Ajouter le code ci-dessous par exemple dans `layouts/partials/header.html` :
|
||||||
|
```html
|
||||||
|
{{ $simpleciteStyle := resources.Get "scss/hugo-simplecite.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
|
||||||
|
<link rel="stylesheet" type="text/css" href="{{ $simpleciteStyle.Permalink }}">
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Ouvrir la page où mettre des citations et ajouter dans le dossier le fichier `bib.json`:
|
||||||
|
```
|
||||||
|
.
|
||||||
|
├── content1
|
||||||
|
│ ├── bib.json
|
||||||
|
│ └── index.md
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Puis dans `index.md` on peut alors citer :
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
Et ainsi blabla a dit dans {{</*cite "blabla"*/>}}
|
||||||
|
|
||||||
|
{{</*references*/>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
Voilà en espérant que ma galère peut vous éviter la vôtre !
|
||||||
|
|
||||||
|
{{<references>}}
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
baseURL = 'https://blog.polarolouis.fr/'
|
baseURL = 'https://blog.polarolouis.fr/'
|
||||||
languageCode = 'en-us'
|
languageCode = 'en-us'
|
||||||
title = "Polarolouis's Blog"
|
title = "Polarolouis's Blog"
|
||||||
theme = 'paper'
|
theme = ['paper', 'hugo-simplecite']
|
||||||
|
sectionPagesMenu = 'main'
|
||||||
|
ignoreLogs = ['error-remote-getjson']
|
||||||
2
layouts/partials/header.html
Normal file
2
layouts/partials/header.html
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
{{ $simpleciteStyle := resources.Get "scss/hugo-simplecite.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }}
|
||||||
|
<link rel="stylesheet" type="text/css" href="{{ $simpleciteStyle.Permalink }}">
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 456c1657639f515c0e8efe08d73f4ddf1ff3cdb7
|
Subproject commit 271cb5117c78024eab2593a5f216b80f806479b7
|
||||||
Loading…
Add table
Reference in a new issue