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

Clicking on github link leads to 404 #788

Closed davedawkins closed 1 year ago

davedawkins commented 1 year ago

Clicking on

image

with href

https://github.com/davedawkins/Sutil/src/Sutil/DOM.fs#L1217-1217

leads to Not Found.

A link that does work is

https://github.com/davedawkins/Sutil/blob/main/src/Sutil/DOM.fs#L1217-1217

The difference is the blob/main/ insert. How did I fix this, please?

davedawkins commented 1 year ago

The github link icon in context: image

nhirschey commented 1 year ago

The properties for this repo come from Directory.Build.props. It's what I've followed.

Looking at the Sutil .fsproj, you don't have <RepositoryType>git</RepositoryType>. Does adding that fix it? In one of my repos deleting this line creates the same problem you're having.

If that's the fix then we should add it to the styling docs.

davedawkins commented 1 year ago

YES! That fixed it. Thank you!

baronfel commented 1 year ago

Just a note that if you add Sourcelink to your repo then these properties are set for free. My favorite way of doing this is adding the Dotnet.ReproducibleBuilds package, it handles all of the configuration automatically. This also makes editor tooling like f12 actually navigate to your source code.