@@ -38,7 +39,7 @@ const image = await findImage(post.image); { - BLOG?.post?.disabled ? ( + !APP_BLOG_CONFIG?.post?.isEnabled ? ( post.title ) : ( - {post.excerpt || post.description} + {post.excerpt}
diff --git a/src/components/blog/SinglePost.astro b/src/components/blog/SinglePost.astro index 6694c97..7a4a3a6 100644 --- a/src/components/blog/SinglePost.astro +++ b/src/components/blog/SinglePost.astro @@ -16,6 +16,7 @@ export interface Props { } const { post, url } = Astro.props; +const Content = post?.Content || null; --- @@ -57,7 +58,7 @@ const { post, url } = Astro.props; class="max-w-full lg:max-w-6xl mx-auto mb-6 sm:rounded-md bg-gray-400 dark:bg-slate-700" widths={[400, 900]} sizes="(max-width: 900px) 400px, 900px" - alt={post.description || ''} + alt={post?.excerpt || ''} loading="eager" aspectRatio={16 / 9} width={900} @@ -77,11 +78,8 @@ const { post, url } = Astro.props; class="mx-auto px-6 sm:px-6 max-w-3xl prose prose-lg lg:prose-xl dark:prose-invert dark:prose-headings:text-slate-300 prose-md prose-headings:font-heading prose-headings:leading-tighter prose-headings:tracking-tighter prose-headings:font-bold prose-a:text-primary dark:prose-a:text-blue-400 prose-img:rounded-md prose-img:shadow-lg mt-8" > { - post.Content ? ( - <> - {/* @ts-ignore */} - - > + Content ? ( + ) : ( ) diff --git a/src/components/blog/Tags.astro b/src/components/blog/Tags.astro index 710ef84..9902572 100644 --- a/src/components/blog/Tags.astro +++ b/src/components/blog/Tags.astro @@ -1,7 +1,7 @@ --- import { getPermalink } from '~/utils/permalinks'; -import { BLOG } from '~/config.mjs'; +import { APP_BLOG_CONFIG } 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 {tags.map((tag) => ( - {BLOG?.tag?.disabled ? ( + {!APP_BLOG_CONFIG?.tag?.isEnabled ? ( tag ) : ( +{ANALYTICS_CONFIG?.vendors?.googleAnalytics?.isEnabled && } \ No newline at end of file diff --git a/src/components/common/ApplyColorMode.astro b/src/components/common/ApplyColorMode.astro new file mode 100644 index 0000000..b585788 --- /dev/null +++ b/src/components/common/ApplyColorMode.astro @@ -0,0 +1,33 @@ +--- +import { UI_CONFIG } from "~/utils/config"; + +// TODO: This code is temporary +--- + + diff --git a/src/components/common/BasicScripts.astro b/src/components/common/BasicScripts.astro index 679cffd..092301c 100644 --- a/src/components/common/BasicScripts.astro +++ b/src/components/common/BasicScripts.astro @@ -1,8 +1,8 @@ --- -import { SITE } from '~/config.mjs'; +import { UI_CONFIG } from '~/utils/config'; --- -