Replace SITE_CONFIG, UI_CONFIG, METADATA_CONFIG... to SITE, UI, METADATA...
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
---
|
||||
import { GoogleAnalytics } from '@astrolib/analytics';
|
||||
import { ANALYTICS_CONFIG } from '~/utils/config';
|
||||
import { ANALYTICS } from '~/utils/config';
|
||||
---
|
||||
|
||||
{
|
||||
ANALYTICS_CONFIG?.vendors?.googleAnalytics?.id ? (
|
||||
<GoogleAnalytics id={String(ANALYTICS_CONFIG.vendors.googleAnalytics.id)} partytown={ANALYTICS_CONFIG?.vendors?.googleAnalytics?.partytown} />
|
||||
ANALYTICS?.vendors?.googleAnalytics?.id ? (
|
||||
<GoogleAnalytics id={String(ANALYTICS.vendors.googleAnalytics.id)} partytown={ANALYTICS?.vendors?.googleAnalytics?.partytown} />
|
||||
) : null
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
---
|
||||
import { UI_CONFIG } from "~/utils/config";
|
||||
import { UI } from "~/utils/config";
|
||||
|
||||
// TODO: This code is temporary
|
||||
---
|
||||
|
||||
<script is:inline define:vars={{ defaultTheme: UI_CONFIG.theme || "system" }}>
|
||||
<script is:inline define:vars={{ defaultTheme: UI.theme || "system" }}>
|
||||
function applyTheme(theme) {
|
||||
if (theme === "dark") {
|
||||
document.documentElement.classList.add("dark");
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
import { UI_CONFIG } from '~/utils/config';
|
||||
import { UI } from '~/utils/config';
|
||||
---
|
||||
|
||||
<script is:inline define:vars={{ defaultTheme: UI_CONFIG.theme }}>
|
||||
<script is:inline define:vars={{ defaultTheme: UI.theme }}>
|
||||
function applyTheme(theme) {
|
||||
if (theme === 'dark') {
|
||||
document.documentElement.classList.add('dark');
|
||||
|
@ -4,8 +4,8 @@ import { AstroSeo } from '@astrolib/seo';
|
||||
|
||||
import type { AstroSeoProps } from '@astrolib/seo/src/types';
|
||||
|
||||
import { SITE_CONFIG, METADATA_CONFIG, I18N_CONFIG } from '~/utils/config';
|
||||
import { MetaData } from '~/types';
|
||||
import { SITE, METADATA, I18N } from '~/utils/config';
|
||||
import type { MetaData } from '~/types';
|
||||
import { getCanonical } from '~/utils/permalinks';
|
||||
|
||||
import { adaptOpenGraphImages } from '~/utils/images';
|
||||
@ -34,9 +34,9 @@ const seoProps: AstroSeoProps = merge(
|
||||
description: undefined,
|
||||
openGraph: {
|
||||
url: canonical,
|
||||
site_name: SITE_CONFIG?.name,
|
||||
site_name: SITE?.name,
|
||||
images: [],
|
||||
locale: I18N_CONFIG?.language || 'en',
|
||||
locale: I18N?.language || 'en',
|
||||
type: 'website',
|
||||
},
|
||||
twitter: {
|
||||
@ -44,13 +44,13 @@ const seoProps: AstroSeoProps = merge(
|
||||
},
|
||||
},
|
||||
{
|
||||
title: METADATA_CONFIG?.title?.default,
|
||||
titleTemplate: METADATA_CONFIG?.title?.template,
|
||||
noindex: typeof METADATA_CONFIG?.robots?.index !== 'undefined' ? !METADATA_CONFIG.robots.index : undefined,
|
||||
nofollow: typeof METADATA_CONFIG?.robots?.follow !== 'undefined' ? !METADATA_CONFIG.robots.follow : undefined,
|
||||
description: METADATA_CONFIG?.description,
|
||||
openGraph: METADATA_CONFIG?.openGraph,
|
||||
twitter: METADATA_CONFIG?.twitter,
|
||||
title: METADATA?.title?.default,
|
||||
titleTemplate: METADATA?.title?.template,
|
||||
noindex: typeof METADATA?.robots?.index !== 'undefined' ? !METADATA.robots.index : undefined,
|
||||
nofollow: typeof METADATA?.robots?.follow !== 'undefined' ? !METADATA.robots.follow : undefined,
|
||||
description: METADATA?.description,
|
||||
openGraph: METADATA?.openGraph,
|
||||
twitter: METADATA?.twitter,
|
||||
},
|
||||
{
|
||||
title: title,
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
import { SITE_CONFIG } from "~/utils/config";
|
||||
import { SITE } from "~/utils/config";
|
||||
---
|
||||
|
||||
{SITE_CONFIG.googleSiteVerificationId && <meta name="google-site-verification" content={SITE_CONFIG.googleSiteVerificationId} />}
|
||||
{SITE.googleSiteVerificationId && <meta name="google-site-verification" content={SITE.googleSiteVerificationId} />}
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
import { Icon } from 'astro-icon/components';
|
||||
|
||||
import { UI_CONFIG } from '~/utils/config';
|
||||
import { UI } from '~/utils/config';
|
||||
|
||||
export interface Props {
|
||||
label?: string;
|
||||
@ -20,7 +20,7 @@ const {
|
||||
---
|
||||
|
||||
{
|
||||
!(UI_CONFIG.theme && UI_CONFIG.theme.endsWith(':only')) && (
|
||||
!(UI.theme && UI.theme.endsWith(':only')) && (
|
||||
<button type="button" class={className} aria-label={label} data-aw-toggle-color-scheme>
|
||||
<Icon name={iconName} class={iconClass} />
|
||||
</button>
|
||||
|
Reference in New Issue
Block a user