zensical-macros-utils
zensical-macros-utils is a zensical-based project that provides macros to extend cards, code blocks, etc, in Zensical documents.
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.
Release files for zensical-macros-utils 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zensical_macros_utils-0.1.3.tar.gz | 497.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zensical_macros_utils-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 520.4 kB
Release files / zensical_macros_utils-0.1.3.tar.gz
| Download URL | zensical_macros_utils-0.1.3.tar.gz |
|---|---|
| Size | 497.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e127e2164663f6d2ceaf059adec28725550d7ecfaf55c2372a16a31d2ce8a2ed
|
|
BLAKE2b-256 checksum How to use checksums |
283ae5da73864bbf37a82da18354243a7e9db8ec73051b8ae1ebf0fcda0d9eb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / zensical_macros_utils-0.1.3-py3-none-any.whl
| Download URL | zensical_macros_utils-0.1.3-py3-none-any.whl |
|---|---|
| Size | 22.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90d7f15498f6e13a5ee82331111a788b873355a18a793eb8857f19fb3373210e
|
|
BLAKE2b-256 checksum How to use checksums |
e523cfd352487e2ae5ac59e40059a343be3cf5c85a5c259b9d252f13ca8f3e3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|