diff --git a/pages/_data/eleventyComputed.js b/pages/_data/eleventyComputed.js index ff3787282..b39523ad1 100644 --- a/pages/_data/eleventyComputed.js +++ b/pages/_data/eleventyComputed.js @@ -182,17 +182,15 @@ module.exports = async () => { if (!perfAudits) { perfAudits = await fetch(perfApiUrl).then((res) => res.json()); } - return { title: (article) => article?.data?.title || article.title, id: (article) => article?.data?.id, date: (article) => article?.data?.date || article.date, - publishdate: (article) => - article?.data?.date.split("T")[0] || article.publishdate, + publishdate: (article) => article?.data?.date.split("T")[0] || article.publishdate, meta: (article) => article?.data?.excerpt || article.meta, description: (article) => article?.data?.excerpt || article.meta, author: (article) => article?.data?.author || article.author, - tags: (article) => (isPost(article) ? ["news"] : article.tags), + tags: (article) => article?.data?.tags || (isPost(article) ? ["news"] : article.tags), permalink: (article) => getPermalink(article), layout: (article) => getLayout(article), eleventyNavigation: (article) => getNavigation(article), diff --git a/pages/manual-content/sitemap.njk b/pages/manual-content/sitemap.njk index 505429117..4270a9b44 100644 --- a/pages/manual-content/sitemap.njk +++ b/pages/manual-content/sitemap.njk @@ -5,12 +5,12 @@ eleventyExcludeFromCollections: true {% for page in collections.all %} - {% if not sitemap.urls[page.url | url ].exclude %} - - https://innovation.ca.gov{{ page.url | url }} - {{ page.date.toISOString() }} - daily - - {% endif %} + {% if (page.data.tags and not page.data.tags.includes('do-not-crawl')) and not sitemap.urls[page.url | url ].exclude %} + + https://innovation.ca.gov{{ page.url | url }} + {{ page.date.toISOString() }} + daily + + {% endif %} {% endfor %} \ No newline at end of file