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

documentation: missing configuration of vue when using unlazy-img which leads built docs with 404 of images #363

Closed
Alaye-Dong opened this issue Dec 16, 2024 · 2 comments
Assignees
Labels
difficulty/medium Medium level to deal with / implement against documentation Improvements or additions to documentation pkg/unlazy-img Related to @nolebase/markdown-it-unlazy-img

Comments

@Alaye-Dong
Copy link
Contributor

I have read the documentation and configured @nolebase/vitepress-plugin-thumbnail-hash and @nolebase/markdown-it-unlazy-img.

After running the docs:dev command, everything works fine in the development server—both thumbnail-hash and unlazy-img functions as expected. 🐞However, after building with docs:preview, the images on the generated site continuously display as blurred thumbnails and fail to load the original images. The developer tools indicate a 404 error when trying to access the images.

image

I have uploaded the code to the repository branch dubug-thumbnail-unlazy

Any insights or suggestions to resolve this issue would be greatly appreciated. Thank you for your help and support in advance!😊

@nekomeowww nekomeowww added pkg/thumbnail-hash Related to @nolebase/vitepress-plugin-thumbnail-hash bug/pending-triage A possible bug that is pending on triage pkg/unlazy-img Related to @nolebase/markdown-it-unlazy-img labels Dec 16, 2024
@nekomeowww nekomeowww self-assigned this Dec 16, 2024
@nekomeowww nekomeowww added documentation Improvements or additions to documentation difficulty/medium Medium level to deal with / implement against and removed bug/pending-triage A possible bug that is pending on triage pkg/thumbnail-hash Related to @nolebase/vitepress-plugin-thumbnail-hash labels Dec 18, 2024
@nekomeowww
Copy link
Member

This part of config is missing:

vue: {
template: {
transformAssetUrls: {
video: ['src', 'poster'],
source: ['src'],
img: ['src'],
image: ['xlink:href', 'href'],
use: ['xlink:href', 'href'],
NolebaseUnlazyImg: ['src'],
},
},
},

I think the documentation should correctly state this configuration and explain everything out. Since you are here already to help Nolebase community, you're welcome to open up a dedicated PR to add this part of the configuration into the documentation.

@nekomeowww nekomeowww changed the title fail to load the original images after build with thumbnail-hash documentation: missing documentation for unlazy-img which leads built docs with 404 of images Dec 18, 2024
@nekomeowww nekomeowww changed the title documentation: missing documentation for unlazy-img which leads built docs with 404 of images documentation: missing configuration of vue when using unlazy-img which leads built docs with 404 of images Dec 18, 2024
@nekomeowww
Copy link
Member

Close as docs has been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty/medium Medium level to deal with / implement against documentation Improvements or additions to documentation pkg/unlazy-img Related to @nolebase/markdown-it-unlazy-img
Projects
None yet
Development

No branches or pull requests

2 participants