feat: deploy on cloudflare pages
This commit is contained in:
@ -6,13 +6,15 @@ import rehypeAutolinkHeadings from 'rehype-autolink-headings'
|
||||
import node from '@astrojs/node'
|
||||
import sitemap from '@astrojs/sitemap'
|
||||
|
||||
import cloudflare from '@astrojs/cloudflare'
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: 'https://vikunja.io',
|
||||
output: 'static',
|
||||
integrations: [
|
||||
tailwind(),
|
||||
markdoc(),
|
||||
tailwind(),
|
||||
markdoc(),
|
||||
sitemap({
|
||||
serialize(item) {
|
||||
if (item.url.endsWith('/')) {
|
||||
@ -23,9 +25,7 @@ export default defineConfig({
|
||||
},
|
||||
}),
|
||||
],
|
||||
adapter: node({
|
||||
mode: 'standalone',
|
||||
}),
|
||||
adapter: cloudflare(),
|
||||
markdown: {
|
||||
rehypePlugins: [
|
||||
rehypeSlug,
|
||||
|
@ -3,6 +3,10 @@
|
||||
let
|
||||
unstable = import inputs.unstable { system = pkgs.stdenv.system; };
|
||||
in {
|
||||
scripts.patch-workerd.exec = ''
|
||||
find node_modules/.pnpm/@cloudflare+workerd-linux-64@*/node_modules/@cloudflare/workerd-linux-64/bin/ -name workerd -print0 | xargs -I {} -0 patchelf --set-interpreter "$(<$NIX_CC/nix-support/dynamic-linker)" {}
|
||||
'';
|
||||
|
||||
languages.javascript = {
|
||||
enable = true;
|
||||
pnpm = {
|
||||
|
@ -9,7 +9,8 @@
|
||||
"preview": "astro preview",
|
||||
"astro": "astro",
|
||||
"lint": "astro check --root ./src",
|
||||
"serve-dist": "node ./dist/server/entry.mjs"
|
||||
"serve-dist": "node ./dist/server/entry.mjs",
|
||||
"deploy-cf": "pnpm run build && wrangler pages deploy dist"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.4",
|
||||
|
Reference in New Issue
Block a user