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

docs(migration): Added image migration guide for vuepress #799

Merged
merged 1 commit into from
Jun 16, 2022
Merged

docs(migration): Added image migration guide for vuepress #799

merged 1 commit into from
Jun 16, 2022

Conversation

jd-solanki
Copy link
Contributor

No description provided.

Copy link
Member

@kiaking kiaking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very precise, easy to follow, good documentation! Awesome!

@kiaking kiaking merged commit 0d311ff into vuejs:main Jun 16, 2022
@meteorlxy
Copy link
Member

Well, I wonder if the withBase is still necessary. 🤔

@kiaking
Copy link
Member

kiaking commented Jun 16, 2022

Well 👀

For dynamic images you still need withBase as shown in Base URL guide.

@meteorlxy
Copy link
Member

meteorlxy commented Jun 16, 2022

Yeah I've read that. I just found that it's Vite who handle the base, but not VitePress. So I wonder if the base is not necessary. After some tests I know the reason why we still need it. But I found a issue of Vite... I'm not sure if it has already been reported 🤣

@kiaking
Copy link
Member

kiaking commented Jun 16, 2022

Hah. Well it could be super cool if we can removed it completely though 👀

@meteorlxy
Copy link
Member

meteorlxy commented Jun 16, 2022

It's easy to repro, you could have a try if you are interested:

  • set base to /foo/
  • put a logo.png into the public dir
  • import two images with and without /foo/
![](/logo.png)
![](/foo/logo.png)

They both work well in dev. (check the devtools, they are different)
The second one would fail in build.

🤣

@kecrily
Copy link
Contributor

kecrily commented Jun 16, 2022

I think the second failure was in line with expectations. After you set base, everything you do should be done under base by default.

@meteorlxy
Copy link
Member

I think the second failure was in line with expectations. After you set base, everything you do should be done under base by default.

Yes, but the behaviors of dev and build differs, so I thought it should be considered as a bug

@kecrily
Copy link
Contributor

kecrily commented Jun 16, 2022

Is the second one available in dev? Its availability should be a bug

@meteorlxy
Copy link
Member

meteorlxy commented Jun 16, 2022

In fact, there might be another edge case.

  • The base of foo site is set to /foo/
  • We have another bar site deployed under /bar/ in the same domain.
  • Then how to reference /bar/logo.png in foo site without adding the domain name? I thinks the only way is to use dynamic path for now 🤔

@meteorlxy
Copy link
Member

Is the second one available in dev? Its availability should be a bug

Yes it is.

@kecrily
Copy link
Contributor

kecrily commented Jun 16, 2022

  • Then how to reference /bar/logo.png in foo site without add the domain name?

Maybe it can be like this ../bar/logo.png

brc-dd added a commit that referenced this pull request Jun 17, 2022
* refactor: refine global layout system

* chore: remove unknown console log from release script

* release: v1.0.0-alpha.2

* docs: add Layer0 deployment notes

Co-authored-by: meteorlxy <[email protected]>

* docs: add cloudflare pages deploy (#797)

close #369 

Co-authored-by: Kia King Ishii <[email protected]>

* refactor: improve site data parsing (#780)

* fix: copy code in non-secure contexts (#792)

Co-authored-by: Divyansh Singh <[email protected]>

* fix(theme): add italic fonts (#759) (#777)

fix #759

* docs: image migration guide for vuepress (#799)

* refactor(types): use built-in utility type `Awaited` (#801)

instead of explicitly defining it. (introduced in TS 4.5)

* feat(theme): support themeable images for logo and hero (#745)

Co-authored-by: Divyansh Singh <[email protected]>

Co-authored-by: Kia King Ishii <[email protected]>
Co-authored-by: Rishi Raj Jain <[email protected]>
Co-authored-by: meteorlxy <[email protected]>
Co-authored-by: Percy Ma <[email protected]>
Co-authored-by: Linmj <[email protected]>
Co-authored-by: JD Solanki <[email protected]>
Co-authored-by: CHOYSEN <[email protected]>
Co-authored-by: Anthony Fu <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants