Skip to content

Commit

Permalink
chore: reenable integration
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Oct 24, 2023
1 parent 105d798 commit 1f02221
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
23 changes: 12 additions & 11 deletions src/integrations/index.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
// import child_process from "node:child_process";
// import fs from "node:fs";
import child_process from "node:child_process";
import fs from "node:fs";

import type { AstroIntegration } from "astro";

// import { debug } from "../utils";
import { debug } from "../utils";

// const assetsDir = ".astro/.astrotion/static";
// const assetDirName = "static";
const assetsDir = ".astro/.astrotion/static";
const assetDirName = "static";

export default (): AstroIntegration => ({
name: "astrotion",
hooks: {
"astro:build:done": async ({ dir: _ }) => {
// const outDir = new URL(assetDirName, dir.href).pathname;
// fs.mkdirSync(outDir, { recursive: true });
// const command = `cp -n -r ${assetsDir}/* ${outDir} || true`;
// debug(`copying assets: ${command}`);
// child_process.execSync(command);
"astro:build:done": async ({ dir }) => {
const outDir = new URL(assetDirName, dir.href).pathname;
fs.mkdirSync(outDir, { recursive: true });

const command = `cp -n -r ${assetsDir}/* ${outDir} || true`;
debug(`copying assets: ${command}`);
child_process.execSync(command);
},
},
});
2 changes: 1 addition & 1 deletion src/notion/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const md2html = unified()
.use(remarkRehype)
.use(rehypeKatex)
.use(rehypeMermaid, { strategy: "pre-mermaid" })
.use(rehypePrism as any) // rehypePrism reports type error
.use(rehypePrism)
.use(rehypeStringify);

export function transformMdBlocks(
Expand Down

0 comments on commit 1f02221

Please sign in to comment.