Open RayKimEX opened 4 years ago
What is the reason of no responding?
I was able to change the router to hash mode with the following enhanceApp.js
export default ({
Vue, // the version of Vue being used in the VuePress app
options, // the options for the root Vue instance
router, // the router instance for the app
siteData, // site metadata
isServer // is this enhancement applied in server-rendering or client
}) => {
// ...apply enhancements to the app
var VueRouter = require('vue-router').default;
router = new VueRouter({
routes: router.options.routes,
base: router.options.base,
fallback: router.options.fallback,
scrollBehavior: router.options.scrollBehavior,
mode: 'hash'
});
}
While it did work it unveiled a larger problem with moving to hash based routing. The links that are created for the headers already make use of the hash also the existing links do not contain a hash breaking the navigation.
Feature request
Asked Stackoverflow
but not answered yet until now
What problem does this feature solve?
I want to change mode 'history' to 'hash' in vuepress
What does the proposed API look like?
I think this feature could be in
config.js
like
How should this be implemented in your opinion?
Some user would definitely want to change
LocationStrategy
likehistory
orhash
Are you willing to work on this yourself?
No