Dashboard › byk.github.io › Session 1dHd0TZx2cTC
1dHd0TZx2cTCpxIb3Explore /home/byk/Code/byk.github.io thoroughly to understand the site structure, template/layout system, component organization, and how pages/posts are added. I need to understand:
Read these files fully:
Return a detailed summary of everything you find, including file contents for layout files, config, and key components.
I'll start by exploring the overall structure and reading all the key files you specified. Let me work through this systematically.
<path>/home/byk/Code/byk.github.io</path> <type>directory</type> <entries> .astro/ .frontmatter/ .git/ .github/ .gitignore .opencode/ .vscode/ AGENTS.md astro.config.mjs CNAME dist/ frontmatter.json LICENSE node_modules/ package.json pnpm-lock.yaml public/ README.md src/ tsconfig.json (20 entries) </entries>
<path>/home/byk/Code/byk.github.io/astro.config.mjs</path>
<type>file</type>
<content>
1: import { defineConfig } from "astro/config";
2: import tailwindcss from "@tailwindcss/vite";
3: import mdx from "@astrojs/mdx";
4: import icon from "astro-icon";
5: import { wordCount } from "./src/utils/word-count.mjs";
6:
7: // https://astro.build/config
8: export default defineConfig({
9: integrations: [
10: mdx({
11: remarkPlugins: [
12: () =>
13: (tree, { data }) => {
14: const words = wordCount(tree);
15: data.astro.frontmatter.words = words;
16: },
17: ],
18: }),
19: icon(),
20: ],
21: site: "https://byk.im",
22: build: {
23: assetsPrefix: "https://byk.im/",
24: },
25: vite: {
26: plugins: [tailwindcss()],
27: },
28: });
(End of file - total 28 lines)
</content>
<path>/home/byk/Code/byk.github.io/package.json</path>
<type>file</type>
<content>
1: {
2: "name": "byk.github.io",
3: "type": "module",
4: "version": "2.0.0",
5: "private": true,
6: "scripts": {
7: "dev": "astro dev",
8: "start": "astro dev",
9: "build": "astro build",
10: "preview": "astro preview",
11: "astro": "astro"
12: },
13: "dependencies": {
14: "@astrojs/mdx": "^5.0.3",
15: "@astrojs/rss": "4.0.18",
16: "@tailwindcss/typography": "^0.5.19",
17: "@tailwindcss/vite": "^4.2.2",
18: "astro": "^6.1.6",
19: "astro-icon": "^1.1.5",
20: "dateformat": "^5.0.3",
21: "sharp": "^0.34.5",
22: "tailwindcss": "^4.2.2"
23: },
24: "devDependencies": {
25: "prettier": "^3.8.3",
26: "prettier-plugin-astro": "^0.14.1"
27: },
28: "packageManager": "pnpm@10.28.0",
29: "volta": {
30: "node": "24.13.0"
31: }
32: }
(End of file - total 32 lines)
</content>
<path>/home/byk/Code/byk.github.io/tsconfig.json</path>
<type>file</type>
<content>
1: {
2: "extends": "astro/tsconfigs/base",
3: "compilerOptions": {
4: "strictNullChecks": true,
5: "allowJs": true
6: }
7: }
(End of file - total 7 lines)
</content>
<path>/home/byk/Code/byk.github.io/src</path> <type>directory</type> <entries> assets/ components/ config.mjs content.config.ts content/ css/ env.d.ts icons/ layouts/ pages/ utils/ (11 entries) </entries>
<path>/home/byk/Code/byk.github.io/src/layouts</path> <type>directory</type> <entries> Base.astro (1 entries) </entries>
<path>/home/byk/Code/byk.github.io/src/pages</path> <type>directory</type> <entries> index.astro posts/ rss.xml.js (3 entries) </entries>
<path>/home/byk/Code/byk.github.io/src/components</path> <type>directory</type> <entries> general/ posts/ (2 entries) </entries>
File not found: /home/byk/Code/byk.github.io/src/styles
<path>/home/byk/Code/byk.github.io/src/content</path> <type>directory</type> <entries> author/ LICENSE posts/ (3 entries) </entries>
/home/byk/Code/byk.github.io/src/components/general/ModeSwitch.astro /home/byk/Code/byk.github.io/src/layouts/Base.astro /home/byk/Code/byk.github.io/src/pages/rss.xml.js /home/byk/Code/byk.github.io/src/components/posts/Post.astro /home/byk/Code/byk.github.io/src/pages/posts/[slug].astro /home/byk/Code/byk.github.io/src/css/style.css /home/byk/Code/byk.github.io/src/content.config.ts /home/byk/Code/byk.github.io/src/content/posts/adaptation.mdx /home/byk/Code/byk.github.io/src/assets/adaptation.png /home/byk/Code/byk.github.io/src/utils/word-count.mjs /home/byk/Code/byk.github.io/src/utils/posts.mjs /home/byk/Code/byk.github.io/src/pages/posts/[...page].astro /home/byk/Code/byk.github.io/src/pages/index.astro /home/byk/Code/byk.github.io/src/content/posts/uk-payroll-taxes.mdx /home/byk/Code/byk.github.io/src/content/posts/the-improbable-truth.mdx /home/byk/Code/byk.github.io/src/content/posts/rss-in-astro.mdx /home/byk/Code/byk.github.io/src/env.d.ts /home/byk/Code/byk.github.io/src/i...
Now let me read all the key files in parallel:
<path>/home/byk/Code/byk.github.io/src/layouts/Base.astro</path>
<type>file</type>
<content>
1: ---
2: import { ClientRouter } from 'astro:transitions';
3: import SeoHead from "../components/general/SeoHead.astro"
4: import Header from "../components/general/Header.astro"
5: import Footer from "../components/general/Footer.astro"
6: import '../css/style.css';
7:
8: const { postData } = Astro.props;
9: ---
10: <!doctype html>
11: <html lang="en">
12:
13: <head>
14: <script is:inline>
15: (function () {
16: // One-time migration from old storage format
17: if ('darkMode' in localStorage) {
18: localStorage.theme = localStorage.darkMode === 'true' ? 'dark' : 'light';
19: delete localStorage.darkMode;
20: }
21:
22: function applyTheme() {
23: var theme = localStorage.theme;
24: var isDark = theme === 'dark' ||
25: (theme !== 'light' && ...
<path>/home/byk/Code/byk.github.io/src/pages/index.astro</path> <type>file</type> <content> 1: --- 2: import Base from "../layouts/Base.astro"; 3: import Welcome from "../components/general/Welcome.astro"; 4: import LatestPosts from "../components/posts/LatestPosts.astro"; 5: --- 6: 7: <Base> 8: <main> 9: <Welcome /> 10: <LatestPosts /> 11: </main> 12: </Base> (End of file - total 12 lines) </content>
<path>/home/byk/Code/byk.github.io/src/pages/posts/[slug].astro</path>
<type>file</type>
<content>
1: ---
2: import { Image } from 'astro:assets'
3:
4: import Base from "../../layouts/Base.astro";
5: import AuthorInfo from "../../components/posts/AuthorInfo.astro";
6: import LatestPosts from "../../components/posts/LatestPosts.astro";
7: import PublishDate from "../../components/posts/PublishDate.astro";
8: import ReadingInfo from "../../components/posts/ReadingInfo.astro";
9: import Tag from "../../components/general/Tag.astro";
10:
11: import { getCollection, getEntry, render } from "astro:content";
12:
13: export async function getStaticPaths() {
14: const blogEntries = await getCollection("posts");
15:
16: return blogEntries.map((entry) => ({
17: params: { slug: entry.data.slug },
18: props: { entry },
19: }));
20: }
21: const { entry } = Astro.props;
22: entry.data.type = "blog";
23:
24: const { Content, remarkPluginFrontmatter } = await render(entry);
25: ...
<path>/home/byk/Code/byk.github.io/src/pages/posts/[...page].astro</path>
<type>file</type>
<content>
1: ---
2: import { getCollection } from "astro:content";
3: import config from "../../config.mjs";
4: import { descDateSort } from "../../utils/posts.mjs";
5:
6: import Base from "../../layouts/Base.astro";
7: import Post from "../../components/posts/Post.astro";
8:
9: export async function getStaticPaths({ paginate }) {
10: const blogEntries = (await getCollection("posts")).sort(descDateSort);
11:
12: return paginate(blogEntries, { pageSize: config.postsPerPage });
13: }
14:
15: const { page } = Astro.props;
16: ---
17:
18: <Base>
19: <section class="container mx-auto max-w-screen-lg px-7 py-10">
20: {
21: page.data.map((post, index) => {
22: return <Post postData={post} num={index} jj />;
23: })
24: }
25: <div class="flex flex-row justify-center gap-7">
26: {
27: page.url.prev ? (
28: <a
29: ...
<path>/home/byk/Code/byk.github.io/src/pages/rss.xml.js</path>
<type>file</type>
<content>
1: import { experimental_AstroContainer as AstroContainer } from "astro/container";
2: import mdxRenderer from "@astrojs/mdx/server.js";
3: import { getCollection, render } from "astro:content";
4:
5: import rss from "@astrojs/rss";
6: import { descDateSort } from "../utils/posts.mjs";
7: import config from "../config.mjs";
8:
9: const MAX_ITEMS = 10;
10:
11: export async function GET(context) {
12: // This method is borrowed from https://blog.damato.design/posts/astro-rss-mdx/
13: const container = await AstroContainer.create({});
14: container.addServerRenderer({ renderer: mdxRenderer });
15: const posts = (await getCollection("posts"))
16: .sort(descDateSort)
17: .slice(0, MAX_ITEMS);
18:
19: return rss({
20: title: config.title,
21: description: config.description,
22: site: context.url,
23: items: await Promise.all(
24: posts.map(async (post) => ...
<path>/home/byk/Code/byk.github.io/src/css/style.css</path>
<type>file</type>
<content>
1: @import "tailwindcss";
2: @plugin "@tailwindcss/typography";
3: @custom-variant dark (&:is(.dark *));
4:
5: @theme {
6: --color-pacamara-primary: #003049;
7: --color-pacamara-secondary: #b2a4ff;
8: --color-pacamara-accent: #ffb4b4;
9: --color-pacamara-dark: #000e14;
10: --color-pacamara-white: #ffffff;
11:
12: --font-pacamara-inter: "Inter", sans-serif;
13: --font-pacamara-space: "Space Grotesk", sans-serif;
14:
15: --shadow-pacamara-shadow: 0px 25px 50px -12px rgba(0, 0, 0, 0.3);
16: }
17:
18: :root {
19: --gradient-space: 20px;
20: --gradient-height: 2px;
21: }
22:
23: @font-face {
24: font-display: swap;
25: font-family: "Inter";
26: font-style: normal;
27: font-weight: 400;
28: src: url("/fonts/inter-v12-latin_latin-ext-regular.woff2") format("woff2");
29: }
30:
31: @font-face {
32: font-display: swap;
33: font-family: "Inter";
34: font-style: ...
<path>/home/byk/Code/byk.github.io/src/content.config.ts</path>
<type>file</type>
<content>
1: import { defineCollection, reference } from "astro:content";
2: import { glob } from "astro/loaders";
3: import { z } from "astro/zod";
4:
5: const postsCollection = defineCollection({
6: loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/content/posts" }),
7: schema: ({ image }) =>
8: z.object({
9: title: z.string(),
10: intro: z.string(),
11: tag: z.string(),
12: image: image().optional(),
13: author: reference("author"),
14: pubDate: z.date(),
15: type: z.string().optional(),
16: slug: z.string().optional(),
17: }),
18: });
19:
20: const pageCollection = defineCollection({
21: loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/content/page" }),
22: schema: ({ image }) =>
23: z.object({
24: title: z.string(),
25: intro: z.string(),
26: image: image().optional(),
27: type: ...
<path>/home/byk/Code/byk.github.io/src/config.mjs</path>
<type>file</type>
<content>
1: export default {
2: title: "Read at BYK's",
3: description:
4: "Random ramblings of a software engineer. Mostly about software, sometimes about life.",
5: defaultOgImage: "./logo.png",
6: latestPosts: 3,
7: postsPerPage: 5,
8: url: "https://byk.im",
9: social: {
10: facebook: "https://www.facebook.com/madBYK/",
11: github: "https://github.com/BYK",
12: instagram: "https://www.instagram.com/madbyk_/",
13: twitter: "https://twitter.com/madbyk",
14: bsky: "https://bsky.app/profile/byk.im",
15: flickr: "https://www.flickr.com/photos/bykaya/",
16: },
17: };
(End of file - total 17 lines)
</content>
<path>/home/byk/Code/byk.github.io/src/env.d.ts</path> <type>file</type> <content> 1: /// <reference path="../.astro/types.d.ts" /> 2: /// <reference types="astro/client" /> (End of file - total 2 lines) </content>
Now let me read all the components:
<path>/home/byk/Code/byk.github.io/src/components/general/Header.astro</path> <type>file</type> <content> 1: --- 2: import ModeSwitch from "./ModeSwitch.astro"; 3: import HamburgerButton from "./HamburgerButton.astro"; 4: import Navigation from "./Navigation.astro" 5: 6: --- 7: <div class="navigation flex-1 hidden absolute top-0 left-0 w-full bg-pacamara-white dark:bg-pacamara-dark transition-all duration-300 p-7 pt-[112px] z-10 shadow-2xl" id="navigation_wrapper"> 8: <Navigation /> 9: </div> 10: <header class="container mx-auto max-w-screen-xl px-7 py-10 bg-white flex flex-initial flex-row gap-10 items-center justify-between transition-all duration-300 dark:bg-pacamara-dark relative z-20"> 11: <div class="logo flex-none"> 12: <a href="/" class="font-bold font-pacamara-space text-lg hover:text-pacamara-accent transition-all duration-300 dark:text-white dark:hover:text-pacamara-accent">Read at BYK's</a> 13: </div> 14: <div class="navigation flex-1 hidden ...
<path>/home/byk/Code/byk.github.io/src/components/general/Footer.astro</path>
<type>file</type>
<content>
1: ---
2: import config from "../../config.mjs";
3: import SocialIcon from "./SocialIcon.astro";
4: ---
5:
6: <div class="w-full h-[1px] overflow-hidden gradient-line"></div>
7: <div
8: class="py-14 transition-all duration-300 bg-gradient-to-r from-pacamara-secondary/10 to-pacamara-accent/10 dark:bg-gradient-to-r dark:from-pacamara-accent/[2%] dark:to-pacamara-secondary/[5%]"
9: >
10: <footer
11: class="container text-[14px] mx-auto max-w-screen-xl flex flex-initial lg:flex-row flex-col gap-10 items-center px-7 text-pacamara-dark/40 dark:text-pacamara-white/40"
12: >
13: <ul
14: class="list-none font-normal flex flex-initial flex-row content-center items-center gap-x-[35px]"
15: >
16: <SocialIcon socialUrl={new URL("rss.xml", Astro.site)} socialType="rss" />
17: <SocialIcon socialUrl={config?.social?.github} socialType="github" />
18: ...
<path>/home/byk/Code/byk.github.io/src/components/general/Navigation.astro</path> <type>file</type> <content> 1: <nav> 2: <ul class="list-none text-[14px] font-normal flex flex-initial flex-col md:flex-row gap-5"> 3: <li> 4: <a href="/posts" class="opacity-60 text-pacamara-primary hover:opacity-100 hover:text-pacamara-accent transition-all duration-300 dark:text-white dark:hover:text-pacamara-accent">Archive</a> 5: </li> 6: </ul> 7: </nav> (End of file - total 7 lines) </content>
<path>/home/byk/Code/byk.github.io/src/components/general/SeoHead.astro</path>
<type>file</type>
<content>
1: ---
2: import config from '../../config.mjs';
3:
4: const { postData } = Astro.props;
5:
6: const title = ( postData?.data?.title ? postData.data.title : config.title );
7: const description = postData?.data?.description ? postData.data.description : config.description;
8: const permalink = new URL(Astro.url.pathname, Astro.url);
9: const image = postData?.data?.image ? postData.data.image.src : config.defaultOgImage;
10: const type = postData?.data?.type ? postData.data.type : "website";
11:
12: ---
13:
14: <title>{title}</title>
15: <meta name="title" content={title} />
16: {description && <meta name="description" content={description} />}
17:
18: <!-- Open Graph Tags (Facebook) -->
19: <meta property="og:type" content={type} />
20: <meta property="og:title" content={title} />
21: {permalink && <meta property="og:url" content={permalink} />}
22: {description && <meta ...
<path>/home/byk/Code/byk.github.io/src/components/general/Welcome.astro</path> <type>file</type> <content> 1: --- 2: 3: --- 4: <section class=" 5: container mx-auto max-w-screen-xl px-7 py-10 6: lg:min-h-[500px] content-center font-pacamara 7: prose lg:prose-xl 8: prose-headings:font-pacamara-space prose-headings:mt-5 prose-headings:text-pacamara-dark prose-headings:font-bold lg:prose-h1:text-7xl prose-h1:mt-0 prose-heading:transition-all prose-heading:duration-300 9: prose-p:text-pacamara-primary/50 dark:prose-p:text-white/70 prose-p:mb-0 prose-p:transition-all prose-p:duration-300 10: prose-img:mt-0 prose-img:mb-0 11: dark:prose-headings:text-white 12: "> 13: <h1><span class="gradient-underline"><span>Random ramblings of a software engineer. Mostly about software, sometimes about life.</span></span></h1> 14: </section> 15: 16: </section> (End of file - total 16 lines) </content>
<path>/home/byk/Code/byk.github.io/src/components/general/SocialIcon.astro</path>
<type>file</type>
<content>
1: ---
2: import { Icon } from 'astro-icon/components';
3:
4: const { socialUrl=false, socialType } = Astro.props;
5: ---
6: {socialUrl &&
7: <li>
8: <a href={socialUrl} target="_blank" aria-label={socialType + "link"}>
9: <Icon name={socialType} class="w-auto h-[15px] transition-all duration-300 fill-pacamara-primary/60 hover:fill-pacamara-secondary dark:fill-pacamara-accent dark:hover:fill-pacamara-secondary" />
10: </a>
11: </li>
12: }
(End of file - total 12 lines)
</content>
<path>/home/byk/Code/byk.github.io/src/components/general/Tag.astro</path>
<type>file</type>
<content>
1: ---
2: const { tag } = Astro.props;
3: ---
4: {tag &&
5: <span class="group text-[16px] bg-transparent border-pacamara-secondary border-[1px] leading-none rounded-full flex flex-row content-center items-center h-[34px] px-3 text-pacamara-secondary">
6: {tag}
7: </span>
8: }
(End of file - total 8 lines)
</content>
<path>/home/byk/Code/byk.github.io/src/components/general/ModeSwitch.astro</path>
<type>file</type>
<content>
1: <button id="theme-toggle" class="text-xl leading-none" title="Theme: system"
2: ><span data-icon="light" class="hidden">☀️</span
3: ><span data-icon="dark" class="hidden">🌙</span
4: ><span data-icon="system" class="hidden">🌗</span
5: ></button>
6:
7: <script>
8: function setupThemeToggle() {
9: const btn = document.getElementById('theme-toggle');
10: if (!btn) return;
11:
12: const icons = {
13: light: btn.querySelector('[data-icon="light"]'),
14: dark: btn.querySelector('[data-icon="dark"]'),
15: system: btn.querySelector('[data-icon="system"]'),
16: };
17:
18: const cycle = { system: 'light', light: 'dark', dark: 'system' };
19:
20: function getTheme() {
21: const t = localStorage.theme;
22: return (t === 'light' || t === 'dark') ? ...
<path>/home/byk/Code/byk.github.io/src/components/general/HamburgerButton.astro</path>
<type>file</type>
<content>
1: <button id="menu_toggle" class="block md:hidden text-white" type="button" aria-controls="navbar-main" aria-expanded="false" aria-label="Toggle navigation">
2: <svg class="w-8 h-auto fill-pacamara-dark stroke-pacamara-dark transition-all duration-300 hover:fill-pacamara-accent hover:stroke-pacamara-accent dark:fill-pacamara-accent dark:stroke-pacamara-accent dark:hover:fill-pacamara-secondary dark:hover:stroke-pacamara-secondary" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg>
3: </button>
4:
5: <script>
6: const menuToggle = () => {
7: const button = document.querySelector("#menu_toggle");
8: const nav = document.querySelector("#navigation_wrapper");
9: button.addEventListener('click', ...
<path>/home/byk/Code/byk.github.io/src/components/posts/Post.astro</path>
<type>file</type>
<content>
1: ---
2: const { postData, num } = Astro.props;
3: import { Image } from 'astro:assets'
4: import PublishDate from "./PublishDate.astro";
5: import Tag from "../general/Tag.astro";
6: import ReadingInfo from "../../components/posts/ReadingInfo.astro";
7: // default image if no image added
8: import defaultImage from "../../assets/article.png";
9:
10: import { render } from 'astro:content';
11: const isOdd = num % 2;
12: const { remarkPluginFrontmatter } = await render(postData);
13: ---
14: <article
15: class="
16: group
17: lg:mb-[50px] mb-10 last:mb-0 prose lg:prose-xl max-w-none
18: prose-headings:font-bold prose-headings:text-pacamara-accent
19: prose-p:text-pacamara-primary/70 lg:prose-p:text-[18px] prose-p:transition-all prose-p:duration-300
20: prose-a:font-semibold prose-a:text-pacamara-dark prose-a:hover:text-pacamara-pink ...
<path>/home/byk/Code/byk.github.io/src/components/posts/ReadingInfo.astro</path>
<type>file</type>
<content>
1: ---
2: const { words } = Astro.props;
3: const readingTimeMinutes = Math.ceil(words / 200);
4: const minutesText = readingTimeMinutes === 1 ? "minute" : "minutes";
5: ---
6:
7: <small
8: class="text-italic text-pacamara-primary/50 font-pacamara-space tracking-widest transition-all duration-300 text-[16px] dark:text-white/40"
9: >
10: ~{readingTimeMinutes} {minutesText} ({words} words)
11: </small>
(End of file - total 11 lines)
</content>
<path>/home/byk/Code/byk.github.io/src/components/posts/PublishDate.astro</path>
<type>file</type>
<content>
1: ---
2: import dateFormat, { masks } from "dateformat";
3: const {date} = Astro.props;
4: ---
5: <small class="
6: text-pacamara-primary/50 font-pacamara-space tracking-widest transition-all duration-300 text-[16px]
7: dark:text-white/40
8: ">
9: { dateFormat(date, "dd-mm-yyyy") }
10: </small>
(End of file - total 10 lines)
</content>
<path>/home/byk/Code/byk.github.io/src/components/posts/LatestPosts.astro</path>
<type>file</type>
<content>
1: ---
2: import { getCollection } from "astro:content";
3: import Post from "./Post.astro";
4: import config from "../../config.mjs";
5: import { descDateSort } from "../../utils/posts.mjs";
6:
7: const { postLimit = config.latestPosts, skipPost = "" } = Astro.props;
8:
9: const posts = (
10: await getCollection("posts", ({ data }) => {
11: return !(data.title === skipPost);
12: })
13: )
14: .sort(descDateSort)
15: .slice(0, postLimit);
16: ---
17:
18: <section class="container mx-auto max-w-screen-lg px-7 py-10 mb-10">
19: {posts.map((post, index) => <Post postData={post} num={index} />)}
20:
21: <div class="flex flex-row justify-center gap-7">
22: <a href="/posts" class="text-[16px] bg-transparent border-pacamara-secondary border-[1px] leading-none rounded-full py-3 px-5 text-pacamara-secondary hover:bg-pacamara-accent hover:border-pacamara-accent ...
<path>/home/byk/Code/byk.github.io/src/components/posts/AuthorInfo.astro</path>
<type>file</type>
<content>
1: ---
2: import { Image } from 'astro:assets'
3: const { authorData } = Astro.props;
4: ---
5: <section class="mx-auto max-w-screen-lg px-7 lg:px-0 py-10 mb-5 flex flex-col lg:flex-row flex-nowrap gap-10 items-center">
6: {authorData.data.photo && <Image src={authorData.data.photo} width="200" class="relative w-[150px] rounded-full" alt="Author's photo" /> }
7:
8: <div class="
9: prose lg:prose-xl max-w-none
10: prose-headings:font-bold prose-headings:text-pacamara-accent
11: prose-p:text-pacamara-primary/70 lg:prose-p:text-[18px] prose-p:transition-all prose-p:duration-300
12: prose-a:font-semibold prose-a:text-pacamara-dark prose-a:hover:text-pacamara-pink prose-a:no-underline prose-a:transition-all prose-a:duration-300
13: prose-strong:font-normal
14: prose-headings:font-pacamara-space ...
Now let me read the utility files, a sample blog post, the author data, and the icons to complete the picture:
<path>/home/byk/Code/byk.github.io/src/utils/posts.mjs</path>
<type>file</type>
<content>
1: export function descDateSort(a, b) {
2: return b.data.pubDate.valueOf() - a.data.pubDate.valueOf();
3: }
(End of file - total 3 lines)
</content>
<path>/home/byk/Code/byk.github.io/src/utils/word-count.mjs</path>
<type>file</type>
<content>
1: export function wordCount(value) {
2: return one(value);
3: }
4:
5: function countWords(value) {
6: return (value || "").match(/\s+/g)?.length || 0;
7: }
8:
9: /**
10: * One node or several nodes.
11: *
12: * @param {unknown} value
13: * Thing to serialize.
14: * @returns {Number}
15: * Number of words.
16: */
17: function one(value) {
18: if (isNode(value)) {
19: if ("value" in value) {
20: return countWords(value.value);
21: }
22: if ("children" in value) {
23: return all(value.children);
24: }
25: }
26:
27: if (Array.isArray(value)) {
28: return all(value);
29: }
30:
31: return 0;
32: }
33:
34: /**
35: * Serialize a list of nodes.
36: *
37: * @param {Array<unknown>} values
38: * Thing to serialize. ...
<path>/home/byk/Code/byk.github.io/src/content/author/byk.json</path>
<type>file</type>
<content>
1: {
2: "displayName": "Burak Yigit Kaya",
3: "photo": "../../assets/authors/byk.png",
4: "bio": "Curious mind. Open source, behavioral psychology, automation"
5: }
(End of file - total 5 lines)
</content>
<path>/home/byk/Code/byk.github.io/src/content/posts/rss-in-astro.mdx</path> <type>file</type> <content> 1: --- 2: pubDate: 2024-12-30 3: author: byk 4: tag: javascript 5: title: Having a Good Ol' RSS Feed in Astro 6: intro: How to get a proper RSS feed for your blog in Astro with full content and images. 7: slug: good-old-rss-feed-in-astro 8: image: ../../assets/rss-logo.png 9: --- 10: 11: After reviving this blog with [Astro](https://astro.build), I realized that I didn't have an RSS feed even though the theme I'm using already has support for that. 12: So I got to work to enable it. For some reason, I just did not have the `rss.xml` file generated. After much trial and error, I finally figured out that the method name in the 13: [endpoint definition](https://github.com/palmiak/pacamara-astro/blob/cbff90909afbf4fa08fdfd47c860d4c732b00330/src/pages/rss.xml.js#L5) should be `ALL_CAPS` as in `GET` 14: instead of `get`. ...
<path>/home/byk/Code/byk.github.io/src/content/posts/adaptation.mdx</path> <type>file</type> <content> 1: --- 2: pubDate: 2026-04-14 3: author: byk 4: tag: ai 5: title: 'Adaptation: new tools in town!' 6: intro: It is not the strongest of the species that survives, nor the most intelligent that survives. It is the one that is most adaptable to change. 7: slug: adaptation-new-tools-in-town 8: image: ../../assets/adaptation.png 9: --- 10: 11: It was about a year ago. I was getting bombarded with LLMs in my editor. It started with [VSCode][1] offering code snippets as random auto complete suggestions. I hated them. They were mostly dumb, confused me and now I actually had to think deeper before accepting a suggestion because they actually could be subtly broken code. Then, very occasionally but at an increasing frequency, the suggestions started to understand my intent and predict my actual next step. That was oddly satisfying[^1]. ...
<path>/home/byk/Code/byk.github.io/src/icons/github.svg</path> <type>file</type> <content> 1: <svg xmlns="http://www.w3.org/2000/svg" height="1em" class="w-auto h-[15px] transition-all duration-300 fill-pacamara-primary/60 hover:fill-pacamara-secondary dark:fill-pacamara-accent dark:hover:fill-pacamara-secondary" 2: viewBox="0 0 496 512"> 3: <path 4: d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 ...
<path>/home/byk/Code/byk.github.io/src/icons/bsky.svg</path> <type>file</type> <content> 1: <svg width="568" height="501" viewBox="0 0 568 501" fill="none" xmlns="http://www.w3.org/2000/svg"> 2: <path d="M123.121 33.6637C188.241 82.5526 258.281 181.681 284 234.873C309.719 181.681 379.759 82.5526 444.879 33.6637C491.866 -1.61183 568 -28.9064 568 57.9464C568 75.2916 558.055 203.659 552.222 224.501C531.947 296.954 458.067 315.434 392.347 304.249C507.222 323.8 536.444 388.56 473.333 453.32C353.473 576.312 301.061 422.461 287.631 383.039C285.169 375.812 284.017 372.431 284 375.306C283.983 372.431 282.831 375.812 280.369 383.039C266.939 422.461 214.527 576.312 94.6667 453.32C31.5556 388.56 60.7778 323.8 175.653 304.249C109.933 315.434 36.0535 296.954 15.7778 224.501C9.94525 203.659 0 75.2916 0 57.9464C0 -28.9064 76.1345 -1.61183 123.121 33.6637Z" fill="black"/> 3: </svg> (End of file - total 3 lines) </content>
<path>/home/byk/Code/byk.github.io/public</path> <type>directory</type> <entries> favicon.ico fonts/ logo.png (3 entries) </entries>
<path>/home/byk/Code/byk.github.io/.github</path> <type>directory</type> <entries> workflows/ (1 entries) </entries>
<path>/home/byk/Code/byk.github.io/.github/workflows</path> <type>directory</type> <entries> deploy.yml (1 entries) </entries>
<path>/home/byk/Code/byk.github.io/src/content/LICENSE</path>
<type>file</type>
<content>
1: Attribution-NonCommercial-NoDerivatives 4.0 International
2:
3: =======================================================================
4:
5: Creative Commons Corporation ("Creative Commons") is not a law firm and
6: does not provide legal services or legal advice. Distribution of
7: Creative Commons public licenses does not create a lawyer-client or
8: other relationship. Creative Commons makes its licenses and related
9: information available on an "as-is" basis. Creative Commons gives no
10: warranties regarding its licenses, any material licensed under their
11: terms and conditions, or any related information. Creative Commons
12: disclaims all liability for damages resulting from their use to the
13: fullest extent possible. ...
/home/byk/Code/byk.github.io/public/fonts/space-grotesk-v15-latin_latin-ext-regular.woff2 /home/byk/Code/byk.github.io/public/fonts/space-grotesk-v15-latin_latin-ext-700.woff2 /home/byk/Code/byk.github.io/public/fonts/space-grotesk-v15-latin_latin-ext-600.woff2 /home/byk/Code/byk.github.io/public/fonts/inter-v12-latin_latin-ext-regular.woff2 /home/byk/Code/byk.github.io/public/fonts/inter-v12-latin_latin-ext-700.woff2
<path>/home/byk/Code/byk.github.io/.gitignore</path> <type>file</type> <content> 1: # build output 2: dist/ 3: # generated types 4: .astro/ 5: 6: # dependencies 7: node_modules/ 8: 9: # logs 10: npm-debug.log* 11: yarn-debug.log* 12: yarn-error.log* 13: pnpm-debug.log* 14: 15: # environment variables 16: .env 17: .env.production 18: 19: # macOS-specific files 20: .DS_Store 21: .jj 22: 23: # opencode 24: .opencode/ (End of file - total 24 lines) </content>
<path>/home/byk/Code/byk.github.io/README.md</path> <type>file</type> <content> 1: # [Read at BYK's](https://byk.im) 2: 3: Burak Yigit Kaya's personal blog hosted on GitHub Pages 4: 5: Built with [Astro](https://astro.build) using [Pacamara](https://github.com/palmiak/pacamara-astro) 6: 7: Contents are licensed with [CC BY-NC-ND 4.0](https://creativecommons.org/licenses/by-nc-nd/4.0/?ref=chooser-v1) (End of file - total 7 lines) </content>
<path>/home/byk/Code/byk.github.io/.github/workflows/deploy.yml</path>
<type>file</type>
<content>
1: name: Deploy to GitHub Pages
2:
3: on:
4: push:
5: branches: [master]
6: workflow_dispatch:
7:
8: # Allow this job to clone the repo and create a page deployment
9: permissions:
10: contents: read
11: pages: write
12: id-token: write
13:
14: jobs:
15: build:
16: runs-on: ubuntu-latest
17: steps:
18: - name: Checkout your repository using git
19: uses: actions/checkout@v4
20: - name: Install, build, and upload your site
21: uses: withastro/action@v3
22: with:
23: node-version: 22
24:
25: deploy:
26: needs: build
27: runs-on: ubuntu-latest
28: environment:
29: name: github-pages
30: url: ${{ steps.deployment.outputs.page_url }}
31: steps:
32: - name: Deploy to GitHub Pages
33: id: deployment
34: uses: actions/deploy-pages@v4
(End of file - total 34 ...
<path>/home/byk/Code/byk.github.io/CNAME</path> <type>file</type> <content> 1: byk.im (End of file - total 1 lines) </content>
<path>/home/byk/Code/byk.github.io/frontmatter.json</path>
<type>file</type>
<content>
1: {
2: "$schema": "https://frontmatter.codes/frontmatter.schema.json",
3: "frontMatter.taxonomy.contentTypes": [
4: {
5: "name": "default",
6: "pageBundle": false,
7: "previewPath": "posts/",
8: "filePrefix": null,
9: "fileType": "mdx",
10: "fields": [
11: {
12: "title": "Title",
13: "name": "title",
14: "type": "string"
15: },
16: {
17: "title": "Cover",
18: "name": "image",
19: "type": "image",
20: "isPreviewImage": true
21: },
22: {
23: "title": "Banner",
24: "name": "banner",
25: "type": "image",
26: "isPreviewImage": false
27: },
28: {
29: "title": "Intro",
30: "name": "intro",
31: "type": "string"
32: },
33: {
34: "title": "Author ...
Here is a comprehensive, detailed summary of the entire site.
/home/byk/Code/byk.github.ioThis is Burak Yigit Kaya's personal blog at byk.im — a statically-generated site built with Astro v6 using the Pacamara theme (originally by Maciek Palmowski / Kinsta), deployed to GitHub Pages. Content licensed under CC BY-NC-ND 4.0.
There is one layout file: /home/byk/Code/byk.github.io/src/layouts/Base.astro (63 lines).
Base.astro architecture:
ClientRouter from astro:transitions, SeoHead, Header, Footer components, and ../css/style.css.postData passed down to SeoHead for per-page meta tags.<head> section:
localStorage.darkMode (boolean) to new localStorage.theme (string: "light", "dark"). Applies theme on load via document.documentElement.classList.toggle('dark', ...), listens to OS prefers-color-scheme changes, re-applies on astro:after-swap for view transitions, and exposes window.__applyTheme for the toggle button.view-transition: same-origin, follow.it verification code.<link> pointing to /rss.xml.<SeoHead postData={postData} /> — sets title, description, OG/Twitter card meta.<ClientRouter /> for Astro view transitions.<body>: class font-pacamara-inter transition-all duration-300 bg-white dark:bg-pacamara-dark
<Header /> — sitewide header/nav<slot /> — page content injected here<Footer /> — sitewide footerHow pages extend the layout:
Pages import Base and wrap their content as children:
---
import Base from "../layouts/Base.astro";
---
<Base ...