From a532755fa83af673ab292cd4e6511f2b13d71edb Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 30 Oct 2021 13:29:35 +0200 Subject: [PATCH] Added note on --dirtyreload flag --- docs/creating-your-site.md | 13 +++++++++++-- docs/customization.md | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/creating-your-site.md b/docs/creating-your-site.md index 48e6420db..e80bff19b 100644 --- a/docs/creating-your-site.md +++ b/docs/creating-your-site.md @@ -138,9 +138,18 @@ MkDocs includes a live preview server, so you can preview your changes as you write your documentation. The server will automatically rebuild the site upon saving. Start it with: +``` sh +mkdocs serve # (1) ``` -mkdocs serve -``` + +1. If you have a large documentation project, it might take minutes until + MkDocs has rebuilt all pages for you to preview. If you're only interested + in the current page, the `--dirtyreload` flag will make rebuilds much + faster: + + ``` + mkdocs serve --dirtyreload + ``` If you're running Material for MkDocs from within Docker, use: diff --git a/docs/customization.md b/docs/customization.md index 349b38053..9c6056400 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -263,7 +263,7 @@ npm start Then, in a second terminal window, start the MkDocs live preview server with: ``` -mkdocs serve +mkdocs serve --watch-theme ``` Point your browser to [localhost:8000][live preview] and you should see this