Skip to main content

mkdocs-macros-utils is a zensical-based project that provides macros to extend cards, code blocks, etc, in MkDocs documents.

Project description

mkdocs-macros-utils

mkdocs-macros-utils is a zensical-based project that provides macros to extend cards, code blocks, etc, in MkDocs documents.

pages-build-deployment DOCS

Features

  • Link Card: Create link cards with images and descriptions, etc
  • Gist Code Block: Embed and syntax-highlight code from GitHub Gists
  • X/Twitter Card: Embed tweets with proper styling and dark mode support

Usage

Install mkdocs-macros-utils

# For pip
pip install mkdocs-macros-utils

# For uv
uv add mkdocs-macros-utils

Config settings

  1. Add the extension to your mkdocs.yml

    markdown_extensions:
      - zensical.extensions.macros:
          modules: [mkdocs_macros_utils]
    
    extra:
      debug:
        link_card: false  # Set to true for debug logging
        gist_codeblock: false
        x_twitter_card: false
    
    extra_css:
      - stylesheets/macros-utils/link-card.css
      - stylesheets/macros-utils/gist-cb.css
      - stylesheets/macros-utils/x-twitter-link-card.css
    
    extra_javascript:
      - javascripts/macros-utils/x-twitter-widget.js
    
  2. Start the development server

    uv run zensical serve
    

The plugin will automatically create the required directories and copy CSS/JS files during the build process.

Documentation

For detailed usage and examples, please see the documentation.

License

MIT License - see the LICENSE file for details.

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_macros_utils-0.0.10.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

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

mkdocs_macros_utils-0.0.10-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_macros_utils-0.0.10.tar.gz.

File metadata

  • Download URL: mkdocs_macros_utils-0.0.10.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mkdocs_macros_utils-0.0.10.tar.gz
Algorithm Hash digest
SHA256 4cdf401a4100d17f52ac1edafe1db49c2b52848532ca1c72a770ce084b702ef2
MD5 69d89fd5fea8d745a96239e1f73e98ae
BLAKE2b-256 64b90624f0ae89df536658c9e37848c763e2484076cf83331fb333aeaa3a4b2e

See more details on using hashes here.

File details

Details for the file mkdocs_macros_utils-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: mkdocs_macros_utils-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mkdocs_macros_utils-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 ee26c73f50c6ab9635225cb570c6c443dba95cd2873c7fb00b299e10f743b485
MD5 ba8d2488509d7d8aa476703b54bfb566
BLAKE2b-256 fcadc2199f2fed74311bca7c7b700e64019ed8918285584536128607d59234d6

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