diff --git a/gatsby-node.js b/gatsby-node.js index 0e11758..71150bd 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -19,7 +19,7 @@ exports.createPages = async ({ graphql, actions }) => { const result = await graphql(` query { - allMarkdownRemark { + postsRemark: allMarkdownRemark { edges { node { fields { @@ -28,10 +28,15 @@ exports.createPages = async ({ graphql, actions }) => { } } } + tagsGroup: allMarkdownRemark { + group(field: frontmatter___tags) { + fieldValue + } + } } `); - result.data.allMarkdownRemark.edges.forEach(({ node }) => { + result.data.postsRemark.edges.forEach(({ node }) => { createPage({ path: node.fields.slug, component: path.resolve(`./src/templates/post.js`), @@ -40,4 +45,14 @@ exports.createPages = async ({ graphql, actions }) => { } }); }); + + result.data.tagsGroup.group.forEach((tag) => { + createPage({ + path: `/tags/${tag.fieldValue}/`, + component: path.resolve(`./src/templates/tag.js`), + context: { + tag: tag.fieldValue + } + }); + }); }; \ No newline at end of file diff --git a/src/posts/2011/04/25/opening-all-sharepoint-2010-documents-in-a-new-window.md b/src/posts/2011/04/25/opening-all-sharepoint-2010-documents-in-a-new-window.md index d443961..4e3b784 100644 --- a/src/posts/2011/04/25/opening-all-sharepoint-2010-documents-in-a-new-window.md +++ b/src/posts/2011/04/25/opening-all-sharepoint-2010-documents-in-a-new-window.md @@ -10,7 +10,7 @@ We wanted an easy solution to open every document in a SharePoint from a documen I don’t know of any way to do this via a setting in SharePoint, but a little JavaScript employing jQuery does the job just perfectly. -```javascript %} +```javascript $(document).ready( function () { // has to be on an interval for grouped doc libraries diff --git a/src/posts/2012/08/09/rendering-must-have-placeholder-chrome-as-its-parent-got-rendering-instead.md b/src/posts/2012/08/09/rendering-must-have-placeholder-chrome-as-its-parent-got-rendering-instead.md index cb9a54a..836069e 100644 --- a/src/posts/2012/08/09/rendering-must-have-placeholder-chrome-as-its-parent-got-rendering-instead.md +++ b/src/posts/2012/08/09/rendering-must-have-placeholder-chrome-as-its-parent-got-rendering-instead.md @@ -9,7 +9,7 @@ tags: [sitecore] ## Problem I got the error message (in my Firebug console) in the Sitecore Page Editor on a page where I had a nested sublayout. I had a basic two-column layout for the main sublayout of the page. Then, in the right column, I had another sublayout that further divided up the right column as I needed. Here is what the nested sublayout looked like: -```html %} +```html