Skip to content

Commit 0c15516

Browse files
committed
fix pdf assets
1 parent 8f81d4e commit 0c15516

File tree

6 files changed

+100
-5
lines changed

6 files changed

+100
-5
lines changed

astro.config.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import sitemap from '@astrojs/sitemap';
66
import tailwind from "@astrojs/tailwind";
77
import rehypeKatex from 'rehype-katex';
88
import remarkMath from 'remark-math';
9+
import { viteStaticCopy } from 'vite-plugin-static-copy'
910

1011
import redirects from './src/redirects.json';
1112

@@ -30,6 +31,16 @@ export default defineConfig({
3031
redirects: redirects as any,
3132
trailingSlash: 'always',
3233
vite: {
33-
assetsInclude: ['**/*.pdf'],
34+
// assetsInclude: ['**/*.pdf'],
35+
plugins: [
36+
viteStaticCopy({
37+
targets: [
38+
{
39+
src: 'src/content/meetings/*',
40+
dest: 'meeting'
41+
}
42+
]
43+
})
44+
]
3445
},
3546
});

package-lock.json

Lines changed: 64 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
},
4848
"devDependencies": {
4949
"autoprefixer": "^10.4.20",
50-
"postcss-nested": "^6.2.0"
50+
"postcss-nested": "^6.2.0",
51+
"vite-plugin-static-copy": "^1.0.6"
5152
},
5253
"engines": {
5354
"node": ">=18.0.0"
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
import { getCollection } from 'astro:content';
3+
4+
export async function getStaticPaths() {
5+
const events = await getCollection('events');
6+
return events.map((event) => ({
7+
params: { slug: event.slug },
8+
props: event,
9+
}));
10+
}
11+
---
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
import { getCollection } from 'astro:content';
3+
4+
export async function getStaticPaths() {
5+
const publications = await getCollection('publications');
6+
return publications.map((publication) => ({
7+
params: { slug: publication.slug },
8+
props: publication,
9+
}));
10+
}
11+
---

0 commit comments

Comments
 (0)