Add content config to renderer handler

This commit is contained in:
2021-12-03 04:03:51 +01:00
parent d017015662
commit ea58971e86
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -62,6 +62,7 @@ func main() {
rendererHandler := &renderer.Renderer{
GhostClient: ghostClient,
ContentConfig: config.Content,
Base: config.Base,
}
+3
View File
@@ -6,6 +6,7 @@ import (
routing "github.com/jackwhelpton/fasthttp-routing/v2"
"github.com/valyala/fasthttp"
"code.tokarch.uk/mainnika/nikita-tokarch-uk/frontend/config"
"code.tokarch.uk/mainnika/nikita-tokarch-uk/frontend/ghost"
"code.tokarch.uk/mainnika/nikita-tokarch-uk/frontend/templates"
)
@@ -13,6 +14,8 @@ import (
// Renderer is the main handler that contains all routes handlers
type Renderer struct {
GhostClient ghost.Client
ContentConfig config.Content
Base string
router *routing.Router