From fe9c81d10d28238a64508a64539d176bcbed49dd Mon Sep 17 00:00:00 2001 From: Ibraheem Ahmed Date: Fri, 11 Sep 2020 18:34:03 -0400 Subject: [PATCH] Add social image widget to Netlify CMS config The gatsby lumen starter currently supports a `socialImage` field in markdown content that will set the `twitter:image` and `og:image` meta tags in the layout component. This PR adds an "Social Image" widget that allows users to set the socialImage field through the netlifycms admin page. --- static/admin/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/admin/config.yml b/static/admin/config.yml index 94d0fb9..f43ac88 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -20,6 +20,7 @@ collections: - {label: "Template", name: "template", widget: "hidden", default: "post"} - {label: "Title", name: "title", widget: "string"} - {label: "Slug", name: "slug", widget: "string"} + - {label: "Social Image", name: "socialImage", widget: "image"} - {label: "Draft", name: "draft", widget: "boolean", default: true} - {label: "Publish Date", name: "date", widget: "datetime"} - {label: "Description", name: "description", widget: "text"} @@ -36,5 +37,6 @@ collections: - {label: "Template", name: "template", widget: "hidden", default: "page"} - {label: "Title", name: "title", widget: "string"} - {label: "Slug", name: "slug", widget: "string"} + - {label: "Social Image", name: "socialImage", widget: "image"} - {label: "Draft", name: "draft", widget: "boolean", default: true} - - {label: "Body", name: "body", widget: "markdown"} \ No newline at end of file + - {label: "Body", name: "body", widget: "markdown"}