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