···11// place files you want to import through the `$lib` alias in this folder.
22+export const fetchMarkdownPosts = async () => {
33+ const allPostFiles = import.meta.glob('/src/posts/*.md');
44+ const iterablePostFiles = Object.entries(allPostFiles);
55+66+ const allPosts = await Promise.all(
77+ iterablePostFiles.map(async ([path, resolver]) => {
88+ const { metadata } = await resolver();
99+ const postPath = path.slice(11, -3);
1010+1111+ return {
1212+ meta: metadata,
1313+ path: postPath
1414+ };
1515+ })
1616+ );
1717+1818+ return allPosts;
1919+};
+15
src/posts/adhd.md
···11+---
22+title: "ADHD"
33+date: "2024-04-30"
44+---
55+I have ADHD. That's probably not too surprising - ADHD is very common, with 4 to 8% of people having it (as far as I can tell from a quick Google search.) Yet despite that, I feel like I am constantly misunderstood.
66+77+First of all, I should clarify that I'm not trying to imply that others don't have it worse - I am *not* trying to compare myself or my experiences to others because I do not have a complete understanding of them either. That said, I think the widespread knowledge and normality of ADHD paradoxically decreases understanding of people with the disability. Because ADHD is treated as being "normal", the collective understanding of its negative effects are understated. You've probably seen "ADHD productivity hacks" or "tips" or whatever - "Make a todo list!!", "Break it down into chunks!!", "Try this medicine!", Just get it over with!" - I've been told all of these things before. But at least for me, **they do not work.** They can help a tiny bit, sometimes, but they certainly can't fix my attention. (Hell, I'm writing this instead of working on my school project that's 2 months late.)
88+99+Most days, I can't focus on a single thing for longer than 15 minutes at a time. Working on something for me looks like opening up my computer, writing a sentence or two, remembering a cool thing I heard about, going to research it and ending up going down a Wikipedia rabbit hole. Eventually I remember what I was working on, so I go and write another sentence - but hey, I don't really like this font. So I go to browse for other fonts and end up learning some typography fundamentals in the process, and now I'm really interested in graphics design. So I install Adobe Illustrator, open up a blank document - and by now I've lost interest. So I go back to the project I'm supposed to be doing but then I wonder if my friend's ever responded to that message I sent them, so I check Discord, and end up researching the history of Unicode to correct a single inconsequential message from a different friend.
1010+1111+I do the same thing when trying out the aforementioned tips - I will spend the entire time finding the best todo list apps and then making multiple todo lists instead of just doing the work. I will restart the same project many times because I don't like my previous ideas any more. In order to break something into chunks I need to break the breaking of the thing into chunks. If I could "just get it done with", I would. As for medical solutions, I've tried multiple different drugs and they all have made me either feel worse - to the point of having complete breakdowns in the evenings, or just not having a noticable difference to my attention.
1212+1313+Yet people keep telling me these things almost every day - my parents, teachers, occupational therapists, physchiatrists. Thinking they have a magic cure or solution that can "fix" me. Maybe these things work for others - maybe having autism in combination with ADHD makes things harder. Maybe I'm doing okay, and the school system is just failing me.
1414+1515+Whatever it is, I'm tired.
+16
src/posts/creativity.md
···11+---
22+title: "Creativity"
33+date: "2024-05-23"
44+---
55+I want to make a video game. I want to get something out into the world, something that gives people the same sort of feeling that I felt when I played other people's games. Something that expresses my emotions in a way that might let people actually understand, at least a little. And I want it to be successful.
66+77+But there are so many games. So many stories already told. It seems like every day a new, unique, critically acclaimed game comes out. How am I supposed to stand out in a landscape like that? How am I supposed to make something that doesn't just get overlooked, ignored by the masses? I'm honestly not sure.
88+99+# Why should I care?
1010+Why should I even be caring about this? I write blog posts regardless of how many people are reading. The process of creating is fulfilling in itself. But I *do* care. I can't help it. And I don't think it's because of greed; money is nice to have but it would be a secondary goal. The reason I want to make something original is because I want to give people a unique experience. I don't want to scream into a void, put all my energy into a game that will never be played. I want to make the world a better place. I want to help people going through hard times. I want to express complex feelings so that maybe someone feeling similar can have something to relate to.
1111+1212+# No more ideas; we have enough
1313+I don't want to come up with the best, most unique, never-before-seen idea in the world, only for it to be underused, executed badly and written off, failing to get the attention it deserves because there's so many others. I need to take other preexisting ideas, merge them, and execute them the best I can. And I need to somehow give people a unique experience from non-unique ideas. I'm not sure how to do that.
1414+1515+# Copyright
1616+How do I take an idea and put it into my game without copying something that already exists? How do I make it different enough to the point where I'm not stealing but I'm also not creating a new idea? How do I find that balance? I don't know.
+10
src/posts/names.md
···11+---
22+title: "Names"
33+date: "2024-03-06"
44+---
55+Names are hard.
66+I don't know what my name is, or what it's going to be.
77+I've tried every one I can think of, but they all feel off somehow.
88+99+I don't have a big takeaway or conclusion to this post.
1010+But I needed to write it down anyways.
+11
src/posts/trans_food.md
···11+---
22+title: "Being trans is like pineapple on pizza"
33+date: "2024-02-13"
44+---
55+If you didn't know, I'm transgender (MtF). Throughout the process of discovering this, I've heard a lot of advice from people in the trans community.
66+77+One common point I see brought up is that "you can't choose whether you're trans or not", and I agree with this - however, I think it can sometimes backfire and make people falsely infer that being transgender is a binary - you're either trans, or you're not, and that there's one correct answer. This can lead to people doubting themselves and worrying that they're faking it or that they're not "truly" trans.
88+99+I've come up with an allegory that I believe does a better job of explaining it - controversial foods. You can't choose whether you're trans in the same way you can't choose which foods you like. You can choose to eat olives or pineapple on pizza even if you don't like the taste of it, but you're not going to enjoy it much. You can choose to identify as a man or a woman or whatever; you can change your pronouns, your name, transition medically - but you won't want to if you're not trans. The only way to find out whether you like a food or not is by trying it or not, and the only way to know your gender is by experimenting. Your brain will tell you if you're doing things wrong.
1010+1111+Like with foods, it's not black or white; You can have a favourite food while still liking others. You can like certain foods only when prepared a certain way. Your tastes can change over time. It's the same with being trans.
···11+---
22+title: "Welcome"
33+date: "2024-01-28"
44+---
55+Welcome to my blog.
66+77+I'm starting it because [Todepond](https://www.todepond.com) told me to.
88+99+I'll post here whenever I have a thought that I'd like to share. I hope you'll find it interesting.
+9
src/posts/writing.md
···11+---
22+title: "Writing"
33+date: "2024-04-29"
44+---
55+[Just](https://todepond.com/wikiblogarden/better-computing/just/) write, they say.
66+77+Just come up with an idea. Figure out how to put it into words. Question whether your idea is good. Question whether your idea is too personal. Wait no this isn't what I meant to say. The words don't express my feelings properly. Will people take offense to this? Wait actually I've changed my mind about this part. Is this original enough? Am I just copying TodePond? Is it weird that I mention them so much in this blog, even though they inspired me to start it? Am I writing for myself or for others? Should I even post this? Will people find this interesting? Do I even know what I'm writing about? Is my grammar correct? *Should* my grammar be correct? This word isn't common enough, I should change it. I've used this word too much, I should change it. I have another great idea but no idea how to express it. What should I name this post? Is that too cringy? Is it clickbait? Is it concise enough?
88+99+Typing is easy. Writing is hard.
···11-<h1>Welcome to SvelteKit</h1>
22-<p>Visit <a href="https://kit.svelte.dev">kit.svelte.dev</a> to read the documentation</p>
11+<script>
22+ import { onMount } from 'svelte';
33+ import { fade } from 'svelte/transition';
44+ export let data;
55+ console.log(data);
66+ let lastUpdated = new Date(data.posts[0].meta.date);
77+ let lastUpdatedString = `${lastUpdated.getDay()}/${lastUpdated.getMonth()}/${lastUpdated.getFullYear()}`;
88+ let messages = [
99+ 'This is a blog. Sometimes I write stuff.',
1010+ 'This is a blog. I write stuff here.',
1111+ 'This is a blog. Occasionally, I write stuff.',
1212+ 'This is a blog. I write stuff here when I feel like it.',
1313+ `This is a blog. It currently has ${data.posts.length} posts.`,
1414+ 'This is a blog. Thank you for reading!',
1515+ 'This is a blog... or is it?',
1616+ 'This is a blog. It is written in Svelte and SvelteKit.',
1717+ `This is a blog. It was last updated on ${lastUpdatedString}.`,
1818+ 'This is, unsurprisingly, a blog.'
1919+ ];
2020+2121+ let message = "This is a blog. This message hasn't loaded yet.";
2222+2323+ onMount(() => {
2424+ message = messages[Math.floor(Math.random() * messages.length)];
2525+ });
2626+</script>
2727+2828+<main>
2929+ <h1>Blog :3</h1>
3030+ <br />
3131+ <p>{message}</p>
3232+ <br />
3333+ <ul>
3434+ {#each data.posts as post}
3535+ <li transition:fade>
3636+ <a href={'/post/' + post.path}>
3737+ {post.meta.title}
3838+ </a>
3939+ </li>
4040+ {/each}
4141+ </ul>
4242+</main>
4343+4444+<style>
4545+ main {
4646+ margin: 0 auto;
4747+ max-width: 750px;
4848+ padding: 2em;
4949+ }
5050+5151+ li {
5252+ list-style: none;
5353+ }
5454+</style>
+12
src/routes/api/posts/+server.js
···11+import { fetchMarkdownPosts } from '$lib';
22+import { json } from '@sveltejs/kit';
33+44+export const GET = async () => {
55+ const allPosts = await fetchMarkdownPosts();
66+77+ const sortedPosts = allPosts.sort((a, b) => {
88+ return new Date(b.meta.date) - new Date(a.meta.date);
99+ });
1010+1111+ return json(sortedPosts);
1212+};
+11
src/routes/post/[slug]/+page.js
···11+export async function load({ params }) {
22+ const post = await import(`$lib/../posts/${params.slug}.md`);
33+ const { title, date } = post.metadata;
44+ const content = post.default;
55+66+ return {
77+ content,
88+ title,
99+ date
1010+ };
1111+}
···11import adapter from '@sveltejs/adapter-auto';
22+import sveltePreprocess from 'svelte-preprocess';
33+import { mdsvex } from 'mdsvex';
2435/** @type {import('@sveltejs/kit').Config} */
46const config = {
···79 // If your environment is not supported, or you settled on a specific environment, switch out the adapter.
810 // See https://kit.svelte.dev/docs/adapters for more information about adapters.
911 adapter: adapter()
1010- }
1212+ },
1313+ extensions: ['.svelte', '.md'],
1414+ preprocess: [
1515+ sveltePreprocess(),
1616+ mdsvex({
1717+ extensions: ['.md']
1818+ })
1919+ ]
1120};
12211313-export default config;
2222+export default config;