-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the order in which README files are chosen #360
Comments
Fully agree with @karthik! I would appreciate it if the the display order is set like: If final result (README.md) exists, show it; |
Yes, +1 to this! I'm VERY happy with the .Rmd rendering. However, this change has broken my workflow because I use README.Rmd -> README.md as my default way for creating reports. |
Interesting. Currently we just choose the first README that can be rendered, where "first" is determined by the order of the git tree. I don't know if git trees are in any deterministic order. I'll work on getting this fixed on Monday.
You'll generally get a faster response if you contact [email protected]. |
👍 to displaying |
+1 |
This issue is solved by changing the |
This is true. It looks like git trees use asciibetical order, so Either way, we don't expect everyone to rename their files, so we will get it fixed. |
Your To answer the question in the original post, generally we look for "formatted" README files before plaintext ones, and we sort them alphabetically (now — it was ASCIIbetical until just a short while ago, hence the problem with
(In all examples, the first element in the list is the one used as the README.) But that's a little unclear because it's also just plain alphabetic order. If instead of ReStructured Text there were a format called "ZappoText" with an extension
And if the markdown file were deleted, it'd be
And finally, if the only existing file were the plaintext That's what we do right now, at least. We may do something more sophisticated in the future. We may never find something that works better than this, which is good news for the AsciiDoc fans. |
Thank you! |
Now that we have multiple README files, one for Docker Hub, and another for Github, we have the wrong file rendered by Github because it chooses the Markdown instead of the RST file (alphabetical order [1]). We rename the README.md to README to resolve this, as this seems to help us get the right file in both cases. [1] github/markup#360 (comment)
Hi @bkeepers
Following the merge of PR #343, everything has been working great, but there is a new issue that has come up. If a repository contains both a
README.Rmd
and aREADME.md
, GitHub now showsREADME.Rmd
. I'm sure you have some mechanism in place to handle which file to choose when repos contain multiple README files/formats.Example: https://github.com/ropensci/git2r
Here you see the raw, unparsed Rmd is shown by default, when in fact the parsed README is what needs to be displayed.
So if I were to have
README.md
,README.rst
andREADME.txt
(same repo and same folder), how is the order determined?If it is possible to set the order,
README.md
should always be displayed overREADME.Rmd
since the latter contains unparsed code. The purpose of having both files in the same folder is so that with each software update, the author can parse theRmd
file and have the most up to date code rendered into theREADME.md
.I apologize if this issue needs to go elsewhere so please close and open in the right repo.
Thank you.
The text was updated successfully, but these errors were encountered: