1
mirror of https://github.com/jlelse/GoBlog synced 2024-06-26 18:07:34 +00:00
GoBlog/blogs.go

18 lines
328 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
}
func getBlogRelativePath(blog, path string) string {
return appConfig.Blogs[blog].getRelativePath(path)
}