epub/layouts/index.ncx

48 lines
1.3 KiB
Text
Raw Normal View History

2021-02-03 05:28:19 -05:00
{{- printf "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" | safeHTML }}
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1"
xml:lang="{{ .Lang }}">
<head>
<meta name="dtb:uid" content="{{ .Site.Params.bookid | default now.Unix }}" />
<meta name="dtb:depth" content="0" />
<meta name="dtb:totalPageCount" content="0" />
<meta name="dtb:maxPageNumber" content="0" />
</head>
<docTitle><text>{{ .Site.Params.title }}</text></docTitle>
<docAuthor><text>{{ .Site.Params.creator }}</text></docAuthor>
<navMap>
<navPoint id="titelseite"
playOrder="1">
<navLabel>
<text>Titelseite</text>
</navLabel>
<content src="titelseite.xhtml" />
</navPoint>
<navPoint id="inhaltsverzeichnis"
playOrder="2">
<navLabel>
<text>Inhaltsverzeichnis</text>
</navLabel>
<content src="inhaltsverzeichnis.xhtml" />
</navPoint>
{{ $i := 0 -}}
{{- range ( where .Site.RegularPages "Section" "ne" "" ).Reverse }}
<navPoint id="chapter_{{ $i }}"
playOrder="{{ add $i 3 }}">
<navLabel>
<text>{{ .Title }}</text>
</navLabel>
<content src="{{ replace .Permalink "/OEBPS/" "" }}" />
</navPoint>
{{ $i = add $i 1 -}}
{{- end -}}
</navMap>
</ncx>