WIP, but this is going to become my new blog CMS
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
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)
|
|
}
|