Problem/Motivation
The current standards does not include Markdown as a documentation file type.
Benefits
If we adopted this change, the Drupal Project would benefit by ...
Three supporters required
- https://www.drupal.org/u/quietone (2025-01-29)
- https://www.drupal.org/u/baluertl (2025-01-29)
- https://www.drupal.org/u/ressa (2025-01-29)
Proposed changes
See the MR
Remaining tasks
Create this issue in the Coding Standards queue, using the defined templateList three supportersCreate a Change Record- Review by the Coding Standards Committee
- Coding Standards Committee takes action as required
- Tagged with 'Needs documentation edits' if Core is not affected
- Discussed by the Core Committer Committee, if it impacts Drupal Core
- Documentation updates
- Edit all pages
- Publish change record
- Remove 'Needs documentation edits' tag
- If applicable, create follow-up issues for PHPCS rules/sniffs changes
For a fuller explanation of these steps see the Coding Standards project page
Issue fork coding_standards-3012906
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:
- 3012906-update-md
changes, plain diff MR !13
Comments
Comment #2
bklineI would have offered a patch/PR, but the repository, linked as "Browse repository" on the project page, appears to be empty.
Comment #3
bklineComment #4
drunken monkeyAgreed, seems like a simple oversight. The “easier viewing on Windows” reasoning is also a bit strange if we then require Unix-style file endings (which the normal Windows editor will just ignore).
Suggested new text:
Comment #5
drunken monkeyComment #6
WebbehMarking a parent issue on Markdown policy adoption that facilitate direction or movement on this issue.
Comment #7
damienmckenna+1 for mentioning use of Markdown syntax for README files so people stop pushing back on efforts to update project documentation because it is not inline with our coding standards.
Bumping the priority because the coding standards are 18 months behind the direction core set (#3192842: Make our README more welcoming by converting it into an "entrypoint" into the Drupal ecosystem).
Comment #8
damienmckennaHow about:
Comment #9
bklineThat language looks fine. Was the link to the Wikipedia article on Markdown dropped intentionally?
Comment #10
damienmckennaThat was accidental.
Comment #11
bkline+1
Comment #12
damienmckennaLet's RTBC it to get some attention to this as the lack of guidance on this is causing needless pushback.
Comment #13
avpadernoThe Drupal coding standards has a section about the Markdown coding standards. That should be linked, instead of the Wikipedia article.
Comment #14
bkline@apaderno I would agree that at some future time after the dust has settled for the issues linked by that section and the section has some directly usable information (instead of just those links, which is all it has right now) linking to that section might be a good idea. Perhaps linking to both (that section as well as a source of general information about Markdown) would be appropriate when that state has been reached, as the original purpose of providing a link was to help anyone not familiar with Markdown, not to provide guidance on how Markdown should be used in Drupal. At the moment, however, going down the rabbit hole of the Markdown coding standards links leads to a very low useful-signal-to-noise ratio, from the point of view of either question ("What is Markdown?" and "Are there special considerations I should be aware of when using Markdown for documenting Drupal modules?").
Comment #15
damienmckennaAgreed with #14; further improvements can be handled later once there's something to link to.
Comment #16
WebbehI think from this, https://www.drupal.org/node/2562925 could be expanded with that information and linked to the Wikipedia entry (or another URL of expertise, is there a Markdown spec documentation?). Is that an appropriate thing to begin populating documentation on that Coding Standards page now?
Comment #17
avpadernoWithout an issue that is marked as fixed from users who can mark it as fixed, the coding standards pages cannot be changed.
Comment #18
jonathan1055 commentedI have updated the issue summary with the improvements from comments #8 and #10 and a slight reduction of unnecessary words for clearer reading.
The next thing to do will be to use the new Coding Standards issue template being trialed on #3387167: Add an issue template for the Coding Standards project. This contains the new process for getting standards agreed and documentation pages updated.
Comment #19
quietone commented@jonathan1055, thanks for updating the IS.
I haven't found 'all-caps' in a dictionary so am suggesting a change. Also, I don't think the extension includes the '.' nor do I think the examples need to be given twice. So, how about this
Comment #20
alex.skrypnykI have to agree with #13 and disagree with #14, sorry. I do not see a point to linking to Wikipedia and then, later, re-linking to D.O - this feels like following a process for the sake of the process. Majority of developers already know what Markdown is. If we want it to be formatted in a specific way according to Drupal standards, then we have a page for it in D.O. Although that page does not have much right now, it will be filled separately outside of this issue, which is not about the Markdown format but about the file naming conventions.
I'm putting this issue back to Needs work to discuss this more.
Comment #21
mohd sahzad commentedComment #22
mohd sahzad commentedComment #23
quietone commentedUpdated to use the new coding standards issue template.
Are there changes to be made to "The Module documentation guidelines"?
Comment #24
bkline#23 None of which I'm aware. What did you have in mind? This issue assumes that the implication in the module documentation guidelines (that the use of markdown for such documentation is appropriate) is correct.
I had no idea when I pointed out the discrepancy five years ago that it would turn out to be so controversial. 😉
Comment #25
quietone commentedYes, let's remove the link to Wikipedia. It could link to something else, but what; GitLab's flavor, CommonMark or something else? So, let's just remove the link all together..
Comment #26
baluertlAs an avid documentation person, I support the idea that such a sophisticated software ecosystem as Drupal must embrace and promote a more modern markup format for writing all our valuable documentation.
I can imagine even some automated tools to implement for converting current .txt files into .md files. And of course, the CommonMark initiative is the best option to promote for our community, I believe.
Comment #27
quietone commented@baluertl, you may interested in #3463660: [policy, no patch] Document high-level API concepts in an easier format
Comment #28
ressaThe README template links to these Markdown resources:
https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...
I agree that Markdown should be used for documentation files, it's a wonderful format!
PS. Thanks for the link @quietone, I am adding as related, to connect these issues.
Comment #29
ressaWith three supporters, I guess next step is writing a Change Record?
From https://www.drupal.org/project/coding_standards
Comment #30
quietone commented@ressa, yes, the change record is next.
Comment #31
quietone commentedComment #32
anicotoHi my name is Ana (@anilu) and we are at Drupalcon Atlanta mentored contribution workshop and are working in documentation for Media core module
Comment #33
derrekc commentedHi -- my name is Derrek (@derrekc) and we are at DrupalCon ATL.
Mentored by @anilu
Comment #34
anicotoDocumentation to complete this ticket can be found in the ticket tags > about tags https://www.drupal.org/list-changes/drupal
Comment #35
derrekc commentedHere is the "Change Record" link:
https://www.drupal.org/node/3515822
Comment #36
avpadernoThat is not the description for a change record. A change record describes the change done; it does not ask to modify something.
Comment #37
avpadernoSee the existing Coding Standards change record, such as The "short ternary" operator "?:" must be used where the first operand of a ternary expression matches the condition, or Use UpperCamelCase for enum and enum case values, which are not created as Drupal core change records.
Comment #38
anicotoThanks @avpaderno, we are still working on this issue. We are at the mentoring room at Drupalcon Atlantla working on this. The change record is still in draft version but we have completed the requested change to the documentation in https://www.drupal.org/node/161085#readme
Thanks for the direction for next steps.
Comment #39
mserven commentedI am working on the at DC ATL 25 with derrekc; being mentored by anilu@
Comment #40
mtalai commentedI'm working on this issue with with @derrekc at ATL 25; being mentored by @anilu
Comment #41
jonathan1055 commentedIf any of the new people recently commenting and working on this issue would like to contribute here, then issue summary needs to have the "Benefts" section filled in. Currently it only has the original text from in the template:
Comment #42
quietone commentedTook another look at this today. @jonathan1055, is correct that completing that issue summary would help. However, and in hindsight, I don't think we need to go through the Coding Standards process because this is simply bring this documentation up to date with current practice. The full process is needed for changes to the standards not making corrections in the documentation.
I have created an MR for this and changing to NR.
Comment #44
drunken monkeyThanks, looks good to me!
Comment #47
quietone commentedThanks!
I have deleted the change record since it is not needed. And updated credit to include those from Drupalcon Atlanta who worked on the change record.
Comment #49
jonathan1055 commentedI tried to find this new page in the documentation site, I browsed looking for 'documentation' but could see nothing. Eventually I resorted to looking at the commit above, to see that it is in docs/php/coding.md so then I went back to the Doc site, opened the PHP section and still hade to scroll and search until I found it.
The paragraph is called 'File Names" but it only talks about documentaion pages, so its not really related to PHP at all. Maybe there should be a new top-level "Documentation" menu item for this kind of standard? The MR was only opened after most of the discussion above, and I'm sorry I did not get back to this issue and raise this question quickly. It's not a big problem. Do we have a general issue open for restructuring the menu, etc, or maybe there are other migration tasks still to be done first?
Comment #50
quietone commented@jonathan1055, can you open a new issue for #49? Thanks.