fix(config): stop relying on global public config

This commit is contained in:
ThatGuySam 2026-03-15 12:20:19 -05:00
parent d6057857fb
commit f378862b23
9 changed files with 21 additions and 13 deletions

View file

@ -2,6 +2,7 @@ import TOML from '@iarna/toml'
import fs from 'fs-extra'
import pkg from '~/package.json'
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
import { getSiteUrl } from '~/helpers/url.js'
import { getRouteType } from '~/helpers/app-derived.js'
@ -155,7 +156,7 @@ export function makeTitle ( listing ) {
}
export function makeDescription ( listing ) {
return `Latest reported support status of ${ listing.name } on Apple Silicon and ${ this.$config.processorsVerbiage } Processors.`
return `Latest reported support status of ${ listing.name } on Apple Silicon and ${ publicRuntimeConfig.processorsVerbiage } Processors.`
}
function makeTag ( tag, tagName = 'meta' ) {

View file

@ -1,5 +1,6 @@
---
// import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
import {
catchRedirectResponse,
applyResponseDefaults
@ -31,7 +32,7 @@ Astro.response.statusText = 'Not found'
<Layout
headOptions={ {
title: `Page is not compatible with Apple Silicon - Does It ARM`,
description: `Check for Apple Silicon compatibility for any of your apps instantly before you buy an ${ global.$config.processorsVerbiage } Mac. `,
description: `Check for Apple Silicon compatibility for any of your apps instantly before you buy an ${ publicRuntimeConfig.processorsVerbiage } Mac. `,
// meta,
// link,
// structuredData: this.structuredData,
@ -75,4 +76,3 @@ Astro.response.statusText = 'Not found'
-->
</Layout>

View file

@ -1,4 +1,5 @@
---
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
import {
applyResponseDefaults
} from '~/helpers/astro/request.js'
@ -22,7 +23,7 @@ applyResponseDefaults( Astro )
<Layout
headOptions={ {
title: `Apple Silicon Compatibility Test Online - Does It ARM`,
description: `Check for Apple Silicon compatibility for any of your apps instantly before you buy an ${ global.$config.processorsVerbiage } Mac. `,
description: `Check for Apple Silicon compatibility for any of your apps instantly before you buy an ${ publicRuntimeConfig.processorsVerbiage } Mac. `,
// meta,
// link,
// structuredData: this.structuredData,
@ -33,7 +34,7 @@ applyResponseDefaults( Astro )
>
<AppTestPage
config={ global.$config }
config={ publicRuntimeConfig }
client:load
/>

View file

@ -8,6 +8,7 @@
// https://docs.astro.build/core-concepts/astro-components/
import { DoesItAPI } from '~/helpers/api/client.js'
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
import {
applyResponseDefaults
} from '~/helpers/astro/request.js'
@ -117,8 +118,8 @@ for (const video of allVideos) {
---
<Layout
headOptions={ {
title: `Benchmarks for ${ global.$config.processorsVerbiage } Processors and Apple Silicon - Does It ARM`,
description: `Apple Silicon benchmark, performance, and compatibility videos for Macs using the ${ global.$config.processorsVerbiage } processors.`,
title: `Benchmarks for ${ publicRuntimeConfig.processorsVerbiage } Processors and Apple Silicon - Does It ARM`,
description: `Apple Silicon benchmark, performance, and compatibility videos for Macs using the ${ publicRuntimeConfig.processorsVerbiage } processors.`,
// meta,
// link,
// structuredData: this.structuredData,

View file

@ -8,6 +8,7 @@
// https://docs.astro.build/core-concepts/astro-components/
import { DoesItAPI } from '~/helpers/api/client.js'
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
import {
applyResponseDefaults
} from '~/helpers/astro/request.js'
@ -34,7 +35,7 @@ const kinds = Object.values( kindIndex ).map( category => {
<Layout
headOptions={ {
title: 'Categories of App Support lists for Apple Silicon',
description: `List of compatibility apps and games for Apple Silicon and the ${ global.$config.processorsVerbiage } Processors including performance reports and benchmarks`,
description: `List of compatibility apps and games for Apple Silicon and the ${ publicRuntimeConfig.processorsVerbiage } Processors including performance reports and benchmarks`,
// meta,
// link,
// structuredData: this.structuredData,

View file

@ -8,6 +8,7 @@
// https://docs.astro.build/core-concepts/astro-components/
import { DoesItAPI } from '~/helpers/api/client.js'
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
import {
applyResponseDefaults
} from '~/helpers/astro/request.js'
@ -31,7 +32,7 @@ const kinds = deviceIndex.items.map( device => {
<Layout
headOptions={ {
title: 'List of Apple Devices for Apple Silicon App Support',
description: `List of devices for Apple Silicon and the ${ global.$config.processorsVerbiage } Processors`,
description: `List of devices for Apple Silicon and the ${ publicRuntimeConfig.processorsVerbiage } Processors`,
// meta,
// link,
// structuredData: this.structuredData,

View file

@ -4,6 +4,7 @@
import { DoesItAPI } from '~/helpers/api/client.js'
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
import {
catchRedirectResponse,
@ -65,7 +66,7 @@ const pageLabel = category?.pluralLabel || category.label
<Layout
headOptions={{
title: `List of ${ pageLabel } that work on Apple Silicon?`,
description: `Check the latest reported support status of ${ pageLabel } on Apple Silicon and ${ global.$config.processorsVerbiage } Processors. `,
description: `Check the latest reported support status of ${ pageLabel } on Apple Silicon and ${ publicRuntimeConfig.processorsVerbiage } Processors. `,
// meta,
// link,
// structuredData: this.structuredData,

View file

@ -8,6 +8,7 @@
// https://docs.astro.build/core-concepts/astro-components/
import { DoesItAPI } from '~/helpers/api/client.js'
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
import {
applyResponseDefaults
} from '~/helpers/astro/request.js'
@ -29,8 +30,8 @@ const allAppsSummary = await DoesItAPI('all-apps-summary').get()
---
<Layout
headOptions={ {
title: `Apple Silicon and ${ global.$config.processorsVerbiage } app and game compatibility list`,
description: `List of compatibility apps and games for Apple Silicon and the ${ global.$config.processorsVerbiage } Processors including performance reports and benchmarks`,
title: `Apple Silicon and ${ publicRuntimeConfig.processorsVerbiage } app and game compatibility list`,
description: `List of compatibility apps and games for Apple Silicon and the ${ publicRuntimeConfig.processorsVerbiage } Processors including performance reports and benchmarks`,
// meta,
// link,
// structuredData: this.structuredData,

View file

@ -4,6 +4,7 @@
import { DoesItAPI } from '~/helpers/api/client.js'
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
import {
catchRedirectResponse,
@ -90,7 +91,7 @@ const adName = (() => {
<Layout
headOptions={{
title: `List of ${ pageLabel } that work on Apple Silicon?`,
description: `Check the latest reported support status of ${ pageLabel } on Apple Silicon and ${ global.$config.processorsVerbiage } Processors. `,
description: `Check the latest reported support status of ${ pageLabel } on Apple Silicon and ${ publicRuntimeConfig.processorsVerbiage } Processors. `,
// meta,
// link,
// structuredData: this.structuredData,