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

feat: support history router #17

Closed
wants to merge 2 commits into from

Conversation

amcgee
Copy link

@amcgee amcgee commented Aug 27, 2019

The docsify configuration routerMode: 'history' breaks the pagination plugin because it assumes links are prefixed with a #. This changes the expected path for #${path} only when routerMode is set to hash

@amcgee
Copy link
Author

amcgee commented Aug 27, 2019

Ah, just saw #11 - @imyelo feel free to close this and merge that one instead since it has an example!

@amcgee
Copy link
Author

amcgee commented Aug 27, 2019

Actually, the implementation is slightly different - this pulls the routerMode from the docsify config, whereas #11 adds a duplicate docsify-pagination config option

@imyelo
Copy link
Owner

imyelo commented Aug 28, 2019

#11 is stuck by docsifyjs/docsify#751 for a while, and pulling routerMode from docsify config is precisely much more ingenious. I'd like to merge this PR if it doesn't affect by docsifyjs/docsify#751 as #11 do.

@amcgee
Copy link
Author

amcgee commented Oct 20, 2019

HI @imyelo sorry for the delay.

I will test this again, I think there may have been an issue with anchor links within pages, but I don't think this requires docsifyjs/docsify#751

@jcayzac
Copy link

jcayzac commented Dec 1, 2020

@amcgee @imyelo it's safer to call vm.router.toURL(path) instead of hardcoding bahavior like you do here. This PR doesn't support 3rd-party routers, for instance.

@imyelo
Copy link
Owner

imyelo commented Jun 24, 2022

@amcgee @imyelo it's safer to call vm.router.toURL(path) instead of hardcoding bahavior like you do here. This PR doesn't support 3rd-party routers, for instance.

Good point! #33 opened with vm.router.toURL instead.

@imyelo imyelo closed this Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants