From 16e004a200e88785bc0ce4ef7a1c5f548048e57e Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Tue, 8 Jun 2021 17:58:44 +0200 Subject: [PATCH] fix: set edit_uri with docs subdir --- docs/docs/tutorial/setup-project.md | 7 ++++--- docs/mkdocs.yml | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/docs/tutorial/setup-project.md b/docs/docs/tutorial/setup-project.md index 1707479..4ff04a1 100644 --- a/docs/docs/tutorial/setup-project.md +++ b/docs/docs/tutorial/setup-project.md @@ -18,15 +18,16 @@ This is the simplest MkDocs site you can make: - `docs/` - `index.md` - Homepage in the `docs` directory (by default). -- `mkdocs.yml` +- `mkdocs.yml` - Config at the root - control appearance and navigation of your site. - See this project's [docs/mkdocs.yml](https://github.com/MichaelCurrin/mkdocs-quickstart/blob/master/docs/mkdocs.yml) file on GitHub. - + Notes on fields for the config: - `site_name` - title of your site. - `site_description` - used as a description for SEO and you could use it somewhere in your template. -- `repo_url` - for _Edit on GitHub_ button. +- `repo_url` - for _Edit on GitHub_ button. See [docs](https://www.mkdocs.org/user-guide/configuration/#repo_url). +- `edit_uri` - defaults to `edit/master/docs/`, which includes `docs` directory of markdown files inside your repo root. But, if the site's root is in an outer `docs` directory, then you need to _also_ add that, so paths do not break. e.g. `edit/master/docs/docs`. See [docs](https://www.mkdocs.org/user-guide/configuration/#edit_uri) ### Requirements file diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index a9368be..66f9afa 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -4,6 +4,7 @@ site_name: MkDocs Quickstart site_description: Starter template for a MkDocs docs site on GH Pages - including CI repo_url: https://github.com/MichaelCurrin/mkdocs-quickstart +edit_uri: edit/master/docs/docs ### Build settings ###