mirror of
https://github.com/jlelse/GoBlog
synced 2024-06-16 13:05:00 +00:00
14 lines
220 B
Go
14 lines
220 B
Go
|
package main
|
||
|
|
||
|
import "strings"
|
||
|
|
||
|
func (blog *configBlog) getRelativePath(path string) string {
|
||
|
if !strings.HasPrefix(path, "/") {
|
||
|
path = "/" + path
|
||
|
}
|
||
|
if blog.Path != "/" {
|
||
|
return blog.Path + path
|
||
|
}
|
||
|
return path
|
||
|
}
|