phenomic icon indicating copy to clipboard operation
phenomic copied to clipboard

Example blog doesn't support local resources

Open jcayzac opened this issue 7 years ago • 3 comments

If adding the following content to examples/react-app-blog/content/posts:

sixth-post/
  pic.png
  index.md # article content that references ![](./pic.png)
  1. ~~The "latest posts" page lists both the article and a sixth-post/pic.png post.~~
    • I solved this by removing the phenomic entry in package.json and creating a phenomic.config.js file with:
      module.exports = {
        content: {
          content: {
            root: "content",
            globs: ["**/*.md"]
          },
        },
        presets: ["@phenomic/preset-react-app"],
      }
      
  2. The image is not copied anywhere.
  3. The image in the post is broken.

I feel like I'm missing something akin to gatsby-remark-copy-images and gatsby-remark-copy-linked-files, but not sure exactly what…

jcayzac avatar Jun 30 '18 11:06 jcayzac

This need to be improved indeed. Nothing is made to copy this files. Multiple solutions could be done. We should think about the easy one that does not cause performance trouble (eg does not check path in markdown ast as it will be expensive but instead just copy some given files)

MoOx avatar Jun 30 '18 19:06 MoOx

does not check path in markdown ast as it will be expensive

But shouldn't those resources be in the page's bundle? 🤔

jcayzac avatar Jul 01 '18 01:07 jcayzac

That can make things heavy if each md files as tons of images... we should offers this as an option as it s ok for small site but this won’t scale for big project...

MoOx avatar Jul 27 '18 13:07 MoOx