Skip to main content

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

Project description

zensical-macros-utils

zensical-macros-utils is a zensical-based project that provides macros to extend cards, code blocks, etc, in Zensical 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 zensical-macros-utils

# For pip
pip install zensical-macros-utils

# For uv
uv add zensical-macros-utils

Config settings

Add the extension to your config file. If both zensical.toml and mkdocs.yml exist, zensical.toml takes priority.

zensical.toml

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",
]

[project.plugins.macros]
modules = ["zensical_macros_utils"]

[project.extra.debug]
link_card = false
gist_codeblock = false
x_twitter_card = false

mkdocs.yml / mkdocs.yaml

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

theme:
  name: material
  variant: classic  # omit or set "modern" to use zensical's new design

plugins:
  - search
  - macros:
      modules:
        - zensical_macros_utils

extra:
  debug:
    link_card: false
    gist_codeblock: false
    x_twitter_card: false

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

zensical_macros_utils-0.1.2.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

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

zensical_macros_utils-0.1.2-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file zensical_macros_utils-0.1.2.tar.gz.

File metadata

  • Download URL: zensical_macros_utils-0.1.2.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zensical_macros_utils-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e6f6e99b759b69cb7b1f66a765f1b0b8b77c270e31846949a5a658002278685f
MD5 0781398427f16a39d708fce886289bc7
BLAKE2b-256 1d351c8f9c5c66f1504da3a21727d04cd7aa7f6a93c68ef651dbaf4390d51c95

See more details on using hashes here.

File details

Details for the file zensical_macros_utils-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: zensical_macros_utils-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for zensical_macros_utils-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 37a4ed4d2204b6a364aaaf9a9ae566133094892ae1b1a05426a5d873fd33965a
MD5 ebf71fe38c695b49576e6f72d58ec687
BLAKE2b-256 719c0b14414220e7420f3fc8d01383f833458e970d7bc11c5f0a27b01a5646a8

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