vue-router 2.0 Docs

Created on 17 Aug 2016  ·  12Comments  ·  Source: vuejs/vue-router

Inspired by @chrisvfritz https://github.com/vuejs/vuejs.org/issues/319

A new branch next-docwill be created from next

Guidelines for writing official Vue docs

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

Contributing

  1. Edit this comment to change unclaimed to @yourUsername so everyone knows you're working on a file.
  2. Commit directly to the next-doc branch
  3. Try to edit only one file (the one you claimed) at a time.
  4. When ready to push, git 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.)
  5. Update this comment to put a check next to the file you updated.

    Guide Update

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

API Update

Even though this is separated from the Guide, it's intended to be on the same page as it is right now.

  • [x] @posva API Reference

    • [x] @posva VueRouter

    • [x] @unclaimed constructor

    • [x] @posva currentRoute

    • [x] unclaimed beforeEach

    • [x] unclaimed afterEach

    • [x] unclaimed push

    • [x] unclaimed replace

    • [x] unclaimed go

    • [x] unclaimed back

    • [x] unclaimed forward

    • [x] unclaimed getMatchedComponent

    • [x] unclaimed $route

    • [x] unclaimed router-link

    • [x] unclaimed router-view

    • [x] unclaimed beforeRouteEnter

    • [x] unclaimed beforeRouteLeave

    • [x] unclaimed beforeEnter

    • [x] @posva Types

    • [x] @posva Route

    • [ ] unclaimed RouterOptions

    • [ ] unclaimed RedirectOption

    • [ ] unclaimed RouteConfig

    • [ ] unclaimed RouteRecord

    • [ ] unclaimed RouteMap

    • [ ] unclaimed StringHash

    • [ ] unclaimed Location

    • [ ] unclaimed RawLocation

    • [ ] unclaimed Route

    • [ ] unclaimed Matcher

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

All 12 comments

I'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 😄

Was this page helpful?
0 / 5 - 0 ratings