Skip to main content

A mkdocs plugin that lets you copy (and maybe transform) arbitrary doc files to the build.

Project description

Copy files in your MkDocs build

mkdocs-copy is a plugin for MkDocs which allows you to copy verbatim arbitrary files in your build.

Why?

This plugin was created to solve https://github.com/mkdocs/mkdocs/issues/2139 (at least some use-cases affected by it). Basically it's a work-around for the following (willingly) hard-coded chunk in MkDocs' sources:

# mkdocs/structure/files.py used by 
def get_files(config):
    """ Walk the `docs_dir` and return a Files collection. """
    files = []
    exclude = ['.*', '/templates']

    # ...

Note: one could achieve the same result using something like mkdocs-gen-files or mkdcos-simple-hooks, only with some more effort. The benefit of using mkdocs-copy dedicated plugin lies in its declarative API. It is also easily reusable.

Quick start

Say you want to add .htaccess files (if defined for a given folder/path):

# mkdocs.yml config file
plugins:
  - mkdocs-copy:
    add_per_path:
      - .htaccess

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs-copy-0.0.1.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file mkdocs-copy-0.0.1.tar.gz.

File metadata

  • Download URL: mkdocs-copy-0.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.3

File hashes

Hashes for mkdocs-copy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 590fd8317dfc7fef71688bd9b17941064edf010ad0c48dc355f7171cbfed5354
MD5 ac524b6e5c8293a8a6e1a63d625fa9f1
BLAKE2b-256 d2e1e383c2c59eb0c14ae510b9848189e7a0d3371fcbc460bb8a886397467d17

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page