Ajout de tuto sur hugo simplecite
This commit is contained in:
parent
7ae197a83b
commit
7f56b3e122
2 changed files with 46 additions and 0 deletions
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>}}
|
||||
Loading…
Add table
Reference in a new issue