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,11 +1,11 @@
import rss from '@astrojs/rss';
import { SITE_CONFIG, METADATA_CONFIG, APP_BLOG_CONFIG } from '~/utils/config';
import { SITE, METADATA, APP_BLOG } from '~/utils/config';
import { fetchPosts } from '~/utils/blog';
import { getPermalink } from '~/utils/permalinks';
export const GET = async () => {
if (!APP_BLOG_CONFIG.isEnabled) {
if (!APP_BLOG.isEnabled) {
return new Response(null, {
status: 404,
statusText: 'Not found',
@ -15,8 +15,8 @@ export const GET = async () => {
const posts = await fetchPosts();
const { body = "" } = await rss({
title: `${SITE_CONFIG.name}s Blog`,
description: METADATA_CONFIG?.description || "",
title: `${SITE.name}s Blog`,
description: METADATA?.description || "",
site: import.meta.env.SITE,
items: posts.map((post) => ({
@ -26,7 +26,7 @@ export const GET = async () => {
pubDate: post.publishDate,
})),
trailingSlash: SITE_CONFIG.trailingSlash,
trailingSlash: SITE.trailingSlash,
})
return new Response(body, {