mirror of https://github.com/jlelse/GoBlog
Fix photos
This commit is contained in:
parent
6f79024b31
commit
c6d25c0385
7
http.go
7
http.go
|
@ -233,9 +233,10 @@ func buildHandler() (http.Handler, error) {
|
||||||
|
|
||||||
// Photos
|
// Photos
|
||||||
if blogConfig.Photos.Enabled {
|
if blogConfig.Photos.Enabled {
|
||||||
handler := servePhotos(blog)
|
photoPath := blogPath + blogConfig.Photos.Path
|
||||||
r.With(cacheMiddleware, minifier.Middleware).Get(blogPath+blogConfig.Photos.Path, handler)
|
handler := servePhotos(blog, photoPath)
|
||||||
r.With(cacheMiddleware, minifier.Middleware).Get(blogPath+blogConfig.Photos.Path+paginationPath, handler)
|
r.With(cacheMiddleware, minifier.Middleware).Get(photoPath, handler)
|
||||||
|
r.With(cacheMiddleware, minifier.Middleware).Get(photoPath+paginationPath, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Blog
|
// Blog
|
||||||
|
|
4
posts.go
4
posts.go
|
@ -146,10 +146,10 @@ func serveTaxonomyValue(blog string, path string, tax *taxonomy, value string) f
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func servePhotos(blog string) func(w http.ResponseWriter, r *http.Request) {
|
func servePhotos(blog string, path string) func(w http.ResponseWriter, r *http.Request) {
|
||||||
return serveIndex(&indexConfig{
|
return serveIndex(&indexConfig{
|
||||||
blog: blog,
|
blog: blog,
|
||||||
path: appConfig.Blogs[blog].Photos.Path,
|
path: path,
|
||||||
parameter: appConfig.Blogs[blog].Photos.Parameter,
|
parameter: appConfig.Blogs[blog].Photos.Parameter,
|
||||||
template: templatePhotos,
|
template: templatePhotos,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue