diff --git a/src/components/ArticleList.astro b/src/components/ArticleList.astro deleted file mode 100644 index f67a2ae..0000000 --- a/src/components/ArticleList.astro +++ /dev/null @@ -1,19 +0,0 @@ ---- -const { posts, displayDate = false, placeholder = false } = Astro.props; ---- -
- {posts.map((post) => ( -

- {displayDate && {new Date(post.data.pubDate).toISOString().split('T')[0]}} - {post.data.title} -

- ))} - - {placeholder && posts.length === 0 && ( - <> -

- No posts here yet -

- - )} -
\ No newline at end of file diff --git a/src/components/Comments.astro b/src/components/Comments.astro index 7ab4a69..c0c25bd 100644 --- a/src/components/Comments.astro +++ b/src/components/Comments.astro @@ -1,7 +1,6 @@ --- import {siteConfig} from "../config"; import FediverseComments from "./helper/comments/Fediverse.astro"; -import HatsuComments from "./helper/comments/Hatsu.astro"; const method = siteConfig.comments.type const ArtalkConfig = siteConfig.comments.artalk @@ -53,4 +52,3 @@ let { path='/' } = Astro.props; {(method === 'fediverse' && !FediverseConfig.renderOnServer ) && } {(method === 'fediverse' && FediverseConfig.renderOnServer ) &&

Loading comments...

} -{method === 'hatsu' && } \ No newline at end of file diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro deleted file mode 100644 index 7bcb4bc..0000000 --- a/src/components/Navbar.astro +++ /dev/null @@ -1,9 +0,0 @@ ---- -import {siteConfig} from "../config"; -const navBarItems = siteConfig.navBarItems ---- - \ No newline at end of file diff --git a/src/components/Statistics.astro b/src/components/Statistics.astro deleted file mode 100644 index bc9444e..0000000 --- a/src/components/Statistics.astro +++ /dev/null @@ -1,35 +0,0 @@ ---- -import {siteConfig} from "../config"; -const noscript = siteConfig.noClientJavaScript -const statisticsType = siteConfig.siteAnalytics.type -const umamiConfig = siteConfig.siteAnalytics.umami -const goatCounterConfig = siteConfig.siteAnalytics.goatcounter ---- -{statisticsType === 'umami' && ( - -)} - -{statisticsEnabled && statisticsType === 'goatcounter' && ( - <> - {noscript ? ( - Analytics - ) : ( - <> - - - - )} - -)} \ No newline at end of file diff --git a/src/components/helper/comments/Hatsu.astro b/src/components/helper/comments/Hatsu.astro deleted file mode 100644 index 42d5aa4..0000000 --- a/src/components/helper/comments/Hatsu.astro +++ /dev/null @@ -1,494 +0,0 @@ ---- -import {siteConfig} from "../../../config"; -const hatsuHost = `https://${siteConfig.comments.hatsu.instanceDomain}` -const {origin, pathname} = new URL(Astro.url) -const url = new URL(pathname, origin).href - -import { transform } from "ultrahtml"; -import sanitize from "ultrahtml/transformers/sanitize"; ---- -
-

Comments by Hatsu

-

-
- -
-
- - \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 055801a..d7ccb74 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -8,8 +8,6 @@ import Meta from "../components/helper/head/Meta.astro"; import { siteConfig } from "../config"; import Logo from '../assets/mercury.svg' -import Statistics from "../components/Statistics.astro"; -import Navbar from "../components/Navbar.astro"; interface Props { title: string; @@ -22,6 +20,9 @@ interface Props { const noscript = siteConfig.noClientJavaScript const statisticsEnabled = siteConfig.siteAnalytics.enabled +const statisticsType = siteConfig.siteAnalytics.type +const umamiConfig = siteConfig.siteAnalytics.umami +const goatCounterConfig = siteConfig.siteAnalytics.goatcounter const defaultTitle = siteConfig.title const formattedRootPath = defaultTitle.toLowerCase().replace(/\s+/g, '-'); @@ -30,6 +31,7 @@ const path = formattedRootPath + (relativePath === '/' ? '' : relativePath) const pageTitle = (relativePath === '/' ? defaultTitle : `${Astro.props.title} - ${defaultTitle}`) +const navBarItems = siteConfig.navBarItems const customFooter = siteConfig.customFooter const nekoType = siteConfig.neko?.type @@ -52,7 +54,13 @@ const { title = pageTitle, author = siteConfig.defaultAuthor.name,description =
{path}
- + + +
@@ -72,7 +80,33 @@ const { title = pageTitle, author = siteConfig.defaultAuthor.name,description =

Powered by mercury

- {statisticsEnabled && } + {statisticsEnabled && statisticsType === 'umami' && ( + + )} + {statisticsEnabled && statisticsType === 'goatcounter' && ( + <> + {noscript ? ( + Analytics + ) : ( + <> + + + + )} + + )} { (siteConfig.neko.enabled && !noscript) && <>