跳转至

mkdocs github部署

在此之前,确保已将代码按照mkdocs gh-deploy。中的方法提交到github中。

1. pages设置分支

在项目settings -> Pages中设置分支为gh-pages,这样在别人输入你的github博客网址时就会访问到gh-pages中的内容。

image-20250603135901499

2. 设置edit url

Bash
repo_url: https://github.com/zhangkangcool/zhangkangcool.github.io
edit_uri: edit/main/docs/

这样在点击Edit on之后,会跳转到github上的源代码的编译位置,可以在github上直接对源文件进行修改。