WATonomous / asset-manager

Asset management for WATcloud
0 stars 0 forks source link

Implement remark plugin #11

Open ben-z opened 4 weeks ago

ben-z commented 4 weeks ago

We use markdown to generate our website. Make a remark plugin so that we can use watcloud:// in image tags ![](). Currently, we use build-time logic to download assets, and a custom component to load them.

If we do this, we can then take advantage of automatic reloading features of nextjs.

ben-z commented 4 weeks ago

Example @theguild/remark-mermaid plugin: https://github.com/the-guild-org/docs/tree/main/packages/remark-mermaid

Nextra remark plugins: https://github.com/shuding/nextra/blob/a27a83da5bad80b7d41a5c0cb8bf10a51869866f/packages/nextra/src/compile.ts#L202-L238

We can add custom plugins in next.config.js: https://github.com/shuding/nextra/issues/437