diff --git a/.gitmodules b/.gitmodules index 3cab4f3..ca2d217 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "themes/paper"] path = themes/paper url = https://github.com/nanxiaobei/hugo-paper.git +[submodule "themes/hugo-simplecite"] + path = themes/hugo-simplecite + url = https://github.com/joksas/hugo-simplecite diff --git a/content/posts/math/avantage-dnd/bib.json b/content/posts/math/avantage-dnd/bib.json new file mode 100644 index 0000000..16c01d5 --- /dev/null +++ b/content/posts/math/avantage-dnd/bib.json @@ -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"} +] diff --git a/content/posts/math/avantage-dnd/index.md b/content/posts/math/avantage-dnd/index.md new file mode 100644 index 0000000..5d67e69 --- /dev/null +++ b/content/posts/math/avantage-dnd/index.md @@ -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* {{}}, 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 + +{{}} diff --git a/content/posts/tech/hugo-simplecite/bib.json b/content/posts/tech/hugo-simplecite/bib.json new file mode 100644 index 0000000..f77a572 --- /dev/null +++ b/content/posts/tech/hugo-simplecite/bib.json @@ -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"} +] diff --git a/content/posts/tech/hugo-simplecite/index.md b/content/posts/tech/hugo-simplecite/index.md new file mode 100644 index 0000000..955bfc4 --- /dev/null +++ b/content/posts/tech/hugo-simplecite/index.md @@ -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 {{}}) : + +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 }} + +``` + +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 {{}} + +{{}} +``` + +Voilà en espérant que ma galère peut vous éviter la vôtre ! + +{{}} \ No newline at end of file diff --git a/hugo.toml b/hugo.toml index edaec02..4108fa3 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,4 +1,6 @@ baseURL = 'https://blog.polarolouis.fr/' languageCode = 'en-us' title = "Polarolouis's Blog" -theme = 'paper' \ No newline at end of file +theme = ['paper', 'hugo-simplecite'] +sectionPagesMenu = 'main' +ignoreLogs = ['error-remote-getjson'] \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..18d9241 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,2 @@ +{{ $simpleciteStyle := resources.Get "scss/hugo-simplecite.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint }} + \ No newline at end of file diff --git a/themes/paper b/themes/paper index 456c165..271cb51 160000 --- a/themes/paper +++ b/themes/paper @@ -1 +1 @@ -Subproject commit 456c1657639f515c0e8efe08d73f4ddf1ff3cdb7 +Subproject commit 271cb5117c78024eab2593a5f216b80f806479b7