From 51f24dcc9b02e344fd28e028c1858aa37f810218 Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Mon, 5 Aug 2019 10:57:14 -0700 Subject: [PATCH] Add meta description helper function. --- elm-package/src/Pages/Head.elm | 6 +++++- examples/docs/src/Main.elm | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/elm-package/src/Pages/Head.elm b/elm-package/src/Pages/Head.elm index 9807f030..d6bd9bf6 100644 --- a/elm-package/src/Pages/Head.elm +++ b/elm-package/src/Pages/Head.elm @@ -1,4 +1,4 @@ -module Pages.Head exposing (Tag, canonicalLink, metaName, metaProperty, toJson) +module Pages.Head exposing (Tag, canonicalLink, description, metaName, metaProperty, toJson) import Json.Encode @@ -42,6 +42,10 @@ metaProperty property content = ] +description descriptionValue = + metaName "description" descriptionValue + + {-| Example: metaName diff --git a/examples/docs/src/Main.elm b/examples/docs/src/Main.elm index e825d843..41cdedf5 100644 --- a/examples/docs/src/Main.elm +++ b/examples/docs/src/Main.elm @@ -193,7 +193,7 @@ pageTags canonicalUrl metadata = image = "" in - [ Head.metaName "description" description + [ Head.description description , Head.metaName "image" image ] ++ SocialMeta.summaryLarge