mk-append-to-head

August 18, 2025 ยท View on GitHub

Append some string to a MkDocs page's <head>.

Installation

pip install mk-append-to-head

Configuration

In MkDocs configuration file:

plugins:
- mk-append-to-head:
    append_str: <script>console.log(1)</script>
    pages: ['Home'] # optional

Leaving pages empty will append the append_str to all pages.