Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added note on importance of site_url #7103

Merged
merged 2 commits into from Apr 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions docs/creating-your-site.md
Expand Up @@ -37,13 +37,22 @@ This will create the following structure:

### Minimal configuration

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

``` yaml
``` yaml hl_lines="2-5"
site_name: My site
site_url: https://mydomain.org/mysite
theme:
name: material
```

The `site_url` setting is important for a number of reasons.
By default, MkDocs will assume that your site is hosted at the root of
your domain. This is not the case, for example, when [publishing to GitHub
pages] - unless you use a custom domain. Another reason is that some of the
plugins require the `site_url` to be set, so you should always do this.

[publishing to GitHub pages]: publishing-your-site.md#github-pages
[installation methods]: getting-started.md#installation

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