diff --git a/content/blog/angular-templates-start-to-source/index.md b/content/blog/angular-templates-start-to-source/index.md index 9baea0c6..12c91185 100644 --- a/content/blog/angular-templates-start-to-source/index.md +++ b/content/blog/angular-templates-start-to-source/index.md @@ -5,7 +5,8 @@ published: '2019-07-11T22:12:03.284Z', author: 'crutchcorn', tags: ['angular', 'templates'], - attached: [] + attached: [], + license: 'cc-by-nc-sa-4' } --- diff --git a/content/blog/uttering-hello-introduction-post/index.md b/content/blog/uttering-hello-introduction-post/index.md index 54b2f736..b13aa26e 100755 --- a/content/blog/uttering-hello-introduction-post/index.md +++ b/content/blog/uttering-hello-introduction-post/index.md @@ -5,7 +5,8 @@ published: '2019-06-29T22:12:03.284Z', author: 'crutchcorn', tags: ['community', 'announcements'], - attached: [] + attached: [], + license: 'cc-by-4' } --- diff --git a/gatsby-config.js b/gatsby-config.js index 07f90965..c62539c8 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -240,6 +240,7 @@ module.exports = { ], mapping: { "MarkdownRemark.frontmatter.author": `UnicornsJson`, + "MarkdownRemark.frontmatter.license": `LicensesJson`, "UnicornsJson.pronouns": `PronounsJson`, "UnicornsJson.roles": `RolesJson`, }, diff --git a/src/components/layout/layout.js b/src/components/layout/layout.js index 57697364..81052def 100644 --- a/src/components/layout/layout.js +++ b/src/components/layout/layout.js @@ -81,6 +81,13 @@ export const postFragmentQuery = graphql` author { ...UnicornInfo } + license { + licenceType + footerImg + explainLink + name + displayName + } } fields { slug diff --git a/src/data/licenses.json b/src/data/licenses.json new file mode 100644 index 00000000..ee4e940f --- /dev/null +++ b/src/data/licenses.json @@ -0,0 +1,18 @@ +[ + { + "id": "cc-by-nc-sa-4", + "footerImg": "https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png", + "licenceType": "Creative Commons License", + "explainLink": "http://creativecommons.org/licenses/by-nc-sa/4.0/", + "name": "Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)", + "displayName": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License" + }, + { + "id": "cc-by-4", + "footerImg": "https://i.creativecommons.org/l/by/4.0/88x31.png", + "licenceType": "Creative Commons License", + "explainLink": "http://creativecommons.org/licenses/by/4.0/", + "name": "Attribution 4.0 International (CC BY 4.0)", + "displayName": "Creative Commons Attribution 4.0 International License" + } +] diff --git a/src/templates/blog-post.js b/src/templates/blog-post.js index 132ef73f..3ed2e171 100644 --- a/src/templates/blog-post.js +++ b/src/templates/blog-post.js @@ -43,6 +43,18 @@ const BlogPostTemplate = (props) => { dangerouslySetInnerHTML={{ __html: post.html }} />