Replace SITE_CONFIG, UI_CONFIG, METADATA_CONFIG... to SITE, UI, METADATA...

This commit is contained in:
prototypa
2023-08-22 22:22:53 -04:00
parent 9d23150832
commit da8ef74b38
21 changed files with 83 additions and 83 deletions

View File

@@ -1,5 +1,5 @@
---
import { APP_BLOG_CONFIG } from '~/utils/config';
import { APP_BLOG } from '~/utils/config';
import type { Post } from '~/types';
import Image from '~/components/common/Image.astro';
@@ -39,7 +39,7 @@ const image = (await findImage(post.image));
</div>
<h3 class="mb-2 text-xl font-bold leading-tight sm:text-2xl font-heading">
{
!APP_BLOG_CONFIG?.post?.isEnabled ? (
!APP_BLOG?.post?.isEnabled ? (
post.title
) : (
<a

View File

@@ -4,7 +4,7 @@ import { Icon } from 'astro-icon/components';
import Image from '~/components/common/Image.astro';
import PostTags from '~/components/blog/Tags.astro';
import { APP_BLOG_CONFIG } from '~/utils/config';
import { APP_BLOG } from '~/utils/config';
import type { Post } from '~/types';
import { getPermalink } from '~/utils/permalinks';
@@ -18,7 +18,7 @@ export interface Props {
const { post } = Astro.props;
const image = (await findImage(post.image)) as ImageMetadata | undefined;
const link = APP_BLOG_CONFIG?.post?.isEnabled ? getPermalink(post.permalink, 'post') : '';
const link = APP_BLOG?.post?.isEnabled ? getPermalink(post.permalink, 'post') : '';
---
<article class={`max-w-md mx-auto md:max-w-none grid gap-6 md:gap-8 ${image ? 'md:grid-cols-2' : ''}`}>

View File

@@ -1,7 +1,7 @@
---
import { getPermalink } from '~/utils/permalinks';
import { APP_BLOG_CONFIG } from '~/utils/config';
import { APP_BLOG } from '~/utils/config';
import type { Post } from '~/types';
export interface Props {
@@ -23,7 +23,7 @@ const { tags, class: className = 'text-sm', title = undefined, isCategory = fals
<ul class={className}>
{tags.map((tag) => (
<li class="bg-gray-100 dark:bg-slate-700 inline-block mr-2 rtl:mr-0 rtl:ml-2 mb-2 py-0.5 px-2 lowercase font-medium">
{!APP_BLOG_CONFIG?.tag?.isEnabled ? (
{!APP_BLOG?.tag?.isEnabled ? (
tag
) : (
<a

View File

@@ -1,9 +1,9 @@
---
import { Icon } from 'astro-icon/components';
import { getBlogPermalink } from '~/utils/permalinks';
import { I18N_CONFIG } from '~/utils/config';
import { I18N } from '~/utils/config';
const { textDirection } = I18N_CONFIG;
const { textDirection } = I18N;
---
<div class="mx-auto px-6 sm:px-6 max-w-3xl pt-8 md:pt-4 pb-12 md:pb-20">