Closed kyle-messier closed 2 weeks ago
I found all code blocks in README.md were generic (i.e. starting with "```" not "```r"). It might be related to the problem. I will check it somewhere else and make a PR to Mitchell's branch with my changes that were pushed after the last PR.
I think this happened as a result of not wanting to run the download chunks in the building of the package which runs the README.md file. I can fix these
I think the lack of copy-paste functionality in the README page is default functionality. This thread discusses the copy-paste button in the function reference pages (which is enabled in our webpage), but no discussion of README.
I updated the README to separate code chunks from return messages, which now enables the copy-paste button in the source code readme without running the code.
Is this sufficient, or do we want to actually run the code blocks? @sigmafelix @kyle-messier
I think the issue is in the pkgdown page. The current amadeus
webpage displays code blocks without copy-and-paste functionality: https://niehs.github.io/amadeus
In contrast, all code blocks in beethoven
webpage have the functionality (to note, copy buttons show up upon hovering the cursor on a code block): (https://niehs.github.io/beethoven) The difference between README.md source of amadeus
and that of beethoven
is that the backtick symbols are followed by "r" or nothing.
My quick experiment in one of my repos shows this. https://sigmafelix.github.io/speed/
@sigmafelix Ahh, yes I see.
r
has been added to code blocks with code but not output (https://github.com/NIEHS/amadeus/commit/2967113fe6f8659a25431fd2fc18b8d81e01f3e5).
Code in deployment should be copyable
The source code readme (https://github.com/NIEHS/amadeus/) is copyable. For example the line
can be copied for ease of implementation. However, the pkgdown deployment is not at https://niehs.github.io/amadeus/
Maybe this is standard, but it would be nice.