module IHP.PageHead.ControllerFunctions
( setTitle
, setDescription
, setOGTitle
, setOGType
, setOGDescription
, setOGUrl
, setOGImage
) where
import IHP.Prelude
import IHP.PageHead.Types
import IHP.Controller.Context
setTitle :: (?context :: ControllerContext) => Text -> IO ()
setTitle :: (?context::ControllerContext) => Text -> IO ()
setTitle Text
title = PageTitle -> IO ()
forall value.
(?context::ControllerContext, Typeable value) =>
value -> IO ()
putContext (Text -> PageTitle
PageTitle Text
title)
setDescription :: (?context :: ControllerContext) => Text -> IO ()
setDescription :: (?context::ControllerContext) => Text -> IO ()
setDescription Text
description = PageDescription -> IO ()
forall value.
(?context::ControllerContext, Typeable value) =>
value -> IO ()
putContext (Text -> PageDescription
PageDescription Text
description)
setOGTitle :: (?context :: ControllerContext) => Text -> IO ()
setOGTitle :: (?context::ControllerContext) => Text -> IO ()
setOGTitle Text
title = OGTitle -> IO ()
forall value.
(?context::ControllerContext, Typeable value) =>
value -> IO ()
putContext (Text -> OGTitle
OGTitle Text
title)
setOGType :: (?context :: ControllerContext) => Text -> IO ()
setOGType :: (?context::ControllerContext) => Text -> IO ()
setOGType Text
type_ = OGType -> IO ()
forall value.
(?context::ControllerContext, Typeable value) =>
value -> IO ()
putContext (Text -> OGType
OGType Text
type_)
setOGDescription :: (?context :: ControllerContext) => Text -> IO ()
setOGDescription :: (?context::ControllerContext) => Text -> IO ()
setOGDescription Text
description = OGDescription -> IO ()
forall value.
(?context::ControllerContext, Typeable value) =>
value -> IO ()
putContext (Text -> OGDescription
OGDescription Text
description)
setOGUrl :: (?context :: ControllerContext) => Text -> IO ()
setOGUrl :: (?context::ControllerContext) => Text -> IO ()
setOGUrl Text
url = OGUrl -> IO ()
forall value.
(?context::ControllerContext, Typeable value) =>
value -> IO ()
putContext (Text -> OGUrl
OGUrl Text
url)
setOGImage :: (?context :: ControllerContext) => Text -> IO ()
setOGImage :: (?context::ControllerContext) => Text -> IO ()
setOGImage Text
image = OGImage -> IO ()
forall value.
(?context::ControllerContext, Typeable value) =>
value -> IO ()
putContext (Text -> OGImage
OGImage Text
image)