Skip to content

Advice: Do not set site_dir to / #1161

@mattwelke

Description

@mattwelke

Just a warning to anyone who might want to change their project build directory to the root of the project, with a .yml file like this:

site_name: My Docs
site_dir: /
pages:
  - Home: index.md
theme: material

It won't do what you think it will. If you run mkdocs build --clean you will have it recursively delete everything it can from your system root folder until it runs into a file it can't delete without sudo. You will lose the entire contents of your home folder as well as your Ubuntu profile, and do unknown damage to your system.

Time to reformat. :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions