Skip to content

Commit

Permalink
Replace vercel adapter with node
Browse files Browse the repository at this point in the history
  • Loading branch information
srosset81 committed Jul 29, 2024
1 parent 02ce1bd commit 0341181
Show file tree
Hide file tree
Showing 5 changed files with 1,138 additions and 2,215 deletions.
6 changes: 4 additions & 2 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import icon from 'astro-icon';
import tasks from './src/utils/tasks';
import { readingTimeRemarkPlugin, responsiveTablesRehypePlugin } from './src/utils/frontmatter.mjs';
import { ANALYTICS, SITE } from './src/utils/config.ts';
import vercel from '@astrojs/vercel/serverless';
import node from '@astrojs/node';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const whenExternalScripts = (items = []) =>
ANALYTICS.vendors.googleAnalytics.id && ANALYTICS.vendors.googleAnalytics.partytown
Expand Down Expand Up @@ -69,5 +69,7 @@ export default defineConfig({
},
},
},
adapter: vercel(),
adapter: node({
mode: 'standalone',
}),
});
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"lint:eslint": "eslint . --ext .js,.ts,.astro"
},
"dependencies": {
"@astrojs/node": "^8.3.2",
"@astrojs/rss": "^4.0.1",
"@astrojs/sitemap": "^3.0.3",
"@astrojs/vercel": "^7.6.0",
"@astrolib/analytics": "^0.5.0",
"@astrolib/seo": "^1.0.0-beta.5",
"@fontsource-variable/inter": "^5.0.16",
"@rdfjs/data-model": "^1.3.4",
"astro": "^4.0.6",
"astro": "^4.12.2",
"astro-icon": "1.0.0-next.2",
"crypto-js": "^4.1.1",
"flowbite": "^2.3.0",
Expand Down Expand Up @@ -56,8 +56,7 @@
"reading-time": "^1.5.0",
"tailwind-merge": "^2.1.0",
"tailwindcss": "^3.4.0",
"typescript": "^5.3.3",
"vercel": "^34.2.0"
"typescript": "^5.3.3"
},
"engines": {
"node": ">=18.14.1"
Expand Down
23 changes: 23 additions & 0 deletions src/pages/ontologies/pair/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { APIRoute } from "astro";

export const prerender = false

export const GET: APIRoute = async ({ request, redirect }) => {
switch (request.headers.get("Accept")) {
case "application/ld+json":
return redirect('/ontologies/pair-2021-summer/ontology.json', 303);

case "application/rdf+xml":
return redirect('/ontologies/pair-2021-summer/ontology.xml', 303);

case "text/turtle":
return redirect('/ontologies/pair-2021-summer/ontology.ttl', 303);

case "application/n-triples":
return redirect('/ontologies/pair-2021-summer/ontology.nt', 303);

default:
return redirect('/ontologies/pair-2021-summer/index-en.html', 303);
}
};

72 changes: 0 additions & 72 deletions vercel.json

This file was deleted.

Loading

0 comments on commit 0341181

Please sign in to comment.