From 0ad261e5b941c4bfb517cd6be96cc7f1f7787400 Mon Sep 17 00:00:00 2001 From: yv_pic Date: Wed, 30 Dec 2020 15:52:14 +0100 Subject: [PATCH] =?UTF-8?q?*=20fil=20d'Ariane=20Breadcrumb=20*=20=C3=B4ter?= =?UTF-8?q?=20les=20draft?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archetypes/default.md | 1 - config.toml | 2 +- .../La Petite Passe tranquille/_index.md | 1 - .../Là eussent dû être des amis/_index.md | 1 - content/Recueils/Nouvelles/_index.md | 1 - content/Recueils/Poésies & Chansons/_index.md | 1 - content/Recueils/_index.md | 1 - content/Récits/La Justice apparente/_index.md | 1 - .../_index.md | 1 - content/Récits/Les Terre-pleins/Prologue.md | 2 ++ content/Récits/Les Terre-pleins/Prologue.md~ | 7 ++++-- content/Récits/Les Terre-pleins/_index.md | 1 - content/Récits/_index.md | 1 - content/Résumés/Résumés.md | 1 - content/_index.md | 7 +++--- data/{ => notrack}/social.yaml | 0 layouts/_default/single.html | 25 +++++++++++++++++++ layouts/partials/breadcrumbs.html | 19 ++++++++++++++ 18 files changed, 55 insertions(+), 18 deletions(-) rename data/{ => notrack}/social.yaml (100%) create mode 100644 layouts/_default/single.html create mode 100644 layouts/partials/breadcrumbs.html diff --git a/archetypes/default.md b/archetypes/default.md index 00e77bd..7ce2f1a 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,6 +1,5 @@ --- title: "{{ replace .Name "-" " " | title }}" date: {{ .Date }} -draft: true --- diff --git a/config.toml b/config.toml index ef297d8..0736daa 100644 --- a/config.toml +++ b/config.toml @@ -5,7 +5,7 @@ theme = "notrack" newContentEditor = "nvim" # mainSections = ["Récits"]["Recueils"] # disqusShortname = "example" -paginate = 4 +paginate = 10 [params] author = "Yves Picard" diff --git a/content/Recueils/La Petite Passe tranquille/_index.md b/content/Recueils/La Petite Passe tranquille/_index.md index fa0d144..a915e93 100644 --- a/content/Recueils/La Petite Passe tranquille/_index.md +++ b/content/Recueils/La Petite Passe tranquille/_index.md @@ -1,6 +1,5 @@ --- title: "La Petite Passe tranquille" -draft: "true" menu: main: title: "La Petite Passe tranquille" diff --git a/content/Recueils/Là eussent dû être des amis/_index.md b/content/Recueils/Là eussent dû être des amis/_index.md index 279fcf7..80d9c97 100644 --- a/content/Recueils/Là eussent dû être des amis/_index.md +++ b/content/Recueils/Là eussent dû être des amis/_index.md @@ -1,7 +1,6 @@ --- title: "Là eussent dû être des amis" date: 2020-12-22 -draft: "true" menu: main: parent: "Les recueils" diff --git a/content/Recueils/Nouvelles/_index.md b/content/Recueils/Nouvelles/_index.md index ba418b9..09c5c94 100644 --- a/content/Recueils/Nouvelles/_index.md +++ b/content/Recueils/Nouvelles/_index.md @@ -1,7 +1,6 @@ --- title: "Nouvelles" date: 2020-12-22 -draft: "true" menu: main: parent: "Les recueils" diff --git a/content/Recueils/Poésies & Chansons/_index.md b/content/Recueils/Poésies & Chansons/_index.md index 9fc0c7c..d6f57be 100644 --- a/content/Recueils/Poésies & Chansons/_index.md +++ b/content/Recueils/Poésies & Chansons/_index.md @@ -1,7 +1,6 @@ --- title: "Poésies & Chansons" date: 2020-12-22 -draft: "true" menu: main: parent: "Les recueils" diff --git a/content/Recueils/_index.md b/content/Recueils/_index.md index d2cf62b..e91dbc3 100644 --- a/content/Recueils/_index.md +++ b/content/Recueils/_index.md @@ -1,7 +1,6 @@ --- title: "Les recueils" kind: "section" -draft: "true" menu: main: identifier: "Les recueils" diff --git a/content/Récits/La Justice apparente/_index.md b/content/Récits/La Justice apparente/_index.md index c0c01cc..d744c8e 100644 --- a/content/Récits/La Justice apparente/_index.md +++ b/content/Récits/La Justice apparente/_index.md @@ -1,7 +1,6 @@ --- title: "La Justice apparente" date: 2020-12-22 -draft: "true" menu: main: parent: "Les récits" diff --git a/content/Récits/Les Petits-enfants de madame Peron/_index.md b/content/Récits/Les Petits-enfants de madame Peron/_index.md index 9c28bee..8698d8a 100644 --- a/content/Récits/Les Petits-enfants de madame Peron/_index.md +++ b/content/Récits/Les Petits-enfants de madame Peron/_index.md @@ -1,7 +1,6 @@ --- title: "Les Petits-enfants de madame Perón racontés à elle-même" date: 2020-12-22 -draft: "true" menu: main: parent: "Les récits" diff --git a/content/Récits/Les Terre-pleins/Prologue.md b/content/Récits/Les Terre-pleins/Prologue.md index 534f6e7..62d3398 100644 --- a/content/Récits/Les Terre-pleins/Prologue.md +++ b/content/Récits/Les Terre-pleins/Prologue.md @@ -17,3 +17,5 @@ Pars cette semaine par exemple, tu as le temps. Jan Yoors, un gamin de ton âge Et s'il te plaît plus tard, fais ton profit de cette histoire. Lorsque tu voudras à ton tour embrasser la vie, plier le monde, circonscrire les causes et faire usage de ta puissance ou simplement construire ta propre route : alors repense à ces terres-pleins et aux compagnons qui y vivent. Je te laisse de poursuivre la fable. + + diff --git a/content/Récits/Les Terre-pleins/Prologue.md~ b/content/Récits/Les Terre-pleins/Prologue.md~ index d756ab1..c20e7dd 100644 --- a/content/Récits/Les Terre-pleins/Prologue.md~ +++ b/content/Récits/Les Terre-pleins/Prologue.md~ @@ -1,7 +1,8 @@ --- -title:"Prologue" ---- +title: "Prologue" +date: 2019-03-26T08:47:11+01:00 +--- Jeune lecteur ! @@ -16,3 +17,5 @@ Pars cette semaine par exemple, tu as le temps. Jan Yoors, un gamin de ton âge Et s'il te plaît plus tard, fais ton profit de cette histoire. Lorsque tu voudras à ton tour embrasser la vie, plier le monde, circonscrire les causes et faire usage de ta puissance ou simplement construire ta propre route : alors repense à ces terres-pleins et aux compagnons qui y vivent. Je te laisse de poursuivre la fable. + + diff --git a/content/Récits/Les Terre-pleins/_index.md b/content/Récits/Les Terre-pleins/_index.md index 377fa33..fbcbbc6 100644 --- a/content/Récits/Les Terre-pleins/_index.md +++ b/content/Récits/Les Terre-pleins/_index.md @@ -1,7 +1,6 @@ --- title: "Les Terre-pleins" date: 2020-12-22 -draft: "true" menu: main: parent: "Les récits" diff --git a/content/Récits/_index.md b/content/Récits/_index.md index 19fd4d7..6316d06 100644 --- a/content/Récits/_index.md +++ b/content/Récits/_index.md @@ -1,6 +1,5 @@ --- title: "Les récits" -draft: "true" menu: main: identifier: "Les récits" diff --git a/content/Résumés/Résumés.md b/content/Résumés/Résumés.md index f326cc3..2e2c788 100644 --- a/content/Résumés/Résumés.md +++ b/content/Résumés/Résumés.md @@ -1,7 +1,6 @@ --- title: "Résumés" date: 2020-12-23 -draft: "true" menu: "main" weight: 20 --- diff --git a/content/_index.md b/content/_index.md index c3a1ebe..a80daff 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,7 +1,6 @@ --- title: "Accueil" date: 2020-12-23 -draft: "true" menu: "main" weight: 5 --- @@ -22,7 +21,7 @@ Le site est créé grâce à Hugo, [https://gohugo.io/](https://gohugo.io/), à La typo du titre et des menus est de l'Infini, heureuse initiative [http://www.cnap.graphismeenfrance.fr/infini/](http://www.cnap.graphismeenfrance.fr/infini/). La titraille est en Ubuntu et le texte en FreeSerif. -Merci à Mistral Oz pour son aide bienveillante :) [https://www.lewebenplus.net/](https://github.com/gevhaz/hugo-theme-notrack) +Merci à Mistral Oz pour son aide bienveillante :) [https://www.lewebenplus.net/](https://www.lewebenplus.net/) ## Contact @@ -32,6 +31,7 @@ Le blog Rechampir est ici : [https://rechampir.net/](https://rechampir.net/) Ce qu'il reste à faire pour la v. 0.9 * arborescence complète : ok mais les pages "sections" n'affichent rien & comment prendre en compte les sous-dossiers ? +* noms de dossiers : tenir compte du fil d'Ariane * résumés à compléter Pour la v. 1 : @@ -39,9 +39,8 @@ Pour la v. 1 : Fonctionnalités à intégrer (layouts) * intégrer ensuite chapitre avant/chapitre après -* possibilité d'un fil d'Ariane ? + * numérotation des paragraphes ? Ce qui ne marche pas encore : -* customiser le lien social "mastodon.social" * le lien social XMPP diff --git a/data/social.yaml b/data/notrack/social.yaml similarity index 100% rename from data/social.yaml rename to data/notrack/social.yaml diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..c649d52 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,25 @@ +{{ define "main" }} +
+
+ {{ if in site.Params.mainSections .Page.Section }} +

{{ .Title }}

+ {{ else }} +

{{ .Title }}

+ {{ end }} + + {{- /* Show post information if it's a post, otherwise just the content */ -}} + {{ if in site.Params.mainSections .Page.Section }} + + +
+ {{ .Content }} +
+ {{ template "_internal/disqus.html" . }} + {{ else }} + {{ .Content }} + {{ end }} + {{ partial "breadcrumbs.html" . }} +
+
+{{ end }} diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html new file mode 100644 index 0000000..7fb3bf4 --- /dev/null +++ b/layouts/partials/breadcrumbs.html @@ -0,0 +1,19 @@ +{{ $siteUrl := replace .Permalink ( printf "%s" .Site.BaseURL) "" }} +{{ $.Scratch.Add "sitePath" .Site.BaseURL }} + +{{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" .Site.BaseURL "name" "home" "position" 1 )) }} +{{ range $index, $element := split $siteUrl "/" }} +{{ $.Scratch.Add "sitePath" $element }} +{{ $.Scratch.Add "sitePath" "/" }} +{{ if ne $element "" }} +{{ $.Scratch.Add "siteBreadcrumbs" (slice (dict "url" ($.Scratch.Get "sitePath") "name" . "position" (add $index 2))) }} +{{ end }} +{{ end }} + +