Skip to content

Fix MkDocs “Edit on GitHub” links#27

Merged
Snowflake-Pink merged 2 commits intoOpenFuTech:mainfrom
MengyangGao:main
May 5, 2026
Merged

Fix MkDocs “Edit on GitHub” links#27
Snowflake-Pink merged 2 commits intoOpenFuTech:mainfrom
MengyangGao:main

Conversation

@MengyangGao
Copy link
Copy Markdown
Contributor

This PR fixes broken “Edit on GitHub” links on the generated MkDocs site.
Previously, MkDocs used its default GitHub edit URI, which generated links like: /edit/master/docs/01-基础必修课/C++编程基础.md
However, this repository now uses main, and the editable source files live outside docs/, for example: 01-基础必修课/C++编程基础/README.md

Changes included:

  • Set edit_uri to edit/main/ in mkdocs.yml.
  • Added a MkDocs hook to map generated course pages back to their real source README.md files.
  • Added pycache/ to .gitignore.

The sample page now generates the expected edit link: https://github.com/OpenFuTech/SCUT-FT-Guide/edit/main/01-基础必修课/C++编程基础/README.md

Known issue:
docs/02-专业基础课/数字系统设计实验.md will map to 02-专业基础课/数字系统设计实验/README.md but that source README.md does not currently exist. This appears to be an existing content-structure issue.

@Snowflake-Pink Snowflake-Pink merged commit d0bf05a into OpenFuTech:main May 5, 2026
@Snowflake-Pink
Copy link
Copy Markdown
Contributor

LGTM. Thanks for pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants