From 7f56b3e122b2d0d3bec3b9c93ff3df93537f9c41 Mon Sep 17 00:00:00 2001 From: Louis Lacoste Date: Sat, 13 Apr 2024 22:53:40 +0200 Subject: [PATCH] Ajout de tuto sur hugo simplecite --- content/posts/tech/hugo-simplecite/bib.json | 3 ++ content/posts/tech/hugo-simplecite/index.md | 43 +++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 content/posts/tech/hugo-simplecite/bib.json create mode 100644 content/posts/tech/hugo-simplecite/index.md 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