Search Unity

Changing documentation links for a package

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

  1. JakHussain

    JakHussain

    Joined:
    Oct 20, 2016
    Posts:
    318
    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:
    17
    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.
     
  3. Karnsteiner

    Karnsteiner

    Joined:
    Mar 24, 2013
    Posts:
    29
    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:
    26
    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.
     
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Any progress on this?
     
  6. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Hi @Peter77 ,

    This feature has landed in Unity 2020.1.0a17.

    Regards,

    Pascal
     
    fablond, optimise and Peter77 like this.
  7. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    Thanks for your reply, that's great!
    Where would I find the documentation that describes how to modify the package.json file to use this new feature?
     
  8. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    The technical writer has not completed the documentation for this feature. But this is really simple. If you provide a `documentationUrl` in your package manifest (package.json) pointing to the documentation web page, the UI will open the link in the browser.

    Pascal
     
    Peter77 likes this.
  9. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    Any plan to backport to Unity 2019.3?
     
  10. JakHussain

    JakHussain

    Joined:
    Oct 20, 2016
    Posts:
    318
  11. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Backporting features is always a bit touchy. Usually, we backport only fixes and stability improvements to LTS releases. But this is one is not complex/risky. I'll ask around, no promises!

    Pascal
     
  12. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    I have been told this won't be backported. Sorry :(
     
    optimise likes this.
  13. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    This is planned. will be implemented in 2020.2.

    Pascal
     
  14. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    I assume if "documentationUrl" is present, it won't cause problems in earlier Unity versions than 2020.1 and gets just ignored?
     
  15. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Exactly.
     
    Peter77 likes this.
  16. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    530
    documentationURL works nicely! Is the change log url already available? That is the only link not working right now for my package. 2020.1 support would be highly appreciated.
     
  17. okcompute_unity

    okcompute_unity

    Unity Technologies

    Joined:
    Jan 16, 2017
    Posts:
    756
    Hi @ImpossibleRobert ,

    Changelog URL (
    changelogUrl
    ) should work starting from Unity 2020.2.0a1. Looks like it was never backported to 2020.1. Sorry!

    Pascal
     
    JakHussain likes this.