mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 00:16:45 +00:00
fixing issue with some urls missing '/'
This commit is contained in:
1 parent
b7bbc28caf
commit
e08d14ad49
1 file changed
+4
-4
+4
-4
@@ -190,10 +190,10 @@ func (s *Site) ProcessShortcodes() {
|
|||||||
func (s *Site) AbsUrlify() {
|
func (s *Site) AbsUrlify() {
|
||||||
for i, _ := range s.Pages {
|
for i, _ := range s.Pages {
|
||||||
content := string(s.Pages[i].Content)
|
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, " 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, " href=\"/", " href=\""+s.c.BaseUrl, -1)
|
content = strings.Replace(content, " href=\"/", " href=\""+s.c.BaseUrl+"/", -1)
|
||||||
s.Pages[i].Content = template.HTML(content)
|
s.Pages[i].Content = template.HTML(content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user