@@ -7,20 +7,20 @@ import PageLayout from '@layouts/PageLayout.astro'
77import Carousel from ' @components/Carousel/index.astro'
88import Icon from ' @components/Icon/index.astro'
99
10- const allDeepDives = await getCollection (' deepDives ' , ({ data }) => isDev () || data .isDraft !== true )
10+ const allArticles = await getCollection (' articles ' , ({ data }) => isDev () || data .isDraft !== true )
1111
1212const allTags = await getCollection (' tags' )
1313const featuredTags = allTags .filter (tag => tag .data .featured === true )
1414
15- const getDeepDivesForTag = (tagEntry : CollectionEntry <' tags' >) => {
16- return allDeepDives .filter (article => {
15+ const getArticlesForTag = (tagEntry : CollectionEntry <' tags' >) => {
16+ return allArticles .filter (article => {
1717 return (article .data .tags as Array <{ id: string }>).some (tagRef => tagRef .id === tagEntry .id )
1818 })
1919}
2020
21- const tagsWithContent = featuredTags .filter (tag => getDeepDivesForTag (tag ).length > 0 )
21+ const tagsWithContent = featuredTags .filter (tag => getArticlesForTag (tag ).length > 0 )
2222
23- const tagsWithNoContent = allTags .filter (tag => getDeepDivesForTag (tag ).length === 0 )
23+ const tagsWithNoContent = allTags .filter (tag => getArticlesForTag (tag ).length === 0 )
2424
2525for (const tag of tagsWithNoContent ) {
2626 console .warn (
@@ -29,7 +29,7 @@ for (const tag of tagsWithNoContent) {
2929}
3030
3131const pageTitle = ' Technical Index'
32- const pageDescription = ' Browse technical deep dives structured by specific topics'
32+ const pageDescription = ' Browse technical articles structured by specific topics'
3333const path = ' /articles'
3434---
3535
@@ -46,8 +46,8 @@ const path = '/articles'
4646 .sort ((a , b ) => a .data .displayName .localeCompare (b .data .displayName , ' en' ))
4747 .map (tag => {
4848 const displayName = tag .data .displayName
49- const deepDivesForTag = getDeepDivesForTag (tag )
50- const latestDate = deepDivesForTag
49+ const articlesForTag = getArticlesForTag (tag )
50+ const latestDate = articlesForTag
5151 .map (a => a .data .publishDate )
5252 .sort ((a , b ) => b .getTime () - a .getTime ())[0 ]
5353 const latestFormatted = latestDate
@@ -76,7 +76,7 @@ const path = '/articles'
7676 { displayName }
7777 </h2 >
7878 <span class = " shrink-0 rounded-full bg-page-inverse px-2 py-0.5 sm:ml-1 text-xs font-medium text-page-base whitespace-nowrap transition-colors group-hover:bg-page-active group-hover:text-page-base" >
79- { deepDivesForTag .length } deep dives
79+ { articlesForTag .length } articles
8080 </span >
8181 </div >
8282 </div >
@@ -96,9 +96,9 @@ const path = '/articles'
9696
9797 <Carousel
9898 variant = " suggested"
99- limit = { deepDivesForTag .length }
100- type = " deep-dive "
101- items = { deepDivesForTag }
99+ limit = { articlesForTag .length }
100+ type = " articles "
101+ items = { articlesForTag }
102102 showEmblaDots = { false }
103103 showReadMore = { false }
104104 />
0 commit comments