mirror of
https://github.com/gohugoio/hugo.git
synced 2025-01-27 08:13:31 +00:00
fixing issue with some urls missing '/'
This commit is contained in:
parent
b7bbc28caf
commit
e08d14ad49
1 changed files with 4 additions and 4 deletions
|
@ -190,10 +190,10 @@ func (s *Site) ProcessShortcodes() {
|
|||
func (s *Site) AbsUrlify() {
|
||||
for i, _ := range s.Pages {
|
||||
content := string(s.Pages[i].Content)
|
||||
content = strings.Replace(content, " src=\"/", " src=\""+s.c.BaseUrl, -1)
|
||||
content = strings.Replace(content, " src='/", " src='"+s.c.BaseUrl, -1)
|
||||
content = strings.Replace(content, " href='/", " href='"+s.c.BaseUrl, -1)
|
||||
content = strings.Replace(content, " href=\"/", " href=\""+s.c.BaseUrl, -1)
|
||||
content = strings.Replace(content, " src=\"/", " src=\""+s.c.BaseUrl+"/", -1)
|
||||
content = strings.Replace(content, " src='/", " src='"+s.c.BaseUrl+"/", -1)
|
||||
content = strings.Replace(content, " href='/", " href='"+s.c.BaseUrl+"/", -1)
|
||||
content = strings.Replace(content, " href=\"/", " href=\""+s.c.BaseUrl+"/", -1)
|
||||
s.Pages[i].Content = template.HTML(content)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue