fantomas icon indicating copy to clipboard operation
fantomas copied to clipboard

"Help us make these docs great!" message

Open nojaf opened this issue 3 years ago • 2 comments

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.

nojaf avatar Sep 08 '22 12:09 nojaf

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

alanlomeli avatar Sep 11 '22 20:09 alanlomeli

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

nojaf avatar Sep 12 '22 06:09 nojaf