File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,6 +117,9 @@ export default defineConfig({
117117 { protocol : 'http' } ,
118118 ] ,
119119 } ,
120+ redirects : {
121+ '/tags' : '/articles' ,
122+ } ,
120123 /** Change URL between development and production environments */
121124 site : getSiteUrl ( ) ,
122125 trailingSlash : 'never' ,
Original file line number Diff line number Diff line change @@ -8,14 +8,15 @@ import Carousel from '@components/Carousel/index.astro'
88const allArticles = await getCollection (' articles' , ({ data }) => isDev () || data .isDraft !== true )
99
1010const allTags = await getCollection (' tags' )
11+ const featuredTags = allTags .filter (tag => tag .data .featured === true )
1112
1213const getArticlesForTag = (tagEntry : CollectionEntry <' tags' >) => {
1314 return allArticles .filter (article => {
1415 return article .data .tags .some (tagRef => tagRef .id === tagEntry .id )
1516 })
1617}
1718
18- const tagsWithContent = allTags .filter (tag => getArticlesForTag (tag ).length > 0 )
19+ const tagsWithContent = featuredTags .filter (tag => getArticlesForTag (tag ).length > 0 )
1920
2021const tagsWithNoContent = allTags .filter (tag => getArticlesForTag (tag ).length === 0 )
2122
@@ -25,8 +26,8 @@ for (const tag of tagsWithNoContent) {
2526 )
2627}
2728
28- const pageDescription = ' Browse all article tags '
29- const pageTitle = ' All Tags '
29+ const pageDescription = ' Browse all articles by tag '
30+ const pageTitle = ' All Articles '
3031const path = ' /tags'
3132const section = ' Tags'
3233---
You can’t perform that action at this time.
0 commit comments