F-H
F-H

Reputation: 1085

How can the NuGet Documentation section be used?

As of lately, I see that the NuGet package pages include a Documentation section:

Documentation header on NuGet page

In all packages that I've checked, though, the only contents of that section is a seemingly expandable Show more item, which, when expanded, reveals to sport no further content.

As the docs do not appear to contain any hint about how that item works, I am asking here: How can I provide (presumably) package documentation for a NuGet package that will show up in that section? (And can you point out any example package that illustrates what the docs will look like on the NuGet package website?)

Notably, my packages contain the documentation XML files generated by the C# compiler from documentation comments. Yet, nothing shows up in the Documentation section, so that's not what is supposed to appear there.

Upvotes: 3

Views: 107

Answers (1)

techvice
techvice

Reputation: 1301

The section you are mentioning is on a specific packages page on Nuget.org. For example on the RestSharp package page, this shows the Documentation near the top of the page. This section is NOT related to any package data/details. I point out RestSharp because this package does come with a readme.txt file (which is displayed after installing that package). I initially thought it might be related to the readme.txt file. However, it is not!

No, this section is only displayed when you manually configure it from the NuGet website. See the image below (taken from a package I have previously uploaded):

enter image description here

You can manually add text, direct the website to a file, or upload a file directly. It is in markdown format.

Upvotes: 3

Related Questions