mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
use relative static paths for media avatars
This commit is contained in:
1 parent
0c8bb4be21
commit
516df13f62
1 file changed
+6
-1
@@ -1,8 +1,13 @@
|
||||
import type { APIContext } from "astro";
|
||||
import { api } from "../../../api/dynamic";
|
||||
import { imageProxy } from "../../../api/imageProxy";
|
||||
import { getStaticPaths as _getStaticPaths } from "../_index";
|
||||
import { mixStaticPaths } from "../../../astro/mixStaticPaths";
|
||||
|
||||
export { getStaticPaths } from "../../[api]/avatars/[id].json";
|
||||
export const getStaticPaths = mixStaticPaths(_getStaticPaths, async () => {
|
||||
const { avatars } = await api.avatars();
|
||||
return avatars.map(({ id }) => ({ params: { id } }));
|
||||
});
|
||||
|
||||
/**
|
||||
* Returns an avatar image based on its `id` in the `webp` format.
|
||||
|
||||
Reference in new issue
Block a user