Skip to content
Snippets Groups Projects
Unverified Commit 1495f315 authored by Arnaud Levy's avatar Arnaud Levy Committed by GitHub
Browse files

Merge pull request #348 from osunyorg/skip-page-root-in-sitemap

Ne pas lister la page racine (pages) dans le plan du site
parents 721b19fb 3c5d1427
No related branches found
No related tags found
No related merge requests found
// C'est vraiment utilisé qqpart ça ?
.sitemap__section
.content
> div
......@@ -10,4 +11,17 @@
@include media-breakpoint-up(desktop)
margin-bottom: 7.5rem
li
margin-bottom: 1rem
\ No newline at end of file
margin-bottom: 1rem
.block-sitemap
ul
list-style-type: none
li
position: relative
ul
margin-left: $spacing-3
li
a
@include icon(list-hyphen)
position: absolute
left: pxToRem(-24)
font-size: pxToRem(24)
......@@ -293,6 +293,8 @@ publications:
citations: Citations
stats:
label: publications
sitemap:
pages: Arborescence
volumes:
abstract: Abstract
paper:
......
......@@ -298,6 +298,8 @@ publications:
citations: Citations
stats:
label: publications
sitemap:
pages: Arborescence
volumes:
abstract: Résumé
paper:
......
......@@ -21,12 +21,32 @@
{{ partial "contents/list.html" . }}
<div class="block block-sitemap" id="pages">
<div class="container">
<div class="block-content">
<h2>{{ i18n "sitemap.pages" }}</h2>
<ul>
{{ range (where .Site.Pages "Type" "pages") }}
{{ if eq .Parent.Path "/pages" }}
<li>
<a href="{{ .Permalink }}">{{ safeHTML .Title }}</a>
{{ if .Pages }}
{{ partial "pages/sitemap_recursive_pages" .}}
{{ end }}
</li>
{{ end }}
{{ end }}
</ul>
</div>
</div>
</div>
{{ range .Site.Sections }}
{{ if ne .Type "sitemap" }}
{{ if and (ne .Type "sitemap") (ne .Type "pages") }}
{{ $permalink := .Permalink }}
<div class="block block-sitemap" id="{{ .Type }}">
<div class="container">
<div class="block-content">
<div class="block-content">
<h2>
<a href="{{ $permalink }}">{{ safeHTML .Title }}</a>
</h2>
......@@ -42,5 +62,6 @@
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
<ul>
{{ range .Pages }}
<li>
<a href="{{ .Permalink }}">{{ safeHTML .Title }}</a>
{{ if .Pages }}
{{ partial "pages/sitemap_recursive_pages.html" . }}
{{ end }}
</li>
{{ end }}
</ul>
......@@ -3,8 +3,11 @@
{{- if .context.Params.contents -}}
{{- partial "blocks/toc.html" .context.Params.contents -}}
{{- end -}}
<li>
<a href="#pages">{{ i18n "sitemap.pages" }}</a>
</li>
{{ range site.Sections }}
{{ if ne .Type "sitemap" }}
{{ if and (ne .Type "sitemap") (ne .Type "pages") }}
<li>
<a href="#{{ .Type }}">{{ safeHTML .Title }}</a>
</li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment