Search Unity

Changing documentation links for a package

Discussion in 'Package Manager' started by pablothedolphin, Mar 20, 2019.

  1. pablothedolphin

    pablothedolphin

    Joined:
    Oct 20, 2016
    Posts:
    94
    Most packages seem to have links at the top to their documentation and stuff but it seems like the package manager UI is just generating a link to unity's own documentation based on the name of the package. For those of us hosting our on packages using verdaccio and documentation on gitlab pages using docfx, how to we go about editing the package.json to edit these links to point to our own documentation site?

    If it's not possible in the current version, are there any plans to incorporate this and include it in documentation?
     
  2. jasons_unity

    jasons_unity

    Unity Technologies

    Joined:
    Dec 10, 2018
    Posts:
    12
    At the moment linking to gitlab pages is not supported. Currently the only way is to add a link to your self-hosted documentation inside your package "Documentation~/index.md" and have the user access it in this fashion.

    The package manager UI team is working on a better solution. They are thinking of adding a field in the package.json for self-hosted documentation but nothing concrete has been yet decided.
     
    Karnsteiner and pablothedolphin like this.
  3. Karnsteiner

    Karnsteiner

    Joined:
    Mar 24, 2013
    Posts:
    24
    This would be really useful to help redirect users to the site the package was originally cloned from in the case of public packages on Github (particularly if the user troubleshooting something isn't the one that added the package). Please let us know when/if this change is made.
     
  4. hwaet

    hwaet

    Joined:
    Mar 21, 2015
    Posts:
    23
    I was having trouble getting the above approach to work, but eventually figured it out. For the benefit of anyone else hitting the same issue, the embedded doc link (and changelog) doesn't seem to work in 2018.3 but does for 2019.1. Also, it will accept index.md or [name of the package].md.

    Something I noticed is that there are a handful of broken links in the official unity docs. In one case relevant to this thread, the link for "Documenting your package" at the bottom of the layout docs points to a 404.