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

fsdocs-list-of-documents not working as expected #743

Open ryanwildes opened 2 years ago

ryanwildes commented 2 years ago

Hello,

I'm using FSharp.Formatting to create a static site using literate scripts. I've created a _template.html to selectively replace some of the substitution parameters with hard-coded values (like repository URL, etc). However, I'm running into an issue trying to use {{fsdocs-list-of-documents}}. I think it's including the root parameter, so instead of getting a URL like:

/category/document.html

I'm getting:

/repofolder/category/document.html

However, if I try to set the root parameter in the command line, like --parameters root /, it doesn't fix the issue. It also has the side effect of causing index.json to be empty.

dsyme commented 2 years ago

Hmmm interesting. I think you'd just need to debug through what's happening in GetNavigationEntries, I see

              let link = model.Uri(root)

and root should come from Crack.crackProjects and is used throughout, so I'm not quite sure what's up