Skip to content

Commit

Permalink
fix: rename assets to static
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Oct 24, 2023
1 parent 01aa688 commit 7ac279e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
File renamed without changes.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string> | undefined)[]
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/notion/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,4 @@ export function fileUrlToAssetUrl(
return newUrl;
}

export const assetsDir = "/assets";
export const assetsDir = "/static";
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7ac279e

Please sign in to comment.