mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
fix(config): stop relying on global public config
This commit is contained in:
parent
d6057857fb
commit
f378862b23
9 changed files with 21 additions and 13 deletions
|
|
@ -2,6 +2,7 @@ import TOML from '@iarna/toml'
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
|
|
||||||
import pkg from '~/package.json'
|
import pkg from '~/package.json'
|
||||||
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
import { getSiteUrl } from '~/helpers/url.js'
|
import { getSiteUrl } from '~/helpers/url.js'
|
||||||
import { getRouteType } from '~/helpers/app-derived.js'
|
import { getRouteType } from '~/helpers/app-derived.js'
|
||||||
|
|
||||||
|
|
@ -155,7 +156,7 @@ export function makeTitle ( listing ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function makeDescription ( 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' ) {
|
function makeTag ( tag, tagName = 'meta' ) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
// import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
|
// import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
|
||||||
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
import {
|
import {
|
||||||
catchRedirectResponse,
|
catchRedirectResponse,
|
||||||
applyResponseDefaults
|
applyResponseDefaults
|
||||||
|
|
@ -31,7 +32,7 @@ Astro.response.statusText = 'Not found'
|
||||||
<Layout
|
<Layout
|
||||||
headOptions={ {
|
headOptions={ {
|
||||||
title: `Page is not compatible with Apple Silicon - Does It ARM`,
|
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,
|
// meta,
|
||||||
// link,
|
// link,
|
||||||
// structuredData: this.structuredData,
|
// structuredData: this.structuredData,
|
||||||
|
|
@ -75,4 +76,3 @@ Astro.response.statusText = 'Not found'
|
||||||
-->
|
-->
|
||||||
|
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
---
|
---
|
||||||
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
import {
|
import {
|
||||||
applyResponseDefaults
|
applyResponseDefaults
|
||||||
} from '~/helpers/astro/request.js'
|
} from '~/helpers/astro/request.js'
|
||||||
|
|
@ -22,7 +23,7 @@ applyResponseDefaults( Astro )
|
||||||
<Layout
|
<Layout
|
||||||
headOptions={ {
|
headOptions={ {
|
||||||
title: `Apple Silicon Compatibility Test Online - Does It ARM`,
|
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,
|
// meta,
|
||||||
// link,
|
// link,
|
||||||
// structuredData: this.structuredData,
|
// structuredData: this.structuredData,
|
||||||
|
|
@ -33,7 +34,7 @@ applyResponseDefaults( Astro )
|
||||||
>
|
>
|
||||||
|
|
||||||
<AppTestPage
|
<AppTestPage
|
||||||
config={ global.$config }
|
config={ publicRuntimeConfig }
|
||||||
client:load
|
client:load
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
// https://docs.astro.build/core-concepts/astro-components/
|
// https://docs.astro.build/core-concepts/astro-components/
|
||||||
|
|
||||||
import { DoesItAPI } from '~/helpers/api/client.js'
|
import { DoesItAPI } from '~/helpers/api/client.js'
|
||||||
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
import {
|
import {
|
||||||
applyResponseDefaults
|
applyResponseDefaults
|
||||||
} from '~/helpers/astro/request.js'
|
} from '~/helpers/astro/request.js'
|
||||||
|
|
@ -117,8 +118,8 @@ for (const video of allVideos) {
|
||||||
---
|
---
|
||||||
<Layout
|
<Layout
|
||||||
headOptions={ {
|
headOptions={ {
|
||||||
title: `Benchmarks for ${ global.$config.processorsVerbiage } Processors and Apple Silicon - Does It ARM`,
|
title: `Benchmarks for ${ publicRuntimeConfig.processorsVerbiage } Processors and Apple Silicon - Does It ARM`,
|
||||||
description: `Apple Silicon benchmark, performance, and compatibility videos for Macs using the ${ global.$config.processorsVerbiage } processors.`,
|
description: `Apple Silicon benchmark, performance, and compatibility videos for Macs using the ${ publicRuntimeConfig.processorsVerbiage } processors.`,
|
||||||
// meta,
|
// meta,
|
||||||
// link,
|
// link,
|
||||||
// structuredData: this.structuredData,
|
// structuredData: this.structuredData,
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
// https://docs.astro.build/core-concepts/astro-components/
|
// https://docs.astro.build/core-concepts/astro-components/
|
||||||
|
|
||||||
import { DoesItAPI } from '~/helpers/api/client.js'
|
import { DoesItAPI } from '~/helpers/api/client.js'
|
||||||
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
import {
|
import {
|
||||||
applyResponseDefaults
|
applyResponseDefaults
|
||||||
} from '~/helpers/astro/request.js'
|
} from '~/helpers/astro/request.js'
|
||||||
|
|
@ -34,7 +35,7 @@ const kinds = Object.values( kindIndex ).map( category => {
|
||||||
<Layout
|
<Layout
|
||||||
headOptions={ {
|
headOptions={ {
|
||||||
title: 'Categories of App Support lists for Apple Silicon',
|
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,
|
// meta,
|
||||||
// link,
|
// link,
|
||||||
// structuredData: this.structuredData,
|
// structuredData: this.structuredData,
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
// https://docs.astro.build/core-concepts/astro-components/
|
// https://docs.astro.build/core-concepts/astro-components/
|
||||||
|
|
||||||
import { DoesItAPI } from '~/helpers/api/client.js'
|
import { DoesItAPI } from '~/helpers/api/client.js'
|
||||||
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
import {
|
import {
|
||||||
applyResponseDefaults
|
applyResponseDefaults
|
||||||
} from '~/helpers/astro/request.js'
|
} from '~/helpers/astro/request.js'
|
||||||
|
|
@ -31,7 +32,7 @@ const kinds = deviceIndex.items.map( device => {
|
||||||
<Layout
|
<Layout
|
||||||
headOptions={ {
|
headOptions={ {
|
||||||
title: 'List of Apple Devices for Apple Silicon App Support',
|
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,
|
// meta,
|
||||||
// link,
|
// link,
|
||||||
// structuredData: this.structuredData,
|
// structuredData: this.structuredData,
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
|
|
||||||
import { DoesItAPI } from '~/helpers/api/client.js'
|
import { DoesItAPI } from '~/helpers/api/client.js'
|
||||||
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
|
import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
|
||||||
import {
|
import {
|
||||||
catchRedirectResponse,
|
catchRedirectResponse,
|
||||||
|
|
@ -65,7 +66,7 @@ const pageLabel = category?.pluralLabel || category.label
|
||||||
<Layout
|
<Layout
|
||||||
headOptions={{
|
headOptions={{
|
||||||
title: `List of ${ pageLabel } that work on Apple Silicon?`,
|
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,
|
// meta,
|
||||||
// link,
|
// link,
|
||||||
// structuredData: this.structuredData,
|
// structuredData: this.structuredData,
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
// https://docs.astro.build/core-concepts/astro-components/
|
// https://docs.astro.build/core-concepts/astro-components/
|
||||||
|
|
||||||
import { DoesItAPI } from '~/helpers/api/client.js'
|
import { DoesItAPI } from '~/helpers/api/client.js'
|
||||||
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
import {
|
import {
|
||||||
applyResponseDefaults
|
applyResponseDefaults
|
||||||
} from '~/helpers/astro/request.js'
|
} from '~/helpers/astro/request.js'
|
||||||
|
|
@ -29,8 +30,8 @@ const allAppsSummary = await DoesItAPI('all-apps-summary').get()
|
||||||
---
|
---
|
||||||
<Layout
|
<Layout
|
||||||
headOptions={ {
|
headOptions={ {
|
||||||
title: `Apple Silicon and ${ global.$config.processorsVerbiage } app and game compatibility list`,
|
title: `Apple Silicon and ${ publicRuntimeConfig.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`,
|
description: `List of compatibility apps and games for Apple Silicon and the ${ publicRuntimeConfig.processorsVerbiage } Processors including performance reports and benchmarks`,
|
||||||
// meta,
|
// meta,
|
||||||
// link,
|
// link,
|
||||||
// structuredData: this.structuredData,
|
// structuredData: this.structuredData,
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
|
|
||||||
import { DoesItAPI } from '~/helpers/api/client.js'
|
import { DoesItAPI } from '~/helpers/api/client.js'
|
||||||
|
import { publicRuntimeConfig } from '~/helpers/public-runtime-config.mjs'
|
||||||
import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
|
import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
|
||||||
import {
|
import {
|
||||||
catchRedirectResponse,
|
catchRedirectResponse,
|
||||||
|
|
@ -90,7 +91,7 @@ const adName = (() => {
|
||||||
<Layout
|
<Layout
|
||||||
headOptions={{
|
headOptions={{
|
||||||
title: `List of ${ pageLabel } that work on Apple Silicon?`,
|
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,
|
// meta,
|
||||||
// link,
|
// link,
|
||||||
// structuredData: this.structuredData,
|
// structuredData: this.structuredData,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue