Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 1 addition & 12 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,5 @@ export default defineConfig({
ssr: {
noExternal: ['@tinacms/astro', '@tinacms/bridge'],
},
build: {
rollupOptions: {
onwarn(warning, warn) {
if (warning.code === 'UNUSED_EXTERNAL_IMPORT' &&
warning.exporter === 'tinacms/dist/client') {
return;
}
warn(warning);
}
}
}
}
},
});
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"type": "module",
"version": "0.0.1",
"packageManager": "pnpm@10.28.2",
"engines": {
"node": ">=22.12.0"
},
"scripts": {
"dev": "tinacms dev -c \"astro dev\"",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=4096 tinacms build --content=local --skip-cloud-checks -c \"astro build\"",
Expand All @@ -13,25 +16,23 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/cloudflare": "^12.6.13",
"@astrojs/mdx": "^4.3.0",
"@astrojs/rss": "^4.0.15",
"@astrojs/sitemap": "^3.7.0",
"@tinacms/astro": "0.0.0-c724883-20260514062230",
"astro": "^5.16.0"
"@astrojs/cloudflare": "^13.1.10",
"@astrojs/mdx": "^5.0.6",
"@astrojs/rss": "^4.0.18",
"@astrojs/sitemap": "^3.7.2",
"@tinacms/astro": "^0.4.0",
"astro": "^6.3.7"
},
"devDependencies": {
"@tinacms/cli": "0.0.0-c724883-20260514062230",
"@types/node": "^25.1.0",
"@tinacms/cli": "^2.4.0",
"@types/node": "^25.9.1",
"cross-env": "^7.0.3",
"tinacms": "0.0.0-c724883-20260514062230",
"wrangler": "4.59.2"
"react": "18.3.1",
"react-dom": "18.3.1",
"tinacms": "^3.8.2",
"wrangler": "^4.95.0"
},
"pnpm": {
"overrides": {
"react": "18.3.1",
"react-dom": "18.3.1"
},
"onlyBuiltDependencies": [
"better-sqlite3",
"core-js",
Expand Down
1,952 changes: 844 additions & 1,108 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions public/admin/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
index.html
assets/
bridge.js
assets/
16 changes: 16 additions & 0 deletions src/content.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Content is sourced from TinaCMS (see `src/lib/data.ts`), not Astro's
* content layer, so these collections are unused at runtime. We only
* declare `config` to stop Astro auto-generating it as a Markdown
* collection: `src/content/config` holds JSON (Tina's global config), so
* the default Markdown glob finds nothing and warns. Pointing it at JSON
* silences that. `blog` and `page` keep their Markdown auto-generation.
*/
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';

const config = defineCollection({
loader: glob({ pattern: '**/*.json', base: 'src/content/config' }),
});

export const collections = { config };
Comment thread
0xharkirat marked this conversation as resolved.
17 changes: 0 additions & 17 deletions src/pages/rss.xml.js

This file was deleted.

21 changes: 21 additions & 0 deletions src/pages/rss.xml.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { APIContext } from 'astro';
import rss from '@astrojs/rss';
import config from '../content/config/config.json';
import { listBlogs } from '../lib/data';

export const prerender = true;

export async function GET(context: APIContext) {
const posts = await listBlogs();
return rss({
title: config.seo.title,
description: config.seo.description,
site: context.site ?? '',
items: posts.map((post) => ({
Comment thread
0xharkirat marked this conversation as resolved.
title: post.title,
description: post.description ?? undefined,
pubDate: post.pubDate ? new Date(post.pubDate) : undefined,
link: `/blog/${post._sys.filename}/`,
})),
});
}
2 changes: 1 addition & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "ssw-website-global"
compatibility_date = "2025-05-20"
compatibility_flags = ["nodejs_compat"]
main = "./dist/_worker.js/index.js"
main = "@astrojs/cloudflare/entrypoints/server"

[assets]
directory = "./dist"
Expand Down