Inspired by @chrisvfritz https://github.com/vuejs/vuejs.org/issues/319
A new branch next-docwill be created from next
This is a draft of a proposal for vue-router 2 documentation. If I'm missing something
you'd really like to see, or I missed anything, please leave a comment and let me know :smile:
Also, I'd love your help with titles :wink:
For better consistency, we should be using the same rules as https://github.com/vuejs/vuejs.org/issues/319
unclaimed to @yourUsername so everyone knows you're working on a file.next-doc branchgit fetch origin next-doc, git rebase origin/next-doc, then git push origin next-doc. (Yes, we're skipping code review for now. Let's just get something in place for this first pass.)I think we could reorganize the first section to match the style of Vue.js Guide.
Links refer to doc's previous version. Some of them may have to be rewritten from scratch like the Router Hooks.
A missing link means a new page
@posva Installation@fnlCtrl Getting Started@fnlCtrl Basic Usage (review changes)@fnlCtrl Route Object & Route Matching (review changes)@posva Named Routes@fnlCtrl Declarative Navigation with router-link (review changes) @fnlCtrl Programmatic Navigation @fnlCtrl router-view (review changes)unclaimed Advanced Routing@posva Nested Routes@posva Named Views@posva Lazy loading Routes@posva Route Resolvingunclaimed Navigation@fnlCtrl Router Hooksunclaimed Routes Hooksunclaimed Views TransitionsEven though this is separated from the Guide, it's intended to be on the same page as it is right now.
@posva API Reference@posva VueRouter@unclaimed constructor@posva currentRouteunclaimed beforeEachunclaimed afterEachunclaimed pushunclaimed replaceunclaimed gounclaimed backunclaimed forwardunclaimed getMatchedComponentunclaimed $routeunclaimed router-linkunclaimed router-viewunclaimed beforeRouteEnterunclaimed beforeRouteLeaveunclaimed beforeEnter@posva Types@posva Routeunclaimed RouterOptionsunclaimed RedirectOptionunclaimed RouteConfigunclaimed RouteRecordunclaimed RouteMapunclaimed StringHashunclaimed Locationunclaimed RawLocationunclaimed Routeunclaimed MatcherI've edited the Contributing part, changing branch name 2.0 to next-doc
Btw I think examples in the Guide should be directly adapted from https://github.com/vuejs/vue-router/tree/next-doc/examples if a corresponding one exists, for consistency
@fnlctrl Absolutely. We should inspire from them as much as possible for consistency.
edit: Thanks for fixing that! Sorry about the previous (deleted) comment, I just got up and wasn't very awake yet 😄
Just started writing, haven't pushed yet :)
@posva The Getting Started section is complete :smile:.
And would you like to review Imperative Navigation And History Manipulation since it's written from scratch, and I don't know if there's anything I missed :joy:.
Sure, I'll give it a read. I think we should rename it to Programmatic Navigation (without History Manipulation)
I may give it a read tomorrow. I'll try to advance on advanced routing section
Also, I think we should add a section about Best/Recommended Practices. People have been asking some guidance when building large apps
Yeah, Best Practices would be useful!
I'll continue to update Router Hooks tomorrow then.
Forgot to ask, should I move the History Manipulation part to Advanced Routing?
Not, let's keep it. Removing it from the title because it's redundant imo
Ok then, doing it now.
Since docs are online now, I ticked off the relevant tasks that were still open and unclaimed.
@psova, you started working at the types, is that still ongoing? Will those actually be added to the docs? Or can we close this ticket as docs are online now?
@LinusBorg I totally forgot about this! We can close it now 😄
Most helpful comment
Btw I think examples in the Guide should be directly adapted from https://github.com/vuejs/vue-router/tree/next-doc/examples if a corresponding one exists, for consistency