Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.7k
🛠️ Updatedocs.py generate-readme command to remove permalinks from headers#14055
Merged
tiangolo merged 2 commits intofastapi:masterfromSep 20, 2025
Merged
Conversation
Contributor
📝 Docs preview for commitd8ffc5d at:https://b9ce87d1.fastapitiangolo.pages.dev |
svlandeg approved these changesSep 9, 2025
tiangolo approved these changesSep 20, 2025
Member
tiangolo left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Excellent job, thanks@YuriiMotov! 🙌
| site_path = Path("site").absolute() | ||
| build_site_path = Path("site_build").absolute() | ||
| header_with_permalink_pattern = re.compile(r"^(#{1,6}) (.+?)(\s*\{\s*#.*\s*\})\s*$") |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Fancy RegEx! 🤯 😎
47acc62 intofastapi:master 56 checks passed
Uh oh!
There was an error while loading.Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently
docs.py generate-readmecommand copies content fromindex.mdand that document contains permalinks for headers.Thus, these permalinks are displayed when people read
README.mdon GitHub:https://github.com/fastapi/fastapi?tab=readme-ov-file#sponsors--sponsors-This PR modifies
docs.pyscript to remove permalinks whenREADME.mdis generated