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

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.3.tar.gz (497.6 kB 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.3-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zensical_macros_utils-0.1.3.tar.gz
  • Upload date:
  • Size: 497.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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.3.tar.gz
Algorithm Hash digest
SHA256 e127e2164663f6d2ceaf059adec28725550d7ecfaf55c2372a16a31d2ce8a2ed
MD5 2964e6dcc28f83036f3754f60d22f7e0
BLAKE2b-256 283ae5da73864bbf37a82da18354243a7e9db8ec73051b8ae1ebf0fcda0d9eb3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zensical_macros_utils-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 90d7f15498f6e13a5ee82331111a788b873355a18a793eb8857f19fb3373210e
MD5 14d525ee38d367728b28f2f6596ad192
BLAKE2b-256 e523cfd352487e2ae5ac59e40059a343be3cf5c85a5c259b9d252f13ca8f3e3d

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