Skip to main content

mkdocs-decodiff-plugin

Overview

This is an MkDocs plugin for decorating Git diff lines.

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

decoration-image

How to Use

Install

pip install mkdocs-decodiff-plugin

mkdocs.yml

plugins:
 - decodiff:
      base: main
      dir: docs
      change_list_file: docs/changes.md
  • base:

    Reference for git diff. You can specify a hash, tag name, or branch name.

    git diff {base}
    
  • dir:

    Target directory.

    git diff -- {dir}
    
  • change_list_file:

    Changes list file

change_list_file

Collect change links in this file as a list.

# Changes

<!-- decodiff: Written by decodiff from here -->
## [index.md](index.md)

* [new section](index.md#decodiff-anchor-1)

<!-- decodiff: end -->

The part between the <!-- decodiff: --> tags is generated by decodiff, but the rest can be modified.

# You can change

You can change

<!-- decodiff: Written by decodiff from here -->

This section is overwritten by decodiff

<!-- decodiff: end -->

You can change

NOT supported

  • Changes in a code block
  • Changes in a table
  • Changes in HTML blocks
  • Character unit changes

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

Metadata

Release files for mkdocs-decodiff-plugin 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-decodiff-plugin 0.0.8
File Size Uploaded
mkdocs_decodiff_plugin-0.0.8.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-decodiff-plugin 0.0.8
File Interpreter ABI Platform
mkdocs_decodiff_plugin-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 24.8 kB

Release files / mkdocs_decodiff_plugin-0.0.8.tar.gz

Download URL mkdocs_decodiff_plugin-0.0.8.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0b2477302c40d7c69b9beb915afa454b356529ac6377e9243241d6653b430195
BLAKE2b-256 checksum
How to use checksums
f87b15b842e49f3c9895a350d4fdc57dfdc836095397596b4f6bc2faa1528e8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release files / mkdocs_decodiff_plugin-0.0.8-py3-none-any.whl

Download URL mkdocs_decodiff_plugin-0.0.8-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
112431345ee40dd117a032657badb21525b8973ccd752949472bb1431e3940c7
BLAKE2b-256 checksum
How to use checksums
18afcd83d875f748adccb81710281373807c2e649fd237cb6ce6acae6a72a89e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.19

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page