diff --git a/.astro/.astrotion/assets/.gitkeep b/.astro/.astrotion/static/.gitkeep similarity index 100% rename from .astro/.astrotion/assets/.gitkeep rename to .astro/.astrotion/static/.gitkeep diff --git a/.gitignore b/.gitignore index d52c71f..636c359 100644 --- a/.gitignore +++ b/.gitignore @@ -21,9 +21,9 @@ pnpm-debug.log* .DS_Store # astrotion -public/assets +public/static !.astro/.astrotion/ .astro/.astrotion/* -!.astro/.astrotion/assets/ -.astro/.astrotion/assets/* -!.astro/.astrotion/assets/.gitkeep +!.astro/.astrotion/static/ +.astro/.astrotion/static/* +!.astro/.astrotion/static/.gitkeep diff --git a/package.json b/package.json index 4830362..8fae401 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "lint": "eslint . --fix", "format": "prettier . --write", "typecheck": "tsc", - "postinstall": "symlink-dir .astro/.astrotion/assets public/assets" + "postinstall": "symlink-dir .astro/.astrotion/static public/static" }, "dependencies": { "@astrojs/rss": "^3.0.0", diff --git a/src/download.ts b/src/download.ts index 52afb43..85f6e40 100644 --- a/src/download.ts +++ b/src/download.ts @@ -7,7 +7,7 @@ import sharp from "sharp"; import { debug, mergeMaps } from "./utils"; const downloadConrurrency = 3; -const assetsCacheDir = ".astro/.astrotion/assets"; +const assetsCacheDir = ".astro/.astrotion/static"; export async function downloadImages( ...images: (Map | undefined)[] diff --git a/src/integrations/index.ts b/src/integrations/index.ts index 56df6dd..ccdd8f6 100644 --- a/src/integrations/index.ts +++ b/src/integrations/index.ts @@ -3,7 +3,7 @@ import fs from "node:fs"; import type { AstroIntegration } from "astro"; -const assetsDir = "public/assets"; +const assetsDir = "public/static"; export default (): AstroIntegration => ({ name: "astrotion", diff --git a/src/notion/utils.ts b/src/notion/utils.ts index 043ddee..62b0c0a 100644 --- a/src/notion/utils.ts +++ b/src/notion/utils.ts @@ -210,4 +210,4 @@ export function fileUrlToAssetUrl( return newUrl; } -export const assetsDir = "/assets"; +export const assetsDir = "/static"; diff --git a/src/utils.ts b/src/utils.ts index 71353b2..ff7e866 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -12,7 +12,7 @@ export function postUrl(slug: string, base?: string | URL): string { export function assetUrl(url: string, base?: string | URL): string { const filename = path.basename(url); - return getUrl(`/assets/${filename}`, base); + return getUrl(`/static/${filename}`, base); } export function getUrl(p: string, base?: string | URL): string {