Project: jbleuzen/remark-asset-copy

Package: remark-asset-copy@0.0.1

  1. Dependents: 0
  2. Copy assets from markdown to folder


    Copy assets from markdown to a folder inside public.

    I created this because there was no easy way to have this type of file structure with next.js without using require().

    |- content
    |   |-post-slug
    |   |   |- index.md
    |   |   |- image.jpg

    How to use

    Basic example :

    import remark from 'remark';
    import vfile from 'vfile';
    import frontmatter from 'remark-frontmatter';
    import assetCopy from 'remark-asset-copy';
    const processedContent = await remark()
      .use(copy, {
        destination: "public/assets",
    const contentHtml = processedContent.toString();


    Basic testing is implemented but a deeper tests must be written