Skip to content

Commit c427e1c

Browse files
authored
Documentation (#7103)
* added note on importance of site_url this was in response to #4678 (comment) * re-wording to say why site_url is always needed
1 parent 9d901a3 commit c427e1c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/creating-your-site.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,22 @@ This will create the following structure:
3737

3838
### Minimal configuration
3939

40-
Simply add the following lines to `mkdocs.yml` to enable the theme:
40+
Simply set the `site_name` and add the following lines to `mkdocs.yml` to enable the theme:
4141

42-
``` yaml
42+
``` yaml hl_lines="2-5"
43+
site_name: My site
44+
site_url: https://mydomain.org/mysite
4345
theme:
4446
name: material
4547
```
4648
49+
The `site_url` setting is important for a number of reasons.
50+
By default, MkDocs will assume that your site is hosted at the root of
51+
your domain. This is not the case, for example, when [publishing to GitHub
52+
pages] - unless you use a custom domain. Another reason is that some of the
53+
plugins require the `site_url` to be set, so you should always do this.
54+
55+
[publishing to GitHub pages]: publishing-your-site.md#github-pages
4756
[installation methods]: getting-started.md#installation
4857

4958
???+ tip "Recommended: [configuration validation and auto-complete]"

0 commit comments

Comments
 (0)