Skip to content

page bundle images not handled #106

Description

@ttys3

Describe the bug

my blog mdx files is from docusaurus, and it support page bundle images well.
recently I migrated to pliny. and found all images can not shown in the generated html

"page bundle images" means the image is under the same subdir as the index.mdx file.
this way, I can keep the images and the blog markdown file in the same dir.

To Reproduce

the file struct is like:

blog
└── demo
    ├── foo.png
    └── index.mdx

Steps to reproduce the behavior:

enable nextjs trailingSlash, edit next.config.js
add trailingSlash: true,

  1. have a blog under /blog/demo/index.mdx

  2. put a image under /blog/demo/foo.png

  3. and write ![foo](foo.png) in /blog/demo/index.mdx

  4. access /blog/demo/ blog via web browser, the image can not show ( /blog/demo/foo.png not found)

Expected behavior

support images put in page bundle

Screenshots
If applicable, add screenshots to help explain your problem.

System Info (if dev / build issue):

  • OS: [e.g. iOS]
  • Node version (please ensure you are using 14+)
  • Npm version

Browser Info (if display / formatting issue):

  • Device [e.g. Desktop, iPhone6]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions