Skip to main content

MkDocs plugin to zip configured folders and add them to the site.

Project description

ZipFolders MkDocs Plugin

The ZipFolders plugin is used to zip specified folders in your MkDocs project after the site build process. This can be helpful if you need to distribute or backup parts of your documentation.

Plugin

Installation

Install the plugin using pip from PyPI:

pip install mkdocs-zip-folders

Configuration

To use the ZipFolders plugin, you need to add it to your mkdocs.yml configuration file.

Here is a sample configuration:

plugins:
  - search
  - zip_folders:
      folders:
        - myCode
        - toShare
        - folderX/thisWillBeZipped
      hash_extension: ".zip.hash" # default extension
      debug: true # optional - default is false
  • folders - A list of folders to zip. The folders are relative to the root of the MkDocs documentation project - docs_dir (default is docs).
  • debug - Optional. If set to true, the plugin will print debug messages to the console. Default is false.
  • hash_extension - The extension to use for hashing folders. Default is .zip.hash.

Git configuration

It is highly recommended to add the *.zip, *.zip.hash filses to your .gitignore file. This will prevent you from accidentally committing the zip files to your repository.

Zip files will be generated automatically after each build.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Do You Enjoy My Work?

Then definitely consider:

  • supporting me on GitHub Sponsors:

License

MIT

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-zip-folders-1.0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

mkdocs_zip_folders-1.0.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs-zip-folders-1.0.2.tar.gz.

File metadata

  • Download URL: mkdocs-zip-folders-1.0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.17

File hashes

Hashes for mkdocs-zip-folders-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ad76e398e31fd82a6904e1122bfd59ad72abbcd92f905d1531d672dbda54f4c9
MD5 24615fc6f4c661b657b82b627ced6263
BLAKE2b-256 a8b06cf1cc85822186e0bf8d69b89b27b29d3ff341b0fbe9ec321c46bae96804

See more details on using hashes here.

File details

Details for the file mkdocs_zip_folders-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_zip_folders-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 510a01fd76af0c2af51f15e1d14e278fdd0fd49b284dd9eac6700859c3d0f657
MD5 e9e1319930cc42f01f6d86941c62059b
BLAKE2b-256 367f8f5b5a8182771666dfb839cc96ee6f417c2219d0c5857a1e3a41a42cd1ce

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