Skip to content

Few tweaks to astro config. #1068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Mar 29, 2025
Merged
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
20 changes: 19 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import path, { dirname } from "path";
import { fileURLToPath } from "url";
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";
import { h } from "hastscript";
Expand All @@ -10,8 +12,21 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings";
import metaTags from "astro-meta-tags";
import pagefind from "astro-pagefind";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename); // @type-check enabled!

// https://astro.build/config
export default defineConfig({
vite: {
define: {
"process.env.VITE_BUILD_TIME": JSON.stringify(new Date().toISOString()),
},
resolve: {
alias: {
$: path.resolve(__dirname, "./src"),
},
},
},
markdown: {
remarkPlugins: [
[
Expand All @@ -34,7 +49,7 @@ export default defineConfig({
],
],
},
site: "https://ep2025.europython.eu",
site: process.env.SITE_URL || "https://ep2025.europython.eu",
redirects: {
"/c-api-summit/": "/programme/c-api-summit/",
"/programme/cfp/": "/programme/cfp/",
Expand All @@ -56,4 +71,7 @@ export default defineConfig({
pagefind(),
],
output: "static",
build: {
minify: true,
},
});
10 changes: 9 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
"compilerOptions": {
"strictNullChecks": true,
"jsx": "react-jsx",
"jsxImportSource": "react"
"jsxImportSource": "react",
"paths": {
"@components/*": ["src/components/*"],
"@layouts/*": ["src/layouts/*"],
"@ui/*": ["src/components/ui/*"],
"@assets/*": ["src/assets/*"],
"@i18n/*": ["src/i18n/*"],
"@src/*": ["src/*"]
}
}
}