I want to set up a small documentation server that checks out all our projects from a local
gitlab repo and link the docs directories of each of them as sub folders of a separate docs
folder with its own index.md file and a page for each project in the mkdoc.yml like in this example:
site_name: Our Documentation Collection
pages:
- Home: index.md
- project1: project1/index.md
- project2: project2/index.md
Because project1 and project2 are logical links to the git clone's docs directories, media files
are not copied to site_dir and thus e.g. images inside the projects not visible in the generated
html.
To fix it I propose to add ", followlinks=True" to os.walk in copy_media_files
def copy_media_files(from_dir, to_dir):
"""
Recursively copy all files except markdown and HTML into another directory.
"""
for (source_dir, dirnames, filenames) in os.walk(from_dir, followlinks=True):
I want to set up a small documentation server that checks out all our projects from a local
gitlab repo and link the docs directories of each of them as sub folders of a separate docs
folder with its own index.md file and a page for each project in the mkdoc.yml like in this example:
Because project1 and project2 are logical links to the git clone's docs directories, media files
are not copied to site_dir and thus e.g. images inside the projects not visible in the generated
html.
To fix it I propose to add ", followlinks=True" to os.walk in copy_media_files