Skip to main content

MkDocs plugin to decorate git diff lines

Project description

mkdocs-decodiff-plugin

Overview

This program inserts HTML tags into Markdown files to decorate diff lines using git-diff diff information.

When combined with a Markdown-to-HTML conversion program, it can automatically change the background color of diff lines to emphasize them.

How to Use

Install

pip install mkdocs-decodiff-plugin

mkdocs.yml

plugins:
  - decodiff:
      base: 8f8bf35
      dir: docs

Structure

  • Python 3 script
  • PyPI package
  • It works as a plugin for MkDocs and runs in the background during builds.
  • It can be run as a CLI and processes Markdown.

Behavior

  • Retrieve diff data using git diff
  • Add an HTML tag to each diff line. For example:
    • <span id="decodiff-hunk-1" class="decodiff">text</span>
    • Preserve leading markup, such as headings (#) and bullet points (*)
  • Create a diff list file containing a list of links

LICENSE

MIT License

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_decodiff_plugin-0.0.2.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_decodiff_plugin-0.0.2-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_decodiff_plugin-0.0.2.tar.gz.

File metadata

  • Download URL: mkdocs_decodiff_plugin-0.0.2.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for mkdocs_decodiff_plugin-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6d77c4b04929a4949b8786e35dafb79e7642ac375861971927d5057e5ebc112d
MD5 52838a9a683e3393f2ec56f3769f9f98
BLAKE2b-256 279636657638cdc4542df4a784096ef4146773c0aec9bd1680938e9948d148b3

See more details on using hashes here.

File details

Details for the file mkdocs_decodiff_plugin-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_decodiff_plugin-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6b8a11269ac73aa20cccb3cb8737bd86acb8e1c4dc3fbbf17cc7070cda67ef51
MD5 855301e62dbab59149417b52436dc40a
BLAKE2b-256 dc35362b96de96f08e160c7ba35e1f962f10c6055b51a941fb5d2c95e8d4ea3b

See more details on using hashes here.

Supported by

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