fsprojects / FSharp.Formatting

F# tools for generating documentation (Markdown processor and F# code formatter)
https://fsprojects.github.io/FSharp.Formatting/
Other
462 stars 155 forks source link

Setting root for links generated by fsdocs #785

Closed davedawkins closed 1 year ago

davedawkins commented 1 year ago

This is how I'm doing it now, to test locally:

    <PackageProjectUrl>..</PackageProjectUrl>
    <!-- <PackageProjectUrl>https://github.com/DaveDawkins/Sutil</PackageProjectUrl> -->

in order to have root set as shown here

Substitutions/parameters:
  root --> ../
  fsdocs-authors --> David Dawkins
  fsdocs-collection-name --> Sutil
  fsdocs-collection-name-link --> ../

Is there a better way? (reading the source suggests that it will derive root from <PackageProjectUrl> only

Thank you!

nhirschey commented 1 year ago

You can specify parameters at the command line.

dotnet fsdocs build --parameters root ../
Substitutions/parameters:
  root --> ../
davedawkins commented 1 year ago

That is useful to know, thank you. Just to make sure I'm not missing anything, does it mention root in that page there, or how to rebase links? If not, then I can submit a doc PR

davedawkins commented 1 year ago

Tested, that works - thanks again

nhirschey commented 1 year ago

It's there but not super explicit and there's no examples. It could probably be improved. At the bottom of the templates and substutions section that you were referencing it mentions

For the fsdocs tool, additional substitutions can be specified using --parameters.

The command line tool --help output does a better job documenting it, showing the "--parameters key value" format.