Remplacement des liens Github vers ma forge perso !

This commit is contained in:
Stanislas Jouffroy 2025-03-21 23:13:56 +01:00
parent 7250fc477d
commit 07a19c800f
4 changed files with 73 additions and 12 deletions

View file

@ -1,10 +1,10 @@
+++ ---
title = 'jouf.fr' title: 'jouf.fr'
date = 2025-03-20T22:44:33+01:00 date: 2025-03-20T22:44:33+01:00
draft = false draft: false
description = "Accueil du site" description: "Accueil du site"
weight = 10 weight: 10
+++ ---
# Le site de stan # Le site de stan

View file

@ -14,14 +14,14 @@ enableMissingTranslationPlaceholders = false
# Source Code repository section # Source Code repository section
description = "Bienvenue chez moi" description = "Bienvenue chez moi"
github_repository = "https://github.com/thingsym/hugo-theme-techdoc" git_repository = "https://git.jouf.fr/stanislas/site-jouf"
version = "0.1.0" version = "0.1.0"
# Documentation repository section # Documentation repository section
# documentation repository (set edit link to documentation repository) # documentation repository (set edit link to documentation repository)
github_doc_repository = "https://github.com/thingsym/hugo-theme-techdoc" git_doc_repository = "https://git.jouf.fr/stanislas/site-jouf"
github_doc_repository_branch = "master" git_doc_repository_branch = "main"
github_doc_repository_path = "" git_doc_repository_path = ""
# Open Graph and Twitter Cards settings section # Open Graph and Twitter Cards settings section
# Open Graph settings for each page are set on the front matter. # Open Graph settings for each page are set on the front matter.
@ -36,7 +36,7 @@ enableMissingTranslationPlaceholders = false
# Documentation Menu section # Documentation Menu section
# Menu style settings # Menu style settings
menu_style = "open-menu" # "open-menu" or "slide-menu" or "" blank is as no sidebar menu_style = "slide-menu" # "open-menu" or "slide-menu" or "" blank is as no sidebar
# Date format # Date format
dateformat = "02/01/2006" # default "2 Jan 2006" dateformat = "02/01/2006" # default "2 Jan 2006"

View file

@ -0,0 +1,3 @@
{{- if and .Site.Params.git_doc_repository .File -}}
<a href="{{ .Site.Params.git_doc_repository }}/src/branch/{{ .Site.Params.git_doc_repository_branch | default "main" }}/content/{{ .Site.Params.git_doc_repository_path }}{{ .File.Path }}" class="edit-page"><i class="fas fa-pen-square"></i>&nbsp;Edit on jouf.fr forge</a>
{{- end -}}

View file

@ -0,0 +1,58 @@
{{$currentNode := .}}
<nav class="slide-menu">
<ul>
<li class="{{ if .IsHome }}active{{ end }}"><a href="{{ .Site.BaseURL }}">Accueil</a></li>
{{- if eq .Site.Params.ordersectionsby "title" -}}
{{- range .Site.Home.Sections.ByTitle -}}
{{template "slide-menu" dict "sect" . "currentnode" $currentNode}}
{{- end -}}
{{- else -}}
{{- range .Site.Home.Sections.ByWeight -}}
{{template "slide-menu" dict "sect" . "currentnode" $currentNode}}
{{- end -}}
{{- end}}
</ul>
</nav>
{{define "slide-menu"}}
{{- $currentNode := .currentnode -}}
{{ with .sect }}
{{ if .IsSection }}
{{ if in .Site.Params.menu_exclusion .Section }}
{{- else -}}
{{- safeHTML .Params.head -}}
{{- $numberOfPages := (add (len .Pages) (len .Sections)) -}}
<li class="{{ if .IsAncestor $currentNode }}parent{{ end }}{{ if and .File $currentNode.File }}{{ if eq .File.UniqueID $currentNode.File.UniqueID }} active{{ end }}{{ end }}{{ if ne $numberOfPages 0 }} has-sub-menu{{ end }}"><a href="{{ .Permalink }}">{{ safeHTML .Params.Pre }}{{ .Title }}{{ safeHTML .Params.Post }}{{ if ne $numberOfPages 0 }}{{ if .IsAncestor $currentNode }}<span class="mark opened">-</span>{{ else }}<span class="mark closed">+</span>{{ end }}{{ end }}</a>
{{ if ne $numberOfPages 0 }}
<ul class="sub-menu">
{{- .Scratch.Set "pages" .Pages -}}
{{- if .Sections -}}
{{- .Scratch.Set "pages" (.Pages | union .Sections) -}}
{{- end -}}
{{- $pages := (.Scratch.Get "pages") -}}
{{- if eq .Site.Params.ordersectionsby "title" -}}
{{- range $pages.ByTitle -}}
{{- if and .Params.hidden (not $.showhidden) -}}
{{- else -}}
{{template "slide-menu" dict "sect" . "currentnode" $currentNode}}
{{- end -}}
{{- end -}}
{{- else -}}
{{- range $pages.ByWeight -}}
{{- if and .Params.hidden (not $.showhidden) -}}
{{- else -}}
{{template "slide-menu" dict "sect" . "currentnode" $currentNode}}
{{- end -}}
{{- end -}}
{{- end}}
</ul>
{{end}}
</li>
{{- end -}}
{{- else -}}
{{- if not .Params.Hidden -}}
<li class="{{ if and .File $currentNode.File }}{{ if eq .File.UniqueID $currentNode.File.UniqueID }}active{{ end }}{{ end }}"><a href="{{ .Permalink }}">{{ safeHTML .Params.Pre }}{{ .Title }}{{ safeHTML .Params.Post }}</a></li>
{{- end -}}
{{ end -}}
{{ end -}}
{{ end }}