Skip to content

Commit

Permalink
DOP-1945: Generate sitemaps (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophstad committed Jan 29, 2021
1 parent 63e0b22 commit eecd4a8
Show file tree
Hide file tree
Showing 5 changed files with 27,598 additions and 300 deletions.
1 change: 1 addition & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = {
'gatsby-plugin-react-helmet',
'gatsby-plugin-emotion',
'gatsby-plugin-layout',
'gatsby-plugin-sitemap',
{
resolve: 'gatsby-plugin-google-tagmanager',
options: {
Expand Down
3 changes: 2 additions & 1 deletion gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { getNestedValue } = require('./src/utils/get-nested-value');
const { getGuideMetadata } = require('./src/utils/get-guide-metadata');
const { getPageSlug } = require('./src/utils/get-page-slug');
const { siteMetadata } = require('./src/utils/site-metadata');
const { assertTrailingSlash } = require('./src/utils/assert-trailing-slash');
const { DOCUMENTS_COLLECTION, METADATA_COLLECTION } = require('./src/build-constants');

const DB = siteMetadata.database;
Expand Down Expand Up @@ -102,7 +103,7 @@ exports.createPages = async ({ actions }) => {
const slug = getPageSlug(page);
if (RESOLVED_REF_DOC_MAPPING[page] && Object.keys(RESOLVED_REF_DOC_MAPPING[page]).length > 0) {
createPage({
path: slug,
path: assertTrailingSlash(slug),
component: path.resolve(__dirname, './src/components/DocumentBody.js'),
context: {
metadata,
Expand Down

0 comments on commit eecd4a8

Please sign in to comment.