diff --git a/package.json b/package.json index 9c951b0..6e3aba3 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "lucide-react": "^0.379.0", "react": "^18.3.1", "react-dom": "^18.3.1", - "react-icons": "^5.2.1", + "react-icons": "^5.3.0", "tailwind-merge": "^2.3.0", "tailwindcss": "^3.4.3", "tailwindcss-animate": "^1.0.7", diff --git a/src/layouts/BlogPost.astro b/src/layouts/BlogPost.astro deleted file mode 100644 index 5bf6fd7..0000000 --- a/src/layouts/BlogPost.astro +++ /dev/null @@ -1,52 +0,0 @@ ---- -import BaseHead from '../components/BaseHead.astro' -import Header from '../components/Header.astro' -import FormattedDate from '../components/FormattedDate.astro' -import type { PostOrPage } from '@tryghost/content-api' -import { Image } from 'astro:assets' - -type Props = PostOrPage - -const { title, excerpt: description, published_at, updated_at, feature_image, feature_image_caption, feature_image_alt } = Astro.props ---- - - - - - - - -
-
-
-
- -

{title}

-
-
- -
-
- {feature_image && {feature_image_alt} -
- {feature_image_caption && } -
- - -
-
- - { - updated_at && ( -
- Last updated on -
- ) - } -
- -
-
-
- - diff --git a/src/lib/ghost.ts b/src/lib/ghost.ts deleted file mode 100644 index fb434e7..0000000 --- a/src/lib/ghost.ts +++ /dev/null @@ -1,8 +0,0 @@ -import GhostContentAPI from '@tryghost/content-api'; - -// Create API instance with site credentials -export const ghostClient = new GhostContentAPI({ - url: import.meta.env.BLOG_URL, // This is the default URL if your site is running on a local environment - key: import.meta.env.BLOG_CONTENT_KEY, - version: 'v5.82', -}); \ No newline at end of file diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro deleted file mode 100644 index 47afc96..0000000 --- a/src/pages/blog/[...slug].astro +++ /dev/null @@ -1,42 +0,0 @@ ---- -import BlogPost from '../../layouts/BlogPost.astro' -import { ghostClient } from '../../lib/ghost' -import type { PostOrPage } from '@tryghost/content-api' -import * as shiki from 'shiki' -import { JSDOM } from 'jsdom' - -export async function getStaticPaths() { - const posts = await ghostClient.posts.browse({ - limit: 'all', - }) - return posts.map((post) => { - return { - params: { - slug: post.slug, - }, - props: { - post: post, - }, - } - }) -} -const { post } = Astro.props as { post: PostOrPage } - -// parse the post.html content, get the code blocks and highlight them -const doc = new JSDOM(post.html!) -const codeBlocks = doc.window.document.querySelectorAll('code') -for (const codeBlock of codeBlocks) { - if (!codeBlock.className) continue - const language = codeBlock.className.replace('language-', '') - const code = codeBlock.textContent - const rendered = await shiki.codeToHtml(code!, { - lang: language, - theme: 'tokyo-night', - }) - codeBlock.innerHTML = rendered -} ---- - - - - diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro deleted file mode 100644 index 2340237..0000000 --- a/src/pages/blog/index.astro +++ /dev/null @@ -1,46 +0,0 @@ ---- -import BaseHead from '../../components/BaseHead.astro' -import Header from '../../components/Header.astro' -import { SITE_TITLE, SITE_DESCRIPTION } from '../../consts' -import FormattedDate from '../../components/FormattedDate.astro' -import { Image } from 'astro:assets' -import { ghostClient } from '@/lib/ghost' - -const posts = await ghostClient.posts.browse({ - limit: 'all', -}) ---- - - - - - - - - -
-
-
- -
-
- - diff --git a/src/pages/index.astro b/src/pages/index.astro index 3197c9b..7a59f80 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,7 +3,7 @@ import BaseHead from '../components/BaseHead.astro' import { SITE_TITLE, SITE_DESCRIPTION } from '../consts' import { Image } from 'astro:assets' import ImageAuthor from '@/components/ImageAuthor.astro' -import { FaGithub, FaBlog, FaDiscord, FaMastodon, FaTwitter } from 'react-icons/fa' +import { FaGithub, FaBlog, FaDiscord, FaMastodon, FaBluesky } from 'react-icons/fa6' import { SiOsu } from 'react-icons/si' import Background from '../backgrounds.json' @@ -28,10 +28,10 @@ const randomBackground = Background[Math.floor(Math.random() * Background.length

Hobbyist developer & sern lead developer team member

- + - +
diff --git a/yarn.lock b/yarn.lock index 63d7ea5..c5f9812 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4096,10 +4096,10 @@ react-dom@^18.3.1: loose-envify "^1.1.0" scheduler "^0.23.2" -react-icons@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-5.2.1.tgz#28c2040917b2a2eda639b0f797bff1888e018e4a" - integrity sha512-zdbW5GstTzXaVKvGSyTaBalt7HSfuK5ovrzlpyiWHAFXndXTdd/1hdDHI4xBM1Mn7YriT6aqESucFl9kEXzrdw== +react-icons@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-5.3.0.tgz#ccad07a30aebd40a89f8cfa7d82e466019203f1c" + integrity sha512-DnUk8aFbTyQPSkCfF8dbX6kQjXA9DktMeJqfjrg6cK9vwQVMxmcA3BfP4QoiztVmEHtwlTgLFsPuH2NskKT6eg== react-refresh@^0.14.0: version "0.14.2"