From ea58971e86b075451d596434bc0f6338d8badc64 Mon Sep 17 00:00:00 2001 From: Nikita Tokarchuk Date: Fri, 3 Dec 2021 04:03:51 +0100 Subject: [PATCH] Add content config to renderer handler --- frontend/main.go | 1 + frontend/renderer/renderer.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/frontend/main.go b/frontend/main.go index 872703c..3a4d408 100644 --- a/frontend/main.go +++ b/frontend/main.go @@ -62,6 +62,7 @@ func main() { rendererHandler := &renderer.Renderer{ GhostClient: ghostClient, + ContentConfig: config.Content, Base: config.Base, } diff --git a/frontend/renderer/renderer.go b/frontend/renderer/renderer.go index f9e3964..d21fce9 100644 --- a/frontend/renderer/renderer.go +++ b/frontend/renderer/renderer.go @@ -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