How to setup mkdocs preview live server #7805
-
Context1.docker pull squidfunk/mkdocs-material I used the above commands to create a website in docker. But I found that every time the container is restarted or stopped and then started again, it creates N folders in the corresponding /www/wwwroot/Mkdocs/tmp. A folder is generated every time it is started. Is there a bug? Bug descriptionRelated linksReproductionnone Steps to reproducenone BrowserNo response Before submitting
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
If you do not add -v /www/wwwroot/Mkdocs/tmp:/tmp, it will be generated in /tmp in the container. |
Beta Was this translation helpful? Give feedback.
-
The command
The command Maybe you are looking for how to build mkdocs using Docker? |
Beta Was this translation helpful? Give feedback.
-
I want to use docker to map the docs folder so that I can update and modify it at any time. How should I do this? Do I need to docker run --rm -it -v ${PWD}:/docs squidfunk/mkdocs-material build after each update? |
Beta Was this translation helpful? Give feedback.
-
You can simply use Docs: mkdocs-material/creating-your-site/#previewing-as-you-write Run this command in the root folder of your project where mkdocs.yml is located. Converting this to a discussion. |
Beta Was this translation helpful? Give feedback.
You can simply use
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material
Docs: mkdocs-material/creating-your-site/#previewing-as-you-write
Run this command in the root folder of your project where mkdocs.yml is located.
Converting this to a discussion.