Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
uses: actions/checkout@v4
- name: Install & Build
uses: withastro/action@v2
with:
package-manager: bun@latest

- name: Test
run: bun test
- name: Format Check
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ The newsletters while not currently being displayed render out to `/newsletter/Y

```mdx
---
title: We've Launched
draft: false
description: Ladybird browser initiative launched
date: 2024-07-09
---
Expand Down
11 changes: 7 additions & 4 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import tailwindcss from "@tailwindcss/vite";
import sitemap from "@astrojs/sitemap";

import mdx from "@astrojs/mdx";

// https://astro.build/config
export default defineConfig({
site: "https://ladybird.org",
integrations: [tailwind(), sitemap(), mdx()],
vite: {
plugins: [tailwindcss()],
},
integrations: [sitemap(), mdx()],
// Special case the initial posts from before the astro transition.
// These are the super-SEO'd links that were shared around.
redirects: {
Expand All @@ -21,6 +23,7 @@ export default defineConfig({
"/why-ladybird": "/posts/why-ladybird",
"/why-ladybird.html": "/posts/why-ladybird",
"/wire.pdf": "/organization#bank-details",
"/posts.xml": "/posts.rss",
"/posts.xml": "/feed.rss",
"/posts.rss": "/feed.rss",
},
});
985 changes: 985 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

Binary file removed bun.lockb
Binary file not shown.
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ladybird.org",
"module": "index.ts",
"type": "module",
"packageManager": "[email protected]",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
Expand All @@ -15,19 +15,18 @@
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.10",
"@tailwindcss/typography": "^0.5.16",
"@tailwindcss/vite": "^4.1.8",
"@types/bun": "latest",
"fast-xml-parser": "^4.5.3",
"kleur": "^4.1.5",
"fast-xml-parser": "^5.2.3",
"prettier": "^3.5.3",
"prettier-plugin-astro": "^0.14.1"
},
"dependencies": {
"@astrojs/mdx": "3.1.3",
"@astrojs/mdx": "^4.3.0",
"@astrojs/rss": "^4.0.11",
"@astrojs/sitemap": "^3.4.0",
"@astrojs/tailwind": "^5.1.5",
"@astrojs/ts-plugin": "^1.10.4",
"astro": "^4.16.18",
"tailwindcss": "^3.4.17"
"astro": "^5.9.0",
"tailwindcss": "^4.1.8"
}
}
2 changes: 1 addition & 1 deletion src/components/global/footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
</a>

<a
href="https://ladybird.org/posts.rss"
href="/feed.rss"
class="w-8 h-8 flex items-center justify-center rounded-full bg-[#16141b] hover:bg-[#8a64e5]"
>
<img src="/assets/img/rss.svg" alt="RSS" />
Expand Down
9 changes: 8 additions & 1 deletion src/components/landing/sponsors.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
---
const sponsors = [
const sponsors: {
name: string;
sponsors: {
name: string;
href?: string;
logo?: string;
}[];
}[] = [
{
name: "Platinum",
sponsors: [
Expand Down
5 changes: 3 additions & 2 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ const posts = defineCollection({
}),
});

const newsletter = defineCollection({
const newsletters = defineCollection({
type: "content",
schema: z.object({
title: z.string().max(50),
description: z.string().max(280),
date: z.date(),
draft: z.boolean().optional(),
Expand All @@ -23,5 +24,5 @@ const newsletter = defineCollection({

export const collections = {
posts,
newsletter,
newsletters,
};
1 change: 1 addition & 0 deletions src/content/newsletters/2024-07-09.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Demo Newsletter
description: Ladybird browser initiative launched
date: 2024-07-09
draft: true
Expand Down
1 change: 1 addition & 0 deletions src/content/newsletters/2024-07-20.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
title: Launch Announcement
description: Ladybird browser initiative launched
date: 2024-07-20
draft: true
Expand Down
2 changes: 1 addition & 1 deletion src/content/newsletters/2024-08-31.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: This Month in Ladybird - August 2024
description: ?
description: ""
date: 2024-08-31
draft: false
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/newsletters/2024-09-30.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: This Month in Ladybird - September 2024
description: ?
description: ""
date: 2024-09-30
draft: false
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/newsletters/2024-10-31.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: This Month in Ladybird - October 2024
description: ?
description: ""
date: 2024-10-31
draft: false
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/newsletters/2024-11-30.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: This Month in Ladybird - November 2024
description: ?
description: ""
date: 2024-11-30
draft: false
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/newsletters/2024-12-31.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: This Month in Ladybird - December 2024
description: ?
description: ""
date: 2024-12-31
draft: false
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/newsletters/2025-01-31.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: This Month in Ladybird - January 2025
description: ?
description: ""
date: 2025-01-31
draft: false
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/newsletters/2025-02-28.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: This Month in Ladybird - February 2025
description: ?
description: ""
date: 2025-02-28
draft: false
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/newsletters/2025-03-31.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: This Month in Ladybird - March 2025
description: ?
description: ""
date: 2025-03-31
draft: false
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/newsletters/2025-04-30.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: This Month in Ladybird - April 2025
description: ?
description: ""
date: 2025-04-30
draft: false
---
Expand Down
2 changes: 1 addition & 1 deletion src/content/newsletters/2025-05-31.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: This Month in Ladybird - May 2025
description: ?
description: ""
date: 2025-05-31
draft: false
---
Expand Down
40 changes: 40 additions & 0 deletions src/pages/feed.rss.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import rss from "@astrojs/rss";
import { getCollection } from "astro:content";
import type { APIContext } from "astro";

export async function GET(context: APIContext) {
const newsletters = await getCollection("newsletters");
const posts = await getCollection("posts");

const newsletterItems = newsletters
.filter((post) => post.data.draft === false)
.map((post) => ({
title: post.data.title,
description: post.data.description,
pubDate: post.data.date,
link: `/newsletter/${post.slug}`,
}));

const postItems = posts
.filter((post) => post.data.type !== "Hidden")
.map((post) => ({
title: post.data.title,
description: post.data.description,
author: post.data.author,
pubDate: post.data.date,
categories: [post.data.type],
link: `/posts/${post.slug}`,
}));

const allItems = [...newsletterItems, ...postItems].sort(
(a, b) => new Date(b.pubDate).getTime() - new Date(a.pubDate).getTime()
);

return rss({
title: "Ladybird Browser",
description: "Ladybird is a brand-new browser &amp; web engine",
site: context.site ?? "https://ladybird.org",
items: allItems,
trailingSlash: false,
});
}
23 changes: 0 additions & 23 deletions src/pages/posts.rss.ts

This file was deleted.

23 changes: 18 additions & 5 deletions src/styles/global.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";
@plugin "@tailwindcss/typography";
@plugin "@tailwindcss/forms";

@theme {
--color-black: #0e0e0e;
--color-white: #d8e7e7;

--font-family-sans:
Inter, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-family-display:
ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
}

@media (prefers-color-scheme: dark) {
:root {
Expand Down Expand Up @@ -143,7 +155,8 @@ a {
transition: all 0.5s ease;
}

header a, footer a {
header a,
footer a {
color: #fff;
}

Expand Down Expand Up @@ -375,7 +388,7 @@ header a, footer a {
}

.news__box-category span {
background: #815BE1;
background: #815be1;
border: 3px solid #fff;
border-radius: 5px;
font-size: 16px;
Expand Down
75 changes: 0 additions & 75 deletions tailwind.config.cjs

This file was deleted.

Loading