Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No inclusion of assets in frontmatter of markdown file and js config #2422

Closed
4 tasks done
EthanAndreas opened this issue May 25, 2023 · 3 comments
Closed
4 tasks done
Labels
bug: pending triage Maybe a bug, waiting for confirmation stale

Comments

@EthanAndreas
Copy link

Describe the bug

When you define a link to an image in frontmatter or in config.js, the file is note copy in the dist folder, whereas for a link in the markdown file directly it works, also when you define a public folder with your pictures it copy the content of the folder directly in dist folder and not in a public folder in dist folder.

Reproduction

at this in a makdown file that represents the home page :
features:

  • icon:
    src: /public/compiler.png
    create a public folder in docs with the image

and build the project

Expected behavior

it will be preferable if the content of public folder will be copy in a dist/public folder, because here you can just enter :
features:

  • icon:
    src: compiler.png

but it is not very clear

System Info

npm run docs:build

Additional context

No response

Validations

@EthanAndreas EthanAndreas added the bug: pending triage Maybe a bug, waiting for confirmation label May 25, 2023
@dotob
Copy link

dotob commented May 31, 2023

same here...

@hybridherbst
Copy link

@github-actions github-actions bot added the stale label Aug 3, 2023
@brc-dd
Copy link
Member

brc-dd commented Aug 3, 2023

also when you define a public folder with your pictures it copy the content of the folder directly in dist folder and not in a public folder in dist folder.

this is expected - https://vitejs.dev/guide/assets.html#the-public-directory

and content in frontmatter is considered string, that doesn't go through rollup. hence relative paths won't work there.

@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: pending triage Maybe a bug, waiting for confirmation stale
Projects
None yet
Development

No branches or pull requests

4 participants