mirror of
https://github.com/facundoolano/jorge.git
synced 2024-12-25 21:58:28 +01:00
fix post url generation
This commit is contained in:
parent
17a55ea54a
commit
180a5c7ac1
1 changed files with 1 additions and 0 deletions
|
@ -98,6 +98,7 @@ func (site *Site) loadTemplates(srcDir string) error {
|
|||
|
||||
// set site related (?) metadata. Not sure if this should go elsewhere
|
||||
relPath, _ := filepath.Rel(srcDir, path)
|
||||
relPath = strings.TrimSuffix(relPath, filepath.Ext(relPath)) + templ.Ext()
|
||||
templ.Metadata["path"] = relPath
|
||||
templ.Metadata["url"] = "/" + strings.TrimSuffix(relPath, ".html")
|
||||
templ.Metadata["dir"] = "/" + filepath.Dir(relPath)
|
||||
|
|
Loading…
Reference in a new issue