fsprojects / fantomas

FSharp source code formatter
https://fsprojects.github.io/fantomas
Other
769 stars 191 forks source link

"Help us make these docs great!" message #2487

Open nojaf opened 1 year ago

nojaf commented 1 year ago

I got a tip today from Jonathan that the IL GPU docs have a message at the end of each page inviting users to contribute to the current page they are on right now.

See https://naskio.github.io/jekyll-actions-example/docs/03-advanced/01-memory-buffers-and-views/

image

It would be nice if we had the same thing.

This would probably fit in nicely with the current navigation web component.

https://github.com/fsprojects/fantomas/blob/b4e811b44d40da9d2f5d8cd80c99e73164aa933b/docs/content/webcomponents.js#L46-L57

That way it is easily included on each page. Passing {{fsdocs-source-filename}} as an attribute might be a good starting point to construct the correct URL.

alanlomeli commented 1 year ago

sounds good! could you elaborate on what can {{fsdocs-source-filename}} help for?

nojaf commented 1 year ago

The link behind "Make a contribution" should edit you to the edit page (on GitHub) of the page you are currently on. {{fsdocs-source-filename}} will contain that information and can be used to construct this URL. Example:

https://fsprojects.github.io/fantomas/docs/contributors/How%20Can%20I%20Contribute.html

takes you to

https://github.com/fsprojects/fantomas/edit/master/docs/docs/contributors/How%20Can%20I%20Contribute.md