Motivation
Many non-Drupalists' first interaction with Drupal will be via its repository since this is now the modal way finding new software projects. Drupal's repository can be found canonically on GitLab or via its mirror on GitHub. The current README.txt
can be intimidating and its format makes Drupal appear outdated since the wider open source community conventionally creates README files ending with an .md
extension that serve as a sort of project homepage.
Both platforms linked above support the Markdown format, a popular format which can be automatically upscaled into an HTML document that is pleasant to read while remaining human-readable in plain text.
Proposed resolution
Convert the current README.txt
file into a README.md
file and extract the usage related text into a USAGE.txt
file so that the README serves solely as an entrypoint into the Drupal ecosystem.
Scope
This issue isn't intended to be about the actual content of the README. It's about making the README a useful "entrypoint" to the Drupal ecosystem with minimal changes that can be improved on later. For example, this issue shouldn't attempt to make the language sound more contemporary ("weblog"? 😅). Follow-up issues can address outdated terminology or content so that we don't bikeshed this one too much :)
Therefore, significantly rewriting any other documentation files should be out of scope and converting other documentation files to Markdown is out of scope.
Release notes snippet
Drupal's README now focuses on shepherding new contributors into the Drupal ecosystem and uses the Markdown format. The usage information previously contained in the
README.txt
file has been extracted to a newly createdUSAGE.txt
file in thecore
directory. Sites that are using thedrupal/core-composer-scaffold
plugin to excludeREADME.txt
should update their configuration to excludeREADME.md
instead.
Issue fork drupal-3192842
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
gabesulliceYou can see the rendered Markdown via the issue fork here: https://git.drupalcode.org/issue/drupal-3192842/-/tree/3192842-make-our-...
Comment #4
gabesulliceComment #5
gabesulliceComment #6
phenaproximaI'd like to majorly +1 this idea. This is something I would 100% expect to see from any software hosted on GitHub, GitLab, or any comparable platform. It's long overdue for Drupal.
Comment #7
hestenetMassive +1 to this idea. Really good plan, and the in-progress work looks great.
Comment #9
gabesullice@lhockley wrote the previous commit.
Comment #10
lhockleyIt's a +1 from me.
I think a well written README that aligns with modern standards also goes a long way in establishing credibility. In turn, it can be a deciding factor for a developer who may be on the fence about "diving in" to the wonderful world of Drupal.
Comment #11
quietone CreditAttribution: quietone as a volunteer commentedLovely!
Comment #12
nod_We have the option to create a new README.md alongside the existing README.txt, and the MD file will be picked up first to display on github: https://github.com/theodoreb/test-readme/tree/main
Not saying we should do that, just that it is possible.
Comment #13
hestenetThis is looking really good! From my point of view, RTBC.
Comment #14
nod_RTBC +1 with followup to update the content and fine tune what is the audience for this file, and where we should send them.
Comment #15
nod_probably would need to credit folks from related issue too.
Comment #16
gabesulliceJust rebased (conflict was in
composer.lock
).Comment #17
xjmSo IIRC the last time we tried to replace SOMETHING.txt with a SOMETHING.md, we got blocked on an issue to define which markdown specification we would use. I am perfectly fine bypassing that discussion as it was very frustrating to me and seemed mostly irrelevant, but we should be aware of that past precedent. We should also be sure we look for past issues of people who might have tried to make this conversion, close them as dupes, and credit them here.
Comment #18
xjmxjm helped with the rebase. ;)
Looks like @nod_ already found one of the past issues. It was postponed on #2506415: Adopt Markdown for README.txt and other documentation, which has feedback from @jhodgdon that we should make sure we address here.
Adding some more related issues (including the coding standards issue that every attempt to add markdown anywhere has been blocked on). Ironically, I can't even find my own issue related to the changelog and release notes that got blocked on it.
Comment #19
xjmLooks like a lot of the past discussion was actually related to #1674976: Allow README.md to optionally render as the project page, which is a much bigger scope that shouldn't be conflated, but that's what the precedent of blocking this on linting and the exact markdown spec we support and contrib readmes and etc. has been all tangled up with.
Comment #20
xjmCrossposting Jennifer's comments:
From my perspective, acceptable answers are "That was 2015; this is 2021; basically everyone uses
README.md
nowadays" and "We don't need to lint our README" and "We aren't using any syntax advanced enough such that the spec really matters". Maybe that would let us get past the constant postponing of markdown-related issues on the coding standards issue.Comment #22
webchickCrediting @thalles from #3056153: Rename README.txt to README.md for a prior attempt.
Comment #23
gabesulliceLike you said in a later comment, there's nothing here that is crazy and not well-supported. I also think it's not a terribly useful discussion, but I'll propose a standard to evaluate this MR... does it look good on Gitlab and GitHub? The issue is about making the README a welcoming entrypoint and I think that's the best standard for that purpose.
FWIW, GitLab, Drupal's now official repository host uses an extension of CommonMark, as does GitHub-flavored Markdown. So, when/if it becomes a real problem, we can fall back to CommonMark.
It does now! :D
a) see #3 for a rendered preview.
b) see above :)
It seems like the rest of the quoted reply is about the wisdom of making it a site-wide/contrib-wide policy. This is not that issue. It's about the "entrypoint" hosted on GitHub/GitLab. I'm indifferent to whether we define a policy in a follow-up. Though, I'm sure that since GitLab automatically renders
README.md
files, I expect it's already becoming a norm for new modules...I just spot checked a list of new D9 modules that are actively supported and 6/10 are using
.md
.Comment #24
webchickAs a Product Manager, I do think this is the way to go for all "text-y" documentation files, but most definitely for README.
These days, .md is the defacto standard, since it's been used on GitHub since time immemorial, and since GitHub adoption took off like a rocketship in the mid-2010s.
A crude metric to demonstrate this:
Google search for "readme.txt": "About 25,800,000 results"
Google search for "readme.md": "About 55,400,000 results"
Additionally, we're now on a code repository browser that natively supports .md files; see https://git.drupalcode.org/project/webform as an example. It makes sense to leverage this, especially since from a usability POV, the difference from within the code browser is pretty night and day:
The concerns raised in the other issue were around fears for the legibility for plaintext readers, but Markdown is explicitly designed to be legible in a plaintext editor:
README.txt
README.md
I'm also prone to popping things open in a plaintext editor (vi FTW! :P), and don't find the difference here stark enough to cause me concern. The "layer of indirection" way we're linking in this MR obfuscates this somewhat, but is also a pretty nice convention, especially for links that repeat. (Cool... I didn't know you could do that!)
So, big +1 to the general goal, and for moving forward with this. I need to review the actual content, which I will do shortly.
Comment #25
alexpottWe need a change record and a release note because we're changing a scaffolded file. It's not uncommon for a projects root composer.json to have something like:
In order to not scaffold the README.txt on a site. This change will result in site's getting a README.md when they are explicitly trying to not have this available.
Comment #26
phenaproximaLooks like there is already a release note in the issue summary, so removing that tag (and adding information about the scaffold file). I took a stab at a change record: https://www.drupal.org/node/3196810
Restoring RTBC in the hopes that these will do the trick.
Comment #27
gabesulliceThanks @phenaproxima, that looks good.
Comment #29
webchickOk! Sorry for the delay; finally had a chance to review the text in more detail.
So the old README had both factual errors (e.g. "For information about the wide range of available support options, visit https://www.drupal.org and click on Community and Support in the top or bottom navigation." which... is not a thing. :P) and a confusing flow ("This is what Drupal is... now KNOW YOUR RIGHTS!!")
The new version flows well, and has ample links directly to helpful resources vs. tossing people in a general area. I love pushing the community front and centre, since that's a big reason to use Drupal, and also love informing people about modules front and centre, since that's where 90% of the power of Drupal is, and making that explicit removes a lot of face-desking.
Looking forward to further improvements, e.g. to the new USAGE.txt :D Thanks SO much Gabe and everyone else who contributed to this! <3
Committed and pushed to 9.2.x. Thanks!
Comment #30
webchickOh. I got freaked out by the composer.lock change, but was informed that if this isn't done a test fails because README is part of the scaffold. The More You Know™
Comment #31
nod_Pretty :) https://github.com/drupal/drupal
Comment #32
alexpottWe need to mention this in the release note because plenty of people remove the readme from their site builds eg. https://www.acquia.com/README.txt and I'm pretty sure people don't a README.md all about Drupal on their top-level either.