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

Markdown pages aren't included in the build when they reference a local image #8485

Closed
1 task
vadimdemedes opened this issue Sep 10, 2023 · 4 comments
Closed
1 task
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: assets Related to the Assets feature (scope)

Comments

@vadimdemedes
Copy link

Astro Info

Astro                    v3.0.8
Node                     v20.5.1
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

  1. Store any image inside src folder (e.g. src/assets/image.jpg)
  2. Create a Markdown page (e.g. src/pages/example.md)
  3. Show that image on this page (e.g. ![](../assets/image.jpg))
  4. In development mode (astro dev), /example page loads as expected and shows that image
  5. When running astro build, /example page doesn't show up in "generating static routes" section nor does it exist in the dist folder.
  6. As soon as you remove ![](../assets/image.jpg) from Markdown and run astro build again, /example page is generated and exists in the dist folder as /example/index.html, as expected.

What's the expected result?

Generate the Markdown page with or without local images in astro build or show the error that prevents that page from being built.

Link to Minimal Reproducible Example

https://codesandbox.io/p/sandbox/epic-resonance-qfsyl4

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Sep 10, 2023
@vadimdemedes
Copy link
Author

I deploy my website on Vercel and I found out that if I use a @astrojs/vercel/serverless adapter with output: "hybrid", this problem goes away. Maybe this is useful information for figuring out the root cause of this.

@ematipico
Copy link
Member

ematipico commented Sep 11, 2023

@vadimdemedes your astro info says that you don't use any adapter. Could you please update that information please? That's really important to us.

@ematipico ematipico added needs response Issue needs response from OP - P4: important Violate documented behavior or significantly impacts performance (priority) feat: assets Related to the Assets feature (scope) and removed needs triage Issue needs to be triaged labels Sep 11, 2023
@vadimdemedes
Copy link
Author

Yep, that is correct, I don't use any adapter when that bug happens. If I use @astrojs/vercel/serverless with output: "hybrid", the bug goes away.

@Princesseuh Princesseuh removed the needs response Issue needs response from OP label Sep 14, 2023
@Princesseuh
Copy link
Member

Duplicate of #8547. The message looks slightly different because of a coincidence, but it's the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: assets Related to the Assets feature (scope)
Projects
None yet
Development

No branches or pull requests

3 participants