fix formatting
This commit is contained in:
File diff suppressed because one or more lines are too long
+11
-11
@@ -1,29 +1,29 @@
|
||||
import alpinejs from "@astrojs/alpinejs";
|
||||
import alpinejs from '@astrojs/alpinejs';
|
||||
|
||||
// https://astro.build/config
|
||||
import mdx from "@astrojs/mdx";
|
||||
import { defineConfig } from "astro/config";
|
||||
import pagefind from "astro-pagefind";
|
||||
import mdx from '@astrojs/mdx';
|
||||
import { defineConfig } from 'astro/config';
|
||||
import pagefind from 'astro-pagefind';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: "https://ghall.space",
|
||||
output: "static",
|
||||
site: 'https://ghall.space',
|
||||
output: 'static',
|
||||
markdown: {
|
||||
shikiConfig: {
|
||||
themes: {
|
||||
light: "github-light",
|
||||
dark: "github-dark",
|
||||
light: 'github-light',
|
||||
dark: 'github-dark',
|
||||
},
|
||||
},
|
||||
},
|
||||
integrations: [
|
||||
mdx(),
|
||||
alpinejs({ entrypoint: "/src/entrypoint" }),
|
||||
alpinejs({ entrypoint: '/src/entrypoint' }),
|
||||
pagefind(),
|
||||
],
|
||||
redirects: {
|
||||
"/posts/[...slug]": "/blog/[...slug]",
|
||||
"/blog": "/blog/page/1",
|
||||
'/posts/[...slug]': '/blog/[...slug]',
|
||||
'/blog': '/blog/page/1',
|
||||
},
|
||||
});
|
||||
|
||||
+3
-1
@@ -9,7 +9,9 @@
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro",
|
||||
"lint": "eslint --ext .js --ext .ts --ext .astro"
|
||||
"check:lint": "eslint --ext .js --ext .ts --ext .astro",
|
||||
"check:format": "prettier . --check",
|
||||
"format": "prettier . --write"
|
||||
},
|
||||
"dependencies": {
|
||||
"@alpinejs/persist": "^3.15.1",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import { Image } from "astro:assets";
|
||||
import { Image } from 'astro:assets';
|
||||
|
||||
import portrait from "../assets/portrait.jpg";
|
||||
import portrait from '../assets/portrait.jpg';
|
||||
|
||||
interface Props {
|
||||
size: number;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import { add, format } from "date-fns";
|
||||
import { add, format } from 'date-fns';
|
||||
|
||||
import CalendarIcon from "@assets/svg/calendar.svg";
|
||||
import CalendarIcon from '@assets/svg/calendar.svg';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
@@ -16,7 +16,7 @@ const { title, date, slug } = Astro.props;
|
||||
{slug ? <a href={`/blog/${slug}`}>{title}</a> : <h1>{title}</h1>}
|
||||
<div>
|
||||
<CalendarIcon class="calendar-icon" width={24} height={24} />
|
||||
<strong>{format(add(new Date(date), { hours: 6 }), "MMM do, y")}</strong>
|
||||
<strong>{format(add(new Date(date), { hours: 6 }), 'MMM do, y')}</strong>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
import type { CollectionEntry } from "astro:content";
|
||||
import BlogHeader from "./BlogHeader.astro";
|
||||
import Tags from "./Tags.astro";
|
||||
import type { CollectionEntry } from 'astro:content';
|
||||
import BlogHeader from './BlogHeader.astro';
|
||||
import Tags from './Tags.astro';
|
||||
|
||||
interface Props {
|
||||
post: CollectionEntry<"blog">;
|
||||
post: CollectionEntry<'blog'>;
|
||||
}
|
||||
|
||||
const { post } = Astro.props;
|
||||
|
||||
@@ -13,7 +13,7 @@ const { tags } = Astro.props;
|
||||
<a class="tag" href={`/blog/tag/${tag}`}>
|
||||
{tag}
|
||||
</a>
|
||||
{index < tags.length - 1 ? " | " : ""}
|
||||
{index < tags.length - 1 ? ' | ' : ''}
|
||||
</>
|
||||
))
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import MastodonIcon from "../assets/svg/mastodon.svg";
|
||||
import RssIcon from "../assets/svg/rss.svg";
|
||||
import ThemeToggle from "./ThemeToggle.astro";
|
||||
import MastodonIcon from '../assets/svg/mastodon.svg';
|
||||
import RssIcon from '../assets/svg/rss.svg';
|
||||
import ThemeToggle from './ThemeToggle.astro';
|
||||
|
||||
const year = new Date().getFullYear();
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import BarsIcon from "../../assets/svg/bars.svg";
|
||||
import CloseIcon from "../../assets/svg/xmark.svg";
|
||||
import { navLinks } from "../../data/nav-links";
|
||||
import BarsIcon from '../../assets/svg/bars.svg';
|
||||
import CloseIcon from '../../assets/svg/xmark.svg';
|
||||
import { navLinks } from '../../data/nav-links';
|
||||
---
|
||||
|
||||
<!-- drawerOpened is defined in /src/layouts/Layout.astro -->
|
||||
@@ -39,7 +39,7 @@ import { navLinks } from "../../data/nav-links";
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
@use "../../styles/variables.scss" as *;
|
||||
@use '../../styles/variables.scss' as *;
|
||||
|
||||
.drawer-container {
|
||||
display: none;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import Drawer from "./Drawer.astro";
|
||||
import Nav from "./Nav.astro";
|
||||
import Drawer from './Drawer.astro';
|
||||
import Nav from './Nav.astro';
|
||||
---
|
||||
|
||||
<header>
|
||||
@@ -15,7 +15,7 @@ import Nav from "./Nav.astro";
|
||||
</header>
|
||||
|
||||
<style lang="scss">
|
||||
@use "../../styles/variables.scss" as *;
|
||||
@use '../../styles/variables.scss' as *;
|
||||
|
||||
header {
|
||||
margin-bottom: 20px;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
import { navLinks } from "../../data/nav-links";
|
||||
import { navLinks } from '../../data/nav-links';
|
||||
---
|
||||
|
||||
<nav>
|
||||
@@ -15,7 +15,7 @@ import { navLinks } from "../../data/nav-links";
|
||||
</nav>
|
||||
|
||||
<style lang="scss">
|
||||
@use "../../styles/variables.scss" as *;
|
||||
@use '../../styles/variables.scss' as *;
|
||||
|
||||
ul {
|
||||
display: flex;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
@use "../styles/variables.scss" as *;
|
||||
@use '../styles/variables.scss' as *;
|
||||
|
||||
.mastodon-post {
|
||||
margin: 2rem auto;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { defineCollection, z } from "astro:content";
|
||||
import { glob } from "astro/loaders";
|
||||
import { defineCollection, z } from 'astro:content';
|
||||
import { glob } from 'astro/loaders';
|
||||
|
||||
const blogCollection = defineCollection({
|
||||
loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }),
|
||||
loader: glob({ pattern: '**/*.md', base: './src/content/blog' }),
|
||||
schema: z.object({
|
||||
title: z.string(),
|
||||
pubDate: z.string().transform((str: string) => new Date(str)),
|
||||
|
||||
@@ -12,7 +12,7 @@ I've never been a Gundam fan, the genre just never really appealed to me. But I
|
||||
|
||||
So, there was a little anime I watched back in high school called [Full Metal Panic](https://en.wikipedia.org/wiki/Full_Metal_Panic!) which, like Gundam, features people piloting giant mecha. As luck would have it, Bandai, the makers of Gunpla kits, have/had the license to make kits for the series. Not-so-luckily, the kit I wanted based on the main character's mech is impossible to find at a reasonable price at the moment, so I settled for my second pick:
|
||||
|
||||

|
||||

|
||||
|
||||
So, with the kit in hand, I opened the box and was greeted by a handful of plastic pouches containing what seemed like a thousand parts connected on plastic sprues in a variety of blues and grays. I took out the contents and perused through the included instructions, which read very much like it was designed by Ikea, if Ikea sold miniature giant robots. The writing was all in Japanese, but the illustrations were enough to guide one through the process no matter what language they can read.
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ title: 'AI & Creativity'
|
||||
pubDate: '11/11/24'
|
||||
tags: ['Tech', 'Creativity']
|
||||
---
|
||||
|
||||
Recently, I’ve been pondering generative AI and its effects. Not on jobs, the economy, or even the damage it’s done to our ability to trust information we see online (whether it’s something generated by a malicious actor looking to mislead, or a simple “hallucination” causing an innocent mistake). No, I’ve been pondering its effects on human creativity, and our capacity to learn and grow as creative creatures. This is something I’ve had in the back of my mind for a quite a while, and I think I’ve finally reached a point where I can put my feelings into words.
|
||||
|
||||
My experience with generative AI started way back at the end of 2022 with [an AI-assisted dating profile](https://ghall.blog/posts/2022/creating-a-dating-profile-with-ai/). Just over a month later, I posted a [follow up](https://ghall.blog/posts/2023/an-update-on-my-ai-dating-profile/), in which I said the following:
|
||||
|
||||
@@ -25,4 +25,5 @@ While any code getting shipped to the browser will still need to be compiled to
|
||||
I started off being annoyed with using types in my code because, to be quite frank, they are annoying. They'll make your code throw errors whenever you try to multiply a string, or something silly like that. But that's part of the beauty I've come to appreciate. They're there to help you write better code, and to point you in the right direction when something inevitably goes wrong.
|
||||
|
||||
[^1]: [Here](https://stackoverflow.com/questions/1517582/what-is-the-difference-between-statically-typed-and-dynamically-typed-languages) is a StackOverflow thread on the difference between dynamic and static typing put far better than I ever could explain it
|
||||
|
||||
[^2]: As an example, I rewrote [my CLI clone of Wordle](https://github.com/ghall89/wordle-cli) in TypeScript
|
||||
|
||||
@@ -3,6 +3,7 @@ title: 'Announcing AutoDock'
|
||||
pubDate: '1/17/25'
|
||||
tags: ['MacOS', 'Apps', 'Programming']
|
||||
---
|
||||
|
||||
I'm a MacBook Air user who often uses a larger external display, and I have a, perhaps, idiosyncratic desire to have the dock always visible on the larger display at my desk, but prefer it hidden when using the smaller, built-in one.
|
||||
|
||||
While it's not all that inconvenient to manually swap the dock with a quick <kbd>opt</kbd> + <kbd>cmd</kbd> + <kbd>D</kbd>, I thought it would be cool to automate the process based on display size. I looked around for an app that would do this, and couldn't find one that worked reliably.
|
||||
|
||||
@@ -3,6 +3,7 @@ title: 'Skip the Algorithm: Be Your Own Online Curator'
|
||||
pubDate: '3/1/25'
|
||||
tags: ['Tech', 'Mindfulness', 'Apps']
|
||||
---
|
||||
|
||||
Ever since I started using Mastodon, I've become a lot more interested in reducing the presence of algorithmic content in my digital life. I've never been particularly thrilled with algorithmic feeds of content. I was among the people who was quite furious when Instagram ditched the chronological timeline, and then started inserting content from accounts I didn't even follow.
|
||||
|
||||
Somewhere along the line, I think I just started accepting what I assumed was inevitable. I think I was probably naive, and didn't consider the ills – both social and psychological – that resulted algorithmically curated content. It was just an annoying thing that I just had to accept.
|
||||
|
||||
@@ -10,26 +10,26 @@ The Switch is also the console I’ve played the most games on, so I thought it
|
||||
|
||||
Also, I listed them in alphabetical order partly because I couldn’t decide on a ranking, but mostly because it makes my brain happy. 🧠
|
||||
|
||||
* A Short Hike
|
||||
* Animal Crossing: New Horizons
|
||||
* Fire Emblem Engage
|
||||
* Hades
|
||||
* Kirby and the Forgotten Land
|
||||
* The Legend of Zelda: Tears of the Kingdom
|
||||
* Metroid Dread
|
||||
* Persona 5 Royal
|
||||
* Pokemon Legends: Arceus
|
||||
* Sea of Stars
|
||||
* Shantae and the Seven Sirens
|
||||
* Splatoon 3
|
||||
* Super Mario Odyssey
|
||||
* Super Mario Wonder
|
||||
* Super Smash Bros Ultimate
|
||||
* Tetris 99
|
||||
* Unicorn Overlord
|
||||
* The Witcher 3: Wild Hunt
|
||||
* Xenoblade Chronicles 3
|
||||
* Yooka-Laylee and the Impossible Lair
|
||||
- A Short Hike
|
||||
- Animal Crossing: New Horizons
|
||||
- Fire Emblem Engage
|
||||
- Hades
|
||||
- Kirby and the Forgotten Land
|
||||
- The Legend of Zelda: Tears of the Kingdom
|
||||
- Metroid Dread
|
||||
- Persona 5 Royal
|
||||
- Pokemon Legends: Arceus
|
||||
- Sea of Stars
|
||||
- Shantae and the Seven Sirens
|
||||
- Splatoon 3
|
||||
- Super Mario Odyssey
|
||||
- Super Mario Wonder
|
||||
- Super Smash Bros Ultimate
|
||||
- Tetris 99
|
||||
- Unicorn Overlord
|
||||
- The Witcher 3: Wild Hunt
|
||||
- Xenoblade Chronicles 3
|
||||
- Yooka-Laylee and the Impossible Lair
|
||||
|
||||
I opted to stay away from remasters/remakes, but as a bonus here are the ones that stood out to me…
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ Unlike Arc, and indeed unlike most browsers these days, Zen doesn’t use Chromi
|
||||
|
||||
On the web dev side, I’ve found the developer tools to be…fine. I’ve used the Firefox dev tools in the past, so I’m comfortable with them, and it didn’t take me long to adjust. While I much prefer the Chromium dev tools (which is about the only thing I _like_ about Chromium), I don’t find the Gecko dev tools that much worse. Which is more than I can say about Safari’s dev tools. 😬
|
||||
|
||||
Another major positive is battery life. I’d become somewhat used to the less-than-ideal battery life I was getting with Arc, and slightly less so than Vivaldi. But after switching to Zen, I started to notice my battery was lasting quite a bit longer. As I write this (with Zen open in the background), my M2 MacBook Air is at about 88% battery, with 11 hours remaining. I know in practice it won’t *actually* last 11 hours, but that’s higher than any estimation that I can recall ever getting using a Chromium-based browser. In practice, it means that, generally, depending on which Node environments I have to run locally that day, I can make it through an entire 8 hour workday, with a bit to spare.
|
||||
Another major positive is battery life. I’d become somewhat used to the less-than-ideal battery life I was getting with Arc, and slightly less so than Vivaldi. But after switching to Zen, I started to notice my battery was lasting quite a bit longer. As I write this (with Zen open in the background), my M2 MacBook Air is at about 88% battery, with 11 hours remaining. I know in practice it won’t _actually_ last 11 hours, but that’s higher than any estimation that I can recall ever getting using a Chromium-based browser. In practice, it means that, generally, depending on which Node environments I have to run locally that day, I can make it through an entire 8 hour workday, with a bit to spare.
|
||||
|
||||
The biggest downsides are the inability to access DRM’d content online, specifically on streaming services (I’ve been swapping to Safari to get my Andor and Doctor Who fix), and the fact that the iCloud Keychain extension doesn't work (though I've heard through the internet grapevine a fix is coming). Also, the fun – and I will admit, relatively obnoxious – animations on this site do not work, but that should be remedied whenever Firefox fully implements the View Transition API.
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ title: 'The New ghall.space'
|
||||
pubDate: '9/1/25'
|
||||
tags: ['Meta', 'Programming', 'Web Dev']
|
||||
---
|
||||
|
||||
It's been a while since I originally built this website, which started life as a little project to learn the, at the time, brand new web framework Astro. My skills in web development have improved greatly in that time, as has the functionality of the Astro framework. Therefore, I thought it would be a fun project to make some improvements to the site, both visually and in how the codebase is structured.
|
||||
|
||||
One of the biggest front-facing changes I've made, aside from new typography and some layout adjustments, is a mobile-responsive navigation bar. Mobile is always something I've been conscious of when building this site, but I opted for a simplified approach by ensuring the site was usable on mobile without introducing many responsive elements. But as the site morphed from a simple blog to a more generalized space on the internet (hence the ".space" TLD), I've discovered the limits of that design philosophy.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: 'Tinkering With Linux'
|
||||
pubDate: '10/27/25'
|
||||
tags: ['Tech', 'Linux' ]
|
||||
tags: ['Tech', 'Linux']
|
||||
---
|
||||
|
||||
For the last 8 or 9 months, I've been experimenting on and off with Linux. Specifically Fedora (via Asahi Linux) for those who are curious. I installed it on an M1 MacBook Air, which I keep around as an emergency backup, and I've been mostly pleased with how well it's been running.
|
||||
@@ -41,5 +41,7 @@ I do, however, have some questions for the Linux community if any of you haven't
|
||||
Feel free to reach out to me on [Mastodon](https://mastodon.social/@ghalldev).
|
||||
|
||||
[^1]: However, to continue my series of gimicky posts, like when I [wrote about the Mac using Mac OS 7](/blog/2024/ramblings-on-the-macintosh), and [wrote about taking intentional analog time with pen and paper](/blog/2025/intentional-analog-time), I'm writing this blog post in Linux.
|
||||
|
||||
[^2]: This annoyingly does not work for all apps, but I'm probably missing something obvious.
|
||||
|
||||
[^3]: Of note, the Plasma shell itself seems to be the most memory intensive process, using about 500MB of RAM, which seems more than reasonable.
|
||||
|
||||
@@ -4,8 +4,8 @@ export interface NavLink {
|
||||
}
|
||||
|
||||
export const navLinks: NavLink[] = [
|
||||
{ label: "Blog", path: "blog/page/1" },
|
||||
{ label: "Now", path: "now" },
|
||||
{ label: "Projects", path: "projects" },
|
||||
{ label: "Search", path: "search" },
|
||||
{ label: 'Blog', path: 'blog/page/1' },
|
||||
{ label: 'Now', path: 'now' },
|
||||
{ label: 'Projects', path: 'projects' },
|
||||
{ label: 'Search', path: 'search' },
|
||||
];
|
||||
|
||||
+12
-12
@@ -1,6 +1,6 @@
|
||||
import autodockImg from "@assets/projects/autodock.png";
|
||||
import bggClientImg from "@assets/projects/bgg-client.png";
|
||||
import keystashImg from "@assets/projects/keystash.png";
|
||||
import autodockImg from '@assets/projects/autodock.png';
|
||||
import bggClientImg from '@assets/projects/bgg-client.png';
|
||||
import keystashImg from '@assets/projects/keystash.png';
|
||||
|
||||
export interface Project {
|
||||
title: string;
|
||||
@@ -11,24 +11,24 @@ export interface Project {
|
||||
|
||||
export const projects: Project[] = [
|
||||
{
|
||||
title: "AutoDock",
|
||||
title: 'AutoDock',
|
||||
description:
|
||||
"A MacOS menubar utility for automatically hiding and showing the Dock based on the screen size of the connected displays.",
|
||||
'A MacOS menubar utility for automatically hiding and showing the Dock based on the screen size of the connected displays.',
|
||||
image: autodockImg,
|
||||
link: "https://github.com/ghall89/AutoDock",
|
||||
link: 'https://github.com/ghall89/AutoDock',
|
||||
},
|
||||
{
|
||||
title: "KeyStash",
|
||||
title: 'KeyStash',
|
||||
description:
|
||||
"A MacOS application for managing software license keys for software purchased outside the Mac App Store.",
|
||||
'A MacOS application for managing software license keys for software purchased outside the Mac App Store.',
|
||||
image: keystashImg,
|
||||
link: "https://github.com/ghall89/KeyStash",
|
||||
link: 'https://github.com/ghall89/KeyStash',
|
||||
},
|
||||
{
|
||||
title: "bgg-client",
|
||||
title: 'bgg-client',
|
||||
description:
|
||||
"A TypeScript client for working with the BoardGameGeek.com API.",
|
||||
'A TypeScript client for working with the BoardGameGeek.com API.',
|
||||
image: bggClientImg,
|
||||
link: "https://www.npmjs.com/package/bgg-client",
|
||||
link: 'https://www.npmjs.com/package/bgg-client',
|
||||
},
|
||||
];
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import persist from "@alpinejs/persist";
|
||||
import type { Alpine } from "alpinejs";
|
||||
import persist from '@alpinejs/persist';
|
||||
import type { Alpine } from 'alpinejs';
|
||||
|
||||
export default (Alpine: Alpine) => {
|
||||
Alpine.plugin(persist);
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
/// <reference path="../.astro/types.d.ts" />
|
||||
/// <reference types="astro/client" />
|
||||
interface Window {
|
||||
Alpine: import("alpinejs").Alpine;
|
||||
Alpine: import('alpinejs').Alpine;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
import { ClientRouter } from "astro:transitions";
|
||||
import { ClientRouter } from 'astro:transitions';
|
||||
|
||||
import "../styles/global.scss";
|
||||
import '../styles/global.scss';
|
||||
|
||||
import Footer from "@components/Footer.astro";
|
||||
import Header from "@components/Header/Header.astro";
|
||||
import Footer from '@components/Footer.astro';
|
||||
import Header from '@components/Header/Header.astro';
|
||||
|
||||
export interface Props {
|
||||
title: string;
|
||||
@@ -13,7 +13,7 @@ export interface Props {
|
||||
};
|
||||
}
|
||||
|
||||
const title = Astro.props.title || Astro.props.frontmatter?.title || "Unknown";
|
||||
const title = Astro.props.title || Astro.props.frontmatter?.title || 'Unknown';
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
---
|
||||
import { Image } from "astro:assets";
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import { Image } from 'astro:assets';
|
||||
import Layout from '@layouts/Layout.astro';
|
||||
|
||||
import DataGif from "../assets/it-does-not-exist.gif";
|
||||
import DataGif from '../assets/it-does-not-exist.gif';
|
||||
---
|
||||
|
||||
<Layout title="Not Found">
|
||||
@@ -15,7 +15,7 @@ import DataGif from "../assets/it-does-not-exist.gif";
|
||||
</Layout>
|
||||
|
||||
<style lang="scss">
|
||||
@use "../styles/variables.scss" as *;
|
||||
@use '../styles/variables.scss' as *;
|
||||
|
||||
h2 {
|
||||
text-align: center;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
import { getCollection, render } from "astro:content";
|
||||
import BlogHeader from "@components/Blog/BlogHeader.astro";
|
||||
import Tags from "@components/Blog/Tags.astro";
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import { getCollection, render } from 'astro:content';
|
||||
import BlogHeader from '@components/Blog/BlogHeader.astro';
|
||||
import Tags from '@components/Blog/Tags.astro';
|
||||
import Layout from '@layouts/Layout.astro';
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getCollection("blog");
|
||||
const posts = await getCollection('blog');
|
||||
return posts.map((post) => ({
|
||||
params: { slug: post.id },
|
||||
props: { post },
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
---
|
||||
import { type CollectionEntry, getCollection } from "astro:content";
|
||||
import PostPreview from "@components/Blog/PostPreview.astro";
|
||||
import { type CollectionEntry, getCollection } from 'astro:content';
|
||||
import PostPreview from '@components/Blog/PostPreview.astro';
|
||||
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import type { Page } from "astro";
|
||||
import Layout from '@layouts/Layout.astro';
|
||||
import type { Page } from 'astro';
|
||||
|
||||
export async function getStaticPaths({ paginate }) {
|
||||
const allPosts = await getCollection("blog");
|
||||
const allPosts = await getCollection('blog');
|
||||
|
||||
allPosts.sort(
|
||||
(a, b) =>
|
||||
Date.parse(String(b.data.pubDate)) - Date.parse(String(a.data.pubDate)),
|
||||
Date.parse(String(b.data.pubDate)) - Date.parse(String(a.data.pubDate))
|
||||
);
|
||||
|
||||
return paginate(allPosts, { pageSize: 10 });
|
||||
}
|
||||
|
||||
interface Props {
|
||||
page: Page<CollectionEntry<"blog">>;
|
||||
page: Page<CollectionEntry<'blog'>>;
|
||||
}
|
||||
|
||||
const { page } = Astro.props;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import { add, format } from "date-fns";
|
||||
import { getCollection } from 'astro:content';
|
||||
import Layout from '@layouts/Layout.astro';
|
||||
import { add, format } from 'date-fns';
|
||||
|
||||
export async function getStaticPaths() {
|
||||
const posts = await getCollection("blog");
|
||||
const posts = await getCollection('blog');
|
||||
|
||||
const tags = ["all"];
|
||||
const tags = ['all'];
|
||||
|
||||
posts.forEach((post) => {
|
||||
post.data.tags.forEach((tag) => {
|
||||
@@ -24,12 +24,12 @@ export async function getStaticPaths() {
|
||||
|
||||
const { tag }: { tag?: string } = Astro.params;
|
||||
|
||||
const posts = await getCollection("blog", ({ data }) => {
|
||||
const posts = await getCollection('blog', ({ data }) => {
|
||||
if (!tag) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tag === "all") {
|
||||
if (tag === 'all') {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -37,12 +37,12 @@ const posts = await getCollection("blog", ({ data }) => {
|
||||
});
|
||||
|
||||
if (posts.length === 0) {
|
||||
return Astro.redirect("/404");
|
||||
return Astro.redirect('/404');
|
||||
}
|
||||
|
||||
posts.sort(
|
||||
(a, b) =>
|
||||
Date.parse(String(b.data.pubDate)) - Date.parse(String(a.data.pubDate)),
|
||||
Date.parse(String(b.data.pubDate)) - Date.parse(String(a.data.pubDate))
|
||||
);
|
||||
---
|
||||
|
||||
@@ -56,7 +56,7 @@ posts.sort(
|
||||
<span>
|
||||
{format(
|
||||
add(new Date(post.data.pubDate), { hours: 6 }),
|
||||
"MMM do, y",
|
||||
'MMM do, y'
|
||||
)}
|
||||
</span>
|
||||
</li>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
---
|
||||
export const prerender = true;
|
||||
|
||||
import { getCollection } from "astro:content";
|
||||
import Avatar from "@components/Avatar.astro";
|
||||
import LatestPost from "@components/LatestPost.astro";
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import BlueskyIcon from "../assets/svg/bluesky.svg";
|
||||
import MastodonIcon from "../assets/svg/mastodon.svg";
|
||||
import { getCollection } from 'astro:content';
|
||||
import Avatar from '@components/Avatar.astro';
|
||||
import LatestPost from '@components/LatestPost.astro';
|
||||
import Layout from '@layouts/Layout.astro';
|
||||
import BlueskyIcon from '../assets/svg/bluesky.svg';
|
||||
import MastodonIcon from '../assets/svg/mastodon.svg';
|
||||
|
||||
const iconSize = 16;
|
||||
const posts = await getCollection("blog");
|
||||
const posts = await getCollection('blog');
|
||||
|
||||
const latestPost = posts.sort(
|
||||
(a, b) =>
|
||||
new Date(b.data.pubDate).valueOf() - new Date(a.data.pubDate).valueOf(),
|
||||
new Date(b.data.pubDate).valueOf() - new Date(a.data.pubDate).valueOf()
|
||||
)[0];
|
||||
---
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
import Card from "@components/Card.astro";
|
||||
import { projects } from "@data/projects";
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import Card from '@components/Card.astro';
|
||||
import { projects } from '@data/projects';
|
||||
import Layout from '@layouts/Layout.astro';
|
||||
|
||||
const title = "Projects";
|
||||
const title = 'Projects';
|
||||
---
|
||||
|
||||
<Layout title={title}>
|
||||
@@ -16,7 +16,7 @@ const title = "Projects";
|
||||
image={project.image}
|
||||
links={[
|
||||
{
|
||||
label: "More...",
|
||||
label: 'More...',
|
||||
href: project.link,
|
||||
newWindow: true,
|
||||
},
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { getCollection } from "astro:content";
|
||||
import rss from "@astrojs/rss";
|
||||
import MarkdownIt from "markdown-it";
|
||||
import { getCollection } from 'astro:content';
|
||||
import rss from '@astrojs/rss';
|
||||
import MarkdownIt from 'markdown-it';
|
||||
|
||||
const parser = new MarkdownIt({ html: true });
|
||||
|
||||
export async function GET(context) {
|
||||
const blog = await getCollection("blog");
|
||||
const blog = await getCollection('blog');
|
||||
return rss({
|
||||
title: "ghall.space",
|
||||
title: 'ghall.space',
|
||||
description:
|
||||
"My personal blog about life, gaming, tech, and whatever else I feel like writing about.",
|
||||
'My personal blog about life, gaming, tech, and whatever else I feel like writing about.',
|
||||
site: context.site,
|
||||
trailingSlash: false,
|
||||
items: blog
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import SearchField from "astro-pagefind/components/Search";
|
||||
import Layout from '@layouts/Layout.astro';
|
||||
import SearchField from 'astro-pagefind/components/Search';
|
||||
---
|
||||
|
||||
<Layout title="Search">
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
@font-face {
|
||||
font-family: "Noto Sans";
|
||||
src: url("./fonts/NotoSans-VariableFont_wdth,wght.ttf") format("truetype");
|
||||
font-family: 'Noto Sans';
|
||||
src: url('./fonts/NotoSans-VariableFont_wdth,wght.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Noto Serif";
|
||||
src: url("./fonts/NotoSerif-VariableFont_wdth,wght.ttf") format("truetype");
|
||||
font-family: 'Noto Serif';
|
||||
src: url('./fonts/NotoSerif-VariableFont_wdth,wght.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "JetBrainsMono";
|
||||
src: url("./fonts/JetBrainsMono-VariableFont_wght.ttf") format("truetype");
|
||||
font-family: 'JetBrainsMono';
|
||||
src: url('./fonts/JetBrainsMono-VariableFont_wght.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@use "./variables.scss" as *;
|
||||
@use "fonts.scss";
|
||||
@use './variables.scss' as *;
|
||||
@use 'fonts.scss';
|
||||
|
||||
:root {
|
||||
--blue: #1e66f5;
|
||||
@@ -10,7 +10,7 @@
|
||||
--highlight: #ffeebd;
|
||||
--background: #fffdf5;
|
||||
--border: #{$border-style} #8f7a20;
|
||||
--font: "Noto Sans", sans-serif;
|
||||
--font: 'Noto Sans', sans-serif;
|
||||
}
|
||||
|
||||
.theme-dark {
|
||||
@@ -24,7 +24,7 @@
|
||||
}
|
||||
|
||||
.serif-text {
|
||||
--font: "Noto Serif", serif;
|
||||
--font: 'Noto Serif', serif;
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
Reference in New Issue
Block a user