# Rename documentation files from \`.txt\` to \`.rst\`

**URL:** <https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699>\
**Category:** Documentation\
**Created:** [March 19, 2025, 2:23pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699 "2025-03-19T14:23:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![adamchainz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/adamchainz/32/26_2.png) [@adamchainz](https://forum.djangoproject.com/u/adamchainz)\
**Post date:** [March 19, 2025, 2:23pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/1 "2025-03-19T14:23:24Z")

</div>

13 years ago, [Ticket #18448](https://code.djangoproject.com/ticket/18448) proposed renaming the docs files from `.txt` to `.rst`, so editors and GitHub would automatically use reStructuredText syntax highlighting and other features. @jacobian closed it as wontfix it at the time.

In the last two weeks, @mlissner and @medmunds have both commented challenging the resolution. I agree with them, so it sounds like we have some impetus go ahead with the rename.

There would be some temporary disruption, such as for docs backports by the Fellows (@sarahboyce @nessita ). But I think it would be worth it in the end.

Any opinions?

---

<div class="post-metadata">

**Author:** ![Lily-Foote](https://avatars.discourse-cdn.com/v4/letter/l/c37758/32.png) [@Lily-Foote](https://forum.djangoproject.com/u/Lily-Foote)\
**Post date:** [March 19, 2025, 2:27pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/2 "2025-03-19T14:27:22Z")

</div>

I agree that this is causing ongoing pain. I am in favour of a one-time churn here to improve the experience long-term.

---

<div class="post-metadata">

**Author:** ![alexgmin](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@alexgmin](https://forum.djangoproject.com/u/alexgmin)\
**Post date:** [March 19, 2025, 2:58pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/3 "2025-03-19T14:58:58Z")

</div>

I agree on renaming it.

This was discussed in October last year in the discord with mixed opinions.  
[https://discord.com/channels/856567261900832808/859997770274045954/1298016328774582396](https://discord.com/channels/856567261900832808/859997770274045954/1298016328774582396)

In November there was discussion of an action to detect documentation length issues.  
[https://discord.com/channels/856567261900832808/859997770274045954/1308931342867759206](https://discord.com/channels/856567261900832808/859997770274045954/1308931342867759206)

For this last one, there’s a github action that I found, however it expects .rst files. I created an issue to support .txt files but never got a reply.

---

<div class="post-metadata">

**Author:** ![sarahboyce](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/sarahboyce/32/12734_2.png) [@sarahboyce](https://forum.djangoproject.com/u/sarahboyce)\
**Post date:** [March 19, 2025, 3:33pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/4 "2025-03-19T15:33:53Z")

</div>

To share the points from @felixxm on the Discord, in case anyone doesn’t have access:

- this needs investigation as to whether this would break doc translations
- this will make checking git history more complicated as `--follow` works only for a single file

The git history impact is the main concern, unless there is a solution for this, I don’t think this can be progressed (or is worth progressing).

---

<div class="post-metadata">

**Author:** ![nessita](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/nessita/32/12194_2.png) [@nessita](https://forum.djangoproject.com/u/nessita)\
**Post date:** [March 19, 2025, 3:36pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/5 "2025-03-19T15:36:22Z")

</div>

Thank you, Alex, for sharing the Discord link. I was just about to reference the recent discussion on this topic in Discord as you just did.

From my reading of the summary, there seems to be a strong sentiment that renaming the files could cause more problems than it would solve, particularly when it comes to Git history and Fellows/reviewers/triagers workflow. Given these potential complications, I’m inclined to think that changing the file extension may not be worth it.

One proposed middle ground was allowing a mixture of `.txt` and `.rst` files, but I’m strongly against that approach, as I feel it creates inconsistency that could complicate things more than it helps. In a way this approach would be the worst of the two worlds. Overall, I lean towards not progressing this change unless there’s a more substantial benefit to offset the costs.

> **Side note: I don't think Discord is that useful when referencing public conversations, this is a separated topic but because I have had troubles reading past Discord conversations, I'm extracting the relevant bits and adding them below for posterity. Expand!**
>
> ### Thibaud Colas _—_ 10/21/24, 5:13 PM
> 
> Does anyone know why Django uses `.txt` for its reStructuredText docs? I find myself wondering if there’s a reason why. I could use more syntax highlighting
> 
> ### Carlton Gibson _—_ 10/22/24, 5:53 AM
> 
> No idea the origin: Dawn of time. You should be able to set language-file associations in your editor (per project hopefully). I’m not against you suggesting changing it to .rst but I’m not opening the batting there either
> 
> ### Thibaud Colas _—_ 10/22/24, 5:54 AM
> 
> I have, just can’t do that in GitHub, and I’m hesitant to suggest this workaround for new contributors I help with docs changes
> 
> ### Alex _—_ 10/22/24, 6:17 AM
> 
> Changing it makes the future easier for everyone since we use the “standard” file extension, I think the question is if the possible merge conflicts for existing branches when the change happens are worth it.
> 
> ### Baptiste _—_ 10/22/24, 6:32 AM
> 
> Wouldn’t git be able to handle it if it’s a straight up rename?
> 
> ### Thibaud Colas _—_ 10/22/24, 6:36 AM
> 
> yes IIRC straight-up renames should be fine, just needs _some_ finnesse if we had to do renames and then updating file references(?)
> 
> ### Mariusz Felisiak _—_ 10/22/24, 6:38 AM
> 
> I wonder if this will not break doc translations
> 
> and it will make checking git history a bit more complicated
> 
> as `--follow` works only for a single file
> 
> I don’t think it’s worth doing
> 
> ### CodenameTim (he/him) _—_ 10/22/24, 7:32 AM
> 
> git diff should handle renames, unless I’m misunderstanding your use case.
> 
> ### Mariusz Felisiak _—_ 10/22/24, 7:45 AM
> 
> I’m taking about `git log` or `git blame`
> 
> It’s a every day job to dig into the source of changes in the Django repository
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 7:48 AM
> 
> A file’s Git history doesn’t move with a rename. You would have to rewrite all the historical commits if you want to retain them
> 
> ### Mariusz Felisiak _—_ 10/22/24, 7:49 AM
> 
> For example:
> 
> ```auto
> $ git log django/db/backends/base/ __init__.py
> 
> commit 28308078f397d1de36fd0da417ac7da2544ba12d
> Author: Tim Graham <timograham@gmail.com>
> Date: Mon Jan 12 15:20:40 2015 -0500
> 
> Fixed #22603 -- Reorganized classes in django.db.backends.
> 
> ```
> 
> Tim renamed this file so you have to dig deeper with `--follow`
> 
> ```auto
> git log --follow django/db/backends/base/ __init__.py
> commit 28308078f397d1de36fd0da417ac7da2544ba12d
> Author: Tim Graham <timograham@gmail.com>
> Date: Mon Jan 12 15:20:40 2015 -0500
> 
> Fixed #22603 -- Reorganized classes in django.db.backends.
> 
> commit ed114e15106192b22ebb78ef5bf5bce72b419d13
> Author: Adrian Holovaty <adrian@holovaty.com>
> Date: Wed Jul 13 01:25:57 2005 +0000
> 
> Imported Django from private SVN repository (created from r. 8825)
>     
>     
> git-svn-id: http://code.djangoproject.com/svn/django/trunk@3 bcc190cf-cafb-0310-a4f2-bffc1f526a3
> 
> ```
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 7:51 AM
> 
> Do the SVN logs still exist somewhere? The `git-svn-id` link gives me a 404 on Trac.
> 
> This is akin to programmer archeology.
> 
> ### Mariusz Felisiak _—_ 10/22/24, 7:52 AM
> 
> renaming all doc files will force Fellows (and others like me) to do this every single time
> 
> ### Mariusz Felisiak _—_ 10/22/24, 7:52 AM
> 
> As far as I’m aware you would have to have copy of the private SVN repository
> 
> ed114e15106192b22ebb78ef5bf5bce72b419d13 this is like a holy grail or big bang
> 
> the beginning of everything
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 7:54 AM
> 
> These days, I am in the fortunate mental state that I often forget that SVN existed. I wouldn’t even know how it works, anymore
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 7:54 AM
> 
> Time to slap a theme song on it
> 
> But in all seriousness, since I was looking at some code yesterday that predates the Git repo, I found it unfortunate that I couldn’t find the reasoning behind some of the lines in the code. That is under the assumption that the SVN commits would have a descriptive message, but the context usually helps.
> 
> (Not to derail Thibaud’s original question about why the RST files use the `.txt` extension and whether we still want that)
> 
> ### Ben _—_ 10/22/24, 8:01 AM
> 
> You can centrally mark certain commits to be excluded from `git blame` I believe, if that helps
> 
> ### Mariusz Felisiak _—_ 10/22/24, 8:03 AM
> 
> It won’t help
> 
> as it’s not about having less history
> 
> but about tracking to the source of specific changes
> 
> ### CodenameTim (he/him) _—_ 10/22/24, 8:05 AM
> 
> Does it `git log -- follow` do what we’re missing? [Git - git-log Documentation](https://git-scm.com/docs/git-log#Documentation/git-log.txt---follow)
> 
> Ah single file
> 
> Boo
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 8:05 AM
> 
> You can even configure your Git to automatically follow blames, but it has some performance implications, and you don’t control how other people configure their system.
> 
> IMO, I would say “If it ain’t broken, don’t fix it” in this case.
> 
> ### CodenameTim (he/him) _—_ 10/22/24, 8:06 AM
> 
> Configuration definitely feels like something django can control
> 
> ### CodenameTim (he/him) _—_ 10/22/24, 8:07 AM
> 
> But the original case (rst files using txt file extensions confusing new contributors) is arguably broken.
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 8:10 AM
> 
> That’s a minefield. You cannot control someone’s global `.gitconfig` (thank goodness), and arbitrarily messing with default behavior is confusing. It’s the same with things like `.git-blame-ignore-revs` ; I occasionally use it and put instructions in a README for people on activating it, but it’s all optional.
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 8:11 AM
> 
> Fair. Someone is going to lose somewhere. But I think the impact of converting from `.txt` to `.rst` is much bigger than keeping it the way it is now. Of course, that doesn’t mean we shouldn’t consider it.
> 
> ### Thibaud Colas _—_ 10/22/24, 8:14 AM
> 
> Going through the commit history, can confirm it’s been `.txt` since the dawn of times (here’s the [first ever docs file from what I can see](https://github.com/django/django/blob/ce079538c66d826be5f0c4260ab4405b7abcbed7/docs/faq.txt)). So I’ll just assume there wasn’t a `.rst` back then and that’s about it as far as the decision to use `.txt` .
> 
> I’m not going to suggest we’d want to change this, just interested in the rationale when I explain this to others. It looks like this to configure VS Code to treat the files as reStructuredText if anyone needs it:
> 
> ```auto
> "files.associations": {
> " **/docs/** /*.txt": "restructuredtext"
> }
> 
> ```
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 8:20 AM
> 
> If anyone needs a reminder, I listed a variant of this for Django on my blog: [Quick tip: Set folder-based file associations in Visual Studio Code / Marijke Luttekes](https://marijkeluttekes.dev/blog/articles/2023/07/27/quick-tip-set-folder-based-file-associations-in-visual-studio-code/)
> 
> ### Thibaud Colas _—_ 10/22/24, 8:23 AM
> 
> oh if anyone _did_ want to suggest that `.rst` change, it does seem like all of the above is only pain related to existing files moving over. So new docs could be authored as `.rst` it seems? Sphinx has good support for mixed file extensions / formats.
> 
> ### nessita _—_ 10/22/24, 3:05 PM
> 
> I’m torn and terrified by having some with one extension, some with other extension
> 
> MY EYES MY EYES
> 
> I personally think it’s a bad idea to have a mixture of file extensions (txt and rst), because in that scenario, you have to explain why txt and WHY a little bit of both. To me is the worst of the two worlds.
> 
> ### nessita _—_ 10/22/24, 3:16 PM
> 
> I would be open to consider a moving away from txt files but in that case I would advocate to migrate to markdown
> 
> so we do a proper disruptive thingy worth messing up with the history (but please note I’m not saying we should)
> 
> ### Baptiste _—_ 10/22/24, 4:09 PM
> 
> Maybe host the documentation on Github wiki (sorry, that was a bad joke)
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 4:37 PM
> 
> Was it a joke?
> 
> ### nessita _—_ 10/22/24, 4:37 PM
> 
> since we are talking docs, am I missing something or these definitions for “attributes” inside class definition should have their description indented one level in? [Blaming django/docs/ref/contrib/gis/gdal.txt at main · django/django · GitHub](https://github.com/django/django/blame/main/docs/ref/contrib/gis/gdal.txt#L842) (cc/ @Mariusz Felisiak maybe you know how’s the correct indentation for these?)
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 4:38 PM
> 
> I foresee the migration of the docs to Markdown files as Natalia’s Magnus Opus as a Fellow
> 
> ### nessita _—_ 10/22/24, 4:38 PM
> 
> Please note that I wasn’t necessarily proposing that migration!
> 
> I said that IF we will consider the file extension rename, THEN we should do the whole mic drop properly
> 
> ### Marijke (Mah-Rye-Kuh) _—_ 10/22/24, 4:39 PM
> 
> Just teasing you Although I wouldn’t be against it; I don’t like RST haha.
> 
> But yeah, if you do something drastic, better do it well the first time.
> 
> ### Baptiste _—_ 10/22/24, 4:42 PM
> 
> You mean “should” as in “otherwise sphinx doesn’t parse them right”, or as in “according to Django’s styleguide”?
> 
> ### nessita _—_ 10/22/24, 4:48 PM
> 
> Neither, as in “should to be semantically correct”
> 
> ### Ülgen _—_ 10/22/24, 9:33 PM
> 
> Wouldn’t be more interesting than trac - github issues migration
> 
> ### Carlton Gibson _—_ 10/23/24, 6:00 AM
> 
> Wowser that last 60 messages or so is quite painful

---

<div class="post-metadata">

**Author:** ![mlissner](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/mlissner/32/23821_2.png) [@mlissner](https://forum.djangoproject.com/u/mlissner)\
**Post date:** [March 19, 2025, 5:31pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/6 "2025-03-19T17:31:04Z")

</div>

My comment about this was four years ago, not two weeks, but I’ll stand by my point that syntax highlighting is useful.

Sounds like the question is:

1. Syntax highlighting now and forevermore is a nice thing.

2. But this will break git history (though this will get better over time as old changes become less relevant).

So, which is more important? To me, an occasional tweaker of documentation that rarely touches reStructured text, the syntax highlighting is much more important than the git history. I imagine when reviewing PRs that’s true too.

How often do folks dig into the git history of documentation files? Seems sort of niche to me, particularly for documentation files, but perhaps my experience is limited?

---

<div class="post-metadata">

**Author:** ![jacobian](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/jacobian/32/279_2.png) [@jacobian](https://forum.djangoproject.com/u/jacobian)\
**Post date:** [March 19, 2025, 6:03pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/7 "2025-03-19T18:03:26Z")

</div>

If it’s just about syntax highlighting on Github, can that be solved with a config change like the one you did [here](https://github.com/django/django/commit/0dcc4a1dbc56b1f3aef9be749aff96a85ca92721)? Or am I missing something?

---

<div class="post-metadata">

**Author:** ![medmunds](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/medmunds/32/22140_2.png) [@medmunds](https://forum.djangoproject.com/u/medmunds)\
**Post date:** [March 19, 2025, 6:58pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/8 "2025-03-19T18:58:24Z")

</div>

That was [my thought too](https://github.com/django/django/pull/19279#issuecomment-2734378910). (And what precipitated bringing this up again.) But GitHub has a preview rendering bug that makes .gitattributes linguist overrides [unworkable](https://github.com/medmunds/django/blob/syntax-highlight-docs/docs/intro/overview.txt) for text markup types.

Also, it’s not _just_ about syntax highlighting on GitHub (though that would be a useful step). It’s about editor support in general.

---

<div class="post-metadata">

**Author:** ![nessita](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/nessita/32/12194_2.png) [@nessita](https://forum.djangoproject.com/u/nessita)\
**Post date:** [March 19, 2025, 7:25pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/9 "2025-03-19T19:25:04Z")

</div>

> [@mlissner](#):
>
> So, which is more important? To me, an occasional tweaker of documentation that rarely touches reStructured text, the syntax highlighting is much more important than the git history. I imagine when reviewing PRs that’s true too.

As a Django Fellow, I can say that day-to-day work relies heavily on git history, far more than on syntax highlighting. Speaking personally, I rarely use GitHub’s preview or syntax highlighting when reviewing. Instead, I always branch and work locally because a thorough, in-depth review requires more than what the GitHub UI provides. The first example that comes to mind is having to disable or change code to ensure the provided tests are correct.

> [@mlissner](#):
>
> How often do folks dig into the git history of documentation files? Seems sort of niche to me, particularly for documentation files, but perhaps my experience is limited?

It may not be immediately obvious, but in Django’s case, reviewing documentation often involves cross-checking against code, existing practices, docstrings, and previous documentation. When inconsistencies arise, we frequently rely on git history to determine whether a change was intentional or a mistake. This is a routine part of maintaining consistency and accuracy.

> [@mlissner](#):
>
> But this will break git history (though this will get better over time as old changes become less relevant).

Unfortunately, this won’t improve over time, at least not within a reasonable timeframe. If you check the history of most documentation files (outside of the `releases` folder), you’ll find commit records spanning 15 years or more. Django values long-term stability, so both code and documentation are maintained with longevity in mind. We rarely remove or replace things outright, meaning history remains relevant for much longer than one might expect.

> [@medmunds](#):
>
> GitHub has a preview rendering bug that makes .gitattributes linguist overrides unworkable for text markup types.

I’m not in favor of making an invasive change to workaround an bug in a platform that is younger 👶 than the framework we love. I know Mike said this is not the only reason, so more on that below :-).

> [@medmunds](#):
>
> it’s not _just_ about syntax highlighting on GitHub (though that would be a useful step). It’s about editor support in general.

Could you share more details on this? Are there specific editors that aren’t handling `.txt` as `.rst` well? It would be helpful to gather more concrete examples or data points to better understand the impact across different environments.

---

<div class="post-metadata">

**Author:** ![medmunds](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/medmunds/32/22140_2.png) [@medmunds](https://forum.djangoproject.com/u/medmunds)\
**Post date:** [March 19, 2025, 7:56pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/10 "2025-03-19T19:56:20Z")

</div>

In PyCharm, you have to [manually override](https://www.jetbrains.com/help/pycharm/creating-and-registering-file-types.html#quickly-change-file-type) the file type for each individual .txt file, every time you open it. Or change your global .txt type to reStructuredText, which gets confusing for plain text files in other projects. (JetBrains users can—and should!—vote for overriding file types [per project](https://youtrack.jetbrains.com/issue/IDEABKL-6335/Assign-file-types-not-only-globally-but-project-wide-as-well) and [by directory pattern](https://youtrack.jetbrains.com/issue/IJPL-2316/Dynamic-File-Type-Patterns).)

[GitHub’s quick editor](https://github.com/django/django/edit/main/docs/intro/overview.txt) doesn’t seem to have any way to control the file type, other than by file extension.

It looks like VS Code has a config option:

> [@nessita quoting @thibaudcolas from Discord](#):
>
> ```auto
> "files.associations": {
> " **/docs/** /*.txt": "restructuredtext"
> }
> 
> ```

With all of these, you have to first know that the .txt files are actually reStructuredText. And that that’s a markup format with editor support you might want to enable. (And it’s different from Markdown.) It’s maybe not a huge barrier, but I’m guessing it’s one more stumbling block for new contributors.

---

<div class="post-metadata">

**Author:** ![medmunds](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/medmunds/32/22140_2.png) [@medmunds](https://forum.djangoproject.com/u/medmunds)\
**Post date:** [March 19, 2025, 8:03pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/11 "2025-03-19T20:03:46Z")

</div>

(Having said all of that, I’m -1 on anything that makes the Django Fellows’ work more difficult.)

---

<div class="post-metadata">

**Author:** ![adamchainz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/adamchainz/32/26_2.png) [@adamchainz](https://forum.djangoproject.com/u/adamchainz)\
**Post date:** [March 21, 2025, 8:19am UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/12 "2025-03-21T08:19:08Z")

</div>

> [@sarahboyce](#):
>
> this will make checking git history more complicated as `--follow` works only for a single file

Enabling [`log.follow`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-logfollow) in your Git config makes this automatic:

```auto
$ git config --global log.follow true

```

I recommend setting this in my Git book. As far as I know, there aren’t any drawbacks to setting it globally. It’s just one of many options that Git didn’t enable by default due to backwards compatibility concerns.

* * *

By the way, GitHub’s commit history doesn’t follow renames but presents a button to link through the rename, [for example](https://github.com/django/django/commits/main/django/db/backends/base/ __init__.py):

 ![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/3X/0/f/0f4bbf47060b5c661d35f9b0b7c2ddf8fa9a9f44.jpeg)

So at least it’s just a click.

* * *

Marijke wrote in the Discord conversation:

> You can even configure your Git to automatically follow blames,

`git blame` isn’t a concern either since it automatically follows file renames.

I think she may have been hinting at [`git blame -C`](https://git-scm.com/docs/git-blame#Documentation/git-blame.txt--Cltnumgt), which makes it follow _chunks_ of code moving between files.

* * *

> [@medmunds](#):
>
> It looks like VS Code has a config option:

Same for me in Zed, I had to set in my project settings:

```json
{
  "file_types": {
    "reST": ["txt"]
  }
}

```

* * *

> [@nessita](#):
>
> Speaking personally, I rarely use GitHub’s preview or syntax highlighting when reviewing. Instead, I always branch and work locally

Right, that’s fair, but did you configure your editor to get reST highlighting or other features?

* * *

> [@sarahboyce](#):
>
> this needs investigation as to whether this would break doc translations

This is a good question. As far as I can see, the translation files do _not_ specify the filename of their source document, e.g. [this one](https://github.com/django/django-docs-translations/blob/stable/5.1.x/translations/el/LC_MESSAGES/contents.po). In fact, they’re merged across many documents already, like all of the `ref` docs have their translated strings in one giant `ref.po` file.

So, we might be good? Obviously needs testing.

* * *

I’m still in favour of the change, and I think most concerns can be mitigated. But whatever the consensus here, I’m more happy that we’ve discussed it properly! Thanks everyone for taking time here.

---

<div class="post-metadata">

**Author:** ![medmunds](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/medmunds/32/22140_2.png) [@medmunds](https://forum.djangoproject.com/u/medmunds)\
**Post date:** [March 21, 2025, 8:22pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/13 "2025-03-21T20:22:38Z")

</div>

> [@nessita](#):
>
> > [@medmunds](#):
> >
> > it’s not _just_ about syntax highlighting on GitHub (though that would be a useful step). It’s about editor support in general.
> 
> Could you share more details on this? …

When I say “editor support” for reStructuredText, I’m talking about not just syntax coloring, but also things like:

- autocompleting reST directives and Sphinx references
- inline linting and error detection (e.g., PyCharm’s “inspections”)
- a rendering preview panel
- applying Python highlighting, linting, autocompletion, and formatting in embedded code blocks

One concrete example: Just this week, I committed a syntax error to a Django docs file—one not caught by a local docs build or Django CI. (Mismatched double backticks. I noticed it only because I happened to check the ReadTheDocs PR preview and saw something looked off.) If I had overridden PyCharm to use reST mode, the error would have stood out. But I tend not to bother for minor docs edits, because it’s just enough of a hassle that it breaks my flow.

> [@adamchainz](#):
>
> I’m still in favour of the change, and I think most concerns can be mitigated. But whatever the consensus here, I’m more happy that we’ve discussed it properly! Thanks everyone for taking time here.

Thank you for opening the discussion. It surfaced a bunch of concerns that weren’t captured in the ticket.

(Incidentally, I’ve reported the GitHub bug: [Preview rendering gets confused by linguist-language override · community · Discussion #154413 · GitHub](https://github.com/orgs/community/discussions/154413). But I’m not holding my breath for a fix.)

---

<div class="post-metadata">

**Author:** ![adamchainz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/adamchainz/32/26_2.png) [@adamchainz](https://forum.djangoproject.com/u/adamchainz)\
**Post date:** [March 21, 2025, 10:05pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/14 "2025-03-21T22:05:08Z")

</div>

> [@medmunds](#):
>
> When I say “editor support” for reStructuredText, I’m talking about not just syntax coloring, but also things like:

Yes, exactly. I’m using [Esbonio](https://docs.esbon.io/en/latest/index.html), an LSP for reST. It provides a lot of those same features for any editor that supports LSPs.

---

<div class="post-metadata">

**Author:** ![nessita](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/nessita/32/12194_2.png) [@nessita](https://forum.djangoproject.com/u/nessita)\
**Post date:** [March 31, 2025, 6:33pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/15 "2025-03-31T18:33:33Z")

</div>

> [@adamchainz](#):
>
> > [@nessita](#):
> >
> > Speaking personally, I rarely use GitHub’s preview or syntax highlighting when reviewing. Instead, I always branch and work locally
> 
> Right, that’s fair, but did you configure your editor to get reST highlighting or other features?

@adamchainz Good question. I’m old school and I don’t use any reST highlighting, so that’s probably why I don’t mind it. I treat docs like plain text files. The only thing I really need is the 79cols ruler 🙂.

---

<div class="post-metadata">

**Author:** ![Mariatta](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/mariatta/32/13783_2.png) [@Mariatta](https://forum.djangoproject.com/u/Mariatta)\
**Post date:** [April 3, 2026, 5:48pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/16 "2026-04-03T17:48:14Z")

</div>

I would support renaming from `.txt` to `.rst`

Python PEPs went through a similar transition. The PEPs were originally written in `.txt` files, but we adopted `.rst` along the way, resulting in both `.txt` and `.rst` PEPs existing for quite some time.  
The [issue](https://github.com/python/peps/issues/1) was first raised in 2016, we wanted to unify things and use `.rst` consistently, which means needing to rewrite a lot of PEPs from `.txt` to `.rst`. The concern about not being able to follow git history was also a blocker. However, now that GitHub supports the equivalent to `git log –follow` in their Web UI, it was no longer a problem.  
In 2022, we renamed everything from `.txt` into `.rst` and also moved the files into subdirectories in one big sweeping PR: [All PEPs: Move to ``peps/`` folder by AA-Turner · Pull Request #3418 · python/peps · GitHub](https://github.com/python/peps/pull/3418/changes)

---

<div class="post-metadata">

**Author:** ![adamchainz](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/adamchainz/32/26_2.png) [@adamchainz](https://forum.djangoproject.com/u/adamchainz)\
**Post date:** [April 5, 2026, 10:08pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/17 "2026-04-05T22:08:07Z")

</div>

Thanks for chiming in with useful context from Python, @Mariatta.

I think the next step would be to actually try it and find out how disruptive it could be. I don’t have much open source time right now, so won’t be pursuing this project, but if you or someone else would like to give it a try, please do.

---

<div class="post-metadata">

**Author:** ![codingjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/codingjoe/32/215_2.png) [@codingjoe](https://forum.djangoproject.com/u/codingjoe)\
**Post date:** [October 9, 2026, 1:55pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/18 "2026-10-09T13:55:33Z")

</div>

```auto
diff --git a/.gitattributes b/.gitattributes
index 1a5fcdfd81..085fe21570 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -6,3 +6,4 @@ tests/staticfiles_tests/apps/test/static/test/*txt text eol=lf
 tests/staticfiles_tests/project/documents/test/*txt text eol=lf
 # Make GitHub syntax-highlight .html files as Django templates
 *.html linguist-language=django
+*.txt linguist-language=reStructuredText

```

solves 50% of the issue w/o with a one-line patch

---

<div class="post-metadata">

**Author:** ![medmunds](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/medmunds/32/22140_2.png) [@medmunds](https://forum.djangoproject.com/u/medmunds)\
**Post date:** [October 9, 2026, 2:48pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/19 "2026-10-09T14:48:00Z")

</div>

> [@codingjoe](#):
>
> ```diff
> *.txt linguist-language=reStructuredText
> 
> ```
> 
> solves 50% of the issue w/o with a one-line patch

We did try that last year: see comments [#7](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/7) and [#8](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/8). But setting linguist-language like that [breaks GitHub’s file viewer](https://github.com/orgs/community/discussions/154413). (Still.)

We might decide that’s acceptable if, say, popular IDEs paid attention to linguist-language. (PyCharm doesn’t.)

---

<div class="post-metadata">

**Author:** ![codingjoe](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/codingjoe/32/215_2.png) [@codingjoe](https://forum.djangoproject.com/u/codingjoe)\
**Post date:** [October 9, 2026, 5:43pm UTC](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699/20 "2026-10-09T17:43:58Z")

</div>

Dang, would’ve been too easy 🫠

[Next page](https://forum.djangoproject.com/t/rename-documentation-files-from-txt-to-rst/39699.md?page=2)
