diff --git a/pages-eleventy/app.11ty.js b/pages-eleventy/app.11ty.js index 7f61b3e..5e4c818 100644 --- a/pages-eleventy/app.11ty.js +++ b/pages-eleventy/app.11ty.js @@ -22,6 +22,25 @@ export const makeDescription = function ( app ) { return `Latest reported support status of ${ app.name } on Apple Silicon and Apple M1 Processors.` } +export function renderPageLinksHtml ( links ) { + return links.map( (link, i) => { + + const notAppTestLink = !link.label.includes('🧪') + + const isMainLink = (i === 0) && notAppTestLink + + return /* html */` + ${ isMainLink ? 'View' : link.label } + ` + } ).join('') +} + export class AppTemplate { // or `async data() {` // or `get data() {` @@ -71,17 +90,7 @@ export class AppTemplate { const lastUpdatedFriendly = makeLastUpdatedFriendly( app.lastUpdated ) - const relatedLinksHtml = app.relatedLinks.map( (link, i) => { - return /* html */` - ${ (i === 0) ? 'View' : link.label } - ` - } ).join('') + const relatedLinksHtml = renderPageLinksHtml( app.relatedLinks ) return /* html */`