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
Release files for mkdocs-copy 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mkdocs-copy-0.0.1.tar.gz | 3.6 kB | Details |
Release files / mkdocs-copy-0.0.1.tar.gz
| Download URL | mkdocs-copy-0.0.1.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
590fd8317dfc7fef71688bd9b17941064edf010ad0c48dc355f7171cbfed5354
|
|
BLAKE2b-256 checksum How to use checksums |
d2e1e383c2c59eb0c14ae510b9848189e7a0d3371fcbc460bb8a886397467d17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|