Skip to content

MkDocs QR Plugin

Achievements

  • Render a QR code from code instead of uploading an image.

Description

Technologies used

  • Python
  • Markdown

Responsibilities

  • Product owner
  • Developer

The module allows the generation of QR codes while rendering Markdown documentation using MkDocs. While generating documentation, I often place a QR code to improve the UX. With the QR in the documentation the user can download the latest version of the app on their phone without having to open the page on their phone.

The problem arrives when the URL is updated and the QR code has to be changed. This module allows the rendering of the QR code from a code block. And by doing we only must modify the data section for a brand new QR code to be rendered.

This code:

```barcode 
title: for the image
data: http://www.data-to.encode
reference: Not implemented
height: 400
width: 400
```

Generates this QR

for the image

Learned

  1. How to create custom modules for MKDocs
  2. Deploying to PyPi. All my previous modules were hosted privately.

Components

  • Module


    • Developed in Python
    • Removes the need to keep images with QR codes in the documentation.

    Gitlab

    PyPi

Windows app

Main advantages

Improvements with this approach:

  1. Versioning control friendly. Since we are no longer uploading binary files.
  2. Always maintain the same format, sizing and padding of the QR code.