parent
7dbaa95a90
commit
6e4a680237
@ -1,22 +0,0 @@
|
||||
<html>
|
||||
{{> meta.html }}
|
||||
<body>
|
||||
{{> header.html }}
|
||||
|
||||
<div id="content">
|
||||
|
||||
{{#if Data.bild }}
|
||||
<img src="{{ Data.bild }}" id="dataImg">
|
||||
{{/if}}
|
||||
|
||||
{{{ BodyParts.[0] }}}
|
||||
|
||||
{{#if BodyParts.[1] }}
|
||||
<div class="info">{{{ BodyParts.[1] }}}</div>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
|
||||
{{> footer.html }}
|
||||
</body>
|
||||
</html>
|
23
main.go
23
main.go
@ -317,6 +317,23 @@ func processContent(conf *PathConfigTree) {
|
||||
log.Panicf("unknown error for output directory '%s': %s", conf.OutputPath, err)
|
||||
}
|
||||
|
||||
curNavPath := strings.TrimPrefix(conf.OutputPath, *outDir)
|
||||
curNavPath = strings.TrimPrefix(curNavPath, "/")
|
||||
curNavPath = path.Clean(curNavPath)
|
||||
if curNavPath == "." {
|
||||
curNavPath = ""
|
||||
}
|
||||
|
||||
goTo := conf.Config.This.GoTo
|
||||
if goTo != nil && *goTo != "" {
|
||||
goToFixed := *goTo
|
||||
if strings.HasPrefix(goToFixed, "/") {
|
||||
goToFixed = backToRoot(curNavPath) + goToFixed
|
||||
}
|
||||
|
||||
log.Error(goToFixed)
|
||||
}
|
||||
|
||||
for _, file := range conf.InputFiles {
|
||||
inFile := conf.InputPath + "/" + file
|
||||
log.Debugf("reading file: %s", inFile)
|
||||
@ -415,12 +432,6 @@ func processContent(conf *PathConfigTree) {
|
||||
}
|
||||
|
||||
// build navigation
|
||||
curNavPath := strings.TrimPrefix(conf.OutputPath, *outDir)
|
||||
curNavPath = strings.TrimPrefix(curNavPath, "/")
|
||||
curNavPath = path.Clean(curNavPath)
|
||||
if curNavPath == "." {
|
||||
curNavPath = ""
|
||||
}
|
||||
navMap := make(map[string]*navElement)
|
||||
navSlice := make([]*navElement, 0)
|
||||
navActive := make([]*navElement, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user