Skip to content
Open
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
6 changes: 6 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ node_modules/
.env.production
# macOS
.DS_Store

# wrangler files
.wrangler
.dev.vars*
!.dev.vars.example
!.env.example
6 changes: 5 additions & 1 deletion site/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// @ts-check
import { defineConfig } from 'astro/config';

import cloudflare from "@astrojs/cloudflare";

// GitHub Pages deploys under '/Ghost', Cloudflare Pages at root '/'.
const deploy = process.env.DEPLOY_TARGET;
const base = deploy === 'pages' ? '/Ghost' : '/';
Expand All @@ -9,6 +11,8 @@ export default defineConfig({
site: deploy === 'pages'
? 'https://swadhinbiswas.github.io'
: 'https://ghostcli.pages.dev',

base,
trailingSlash: 'ignore',
});
adapter: cloudflare()
});
88 changes: 86 additions & 2 deletions site/bun.lock

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"deploy": "astro build && wrangler pages deploy dist --project-name=ghost-site --branch=main",
"astro": "astro"
"preview": "bun run build && wrangler dev",
"deploy": "bun run build && wrangler deploy",
"astro": "astro",
"cf-typegen": "wrangler types"
},
"dependencies": {
"@astrojs/cloudflare": "12",
"animejs": "^3.2.2",
"astro": "^5.7.0"
},
"devDependencies": {
"wrangler": "^4.99.0"
"wrangler": "^4.100.0"
}
}
2 changes: 2 additions & 0 deletions site/public/.assetsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_worker.js
_routes.json
14 changes: 10 additions & 4 deletions site/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"]
}
"extends": "astro/tsconfigs/strict",
"include": [
".astro/types.d.ts",
"**/*",
"./worker-configuration.d.ts"
],
"exclude": [
"dist"
]
}
17 changes: 17 additions & 0 deletions site/wrangler.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "ghost",
"compatibility_date": "2026-06-11",
"observability": {
"enabled": true
},
"main": "dist/_worker.js/index.js",
"compatibility_flags": [
"global_fetch_strictly_public",
"nodejs_compat"
],
"assets": {
"binding": "ASSETS",
"directory": "dist"
}
}
Loading