mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-28 02:18:31 +07:00
When serving locally, the `site_url` actually is the `dev_addr`, so the config should relfect that. Note that this override must happen after config validation so that the proper defaults are evaluated for the `dev_addr` setting. It cannot happen as part of "post_validation" as there is no way to know the dev server is running within the config validation (for example, the dev_addr may not be None as the user could have set the `dev_addr` setting in their config file). Overriding it from the serve command is the least invasive method and guarantees it only happens when the local dev server is being run. Also cleaned up `dev_addr` docs, which were missleading in some respects and actually encouraged using the dev server over a network. Fixes #1317. 404 Error pages now work on the loval dev server when the `site_url` in the config points to a subdir.