-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Force adding of index.html
to router links
#592
Comments
From my understanding, adding vuepress/lib/prepare/codegen.js Lines 34 to 40 in 64bb80d
|
I think my main issue is in this line, now that i'm looking at it: vuepress/lib/default-theme/Navbar.vue Line 4 in 64bb80d
since it's using the $localePath (which is currently set to Let me try setting my locale and see if that fixes it. |
Okay so yeah, it looks like the issue is that it is using the base/localePath, and won't use the root 'index.html' as the link to the home page in the navbar. |
Oh I catch your point. Currently we redirect |
Or at least give an option in the themeConfig maybe? |
If @alex-exerve 's environment do not support |
True, but it's more about being able to right click a link and copy the url and give it to someone else. At that point it is a redirection issue since new person hasn't been to said thing yet. This is really not that big of a deal, and was more of an odd thing I ran into in my specific environment. It might be something where it is outside the scope of this project as a whole and I just need to create my own theme to handle this specific issue since it appears to be that one specific link in the navbar. |
Don't know if the Before adding any new feature to the core, we will consider the complexity brought about by the feature and the actual meaning it produces. for a very rare requirement that can also be done on the user-land, our principle is not to add it to core. sorry but this is our principle. |
Is there an option to have vuepress add
index.html
to router links instead of using/
?We are creating some documentation that will be available to developers. However, it will be served in a manner that doesn't allow automatically picking up on index.html. Due to the way the router currently is created, the
home-link
in default-theme will always be equal toconfig.js::modules.export.base
and thus the site logo/title will not link to an index.htmlI was looking through the documentation and couldn't find a way to make this happen without ejecting the theme and doing it myself manually.
I can also redo this as a feature request and/or implement it if someone points me in the right direction of where the router creation is.
The text was updated successfully, but these errors were encountered: