https://github.com/7rikazhexde/zensical-macros-utils
zensical-macros-utils is a zensical-based project that provides macros to extend cards, code blocks, etc, in Zensical documents.
https://github.com/7rikazhexde/zensical-macros-utils
documentation jinja2 mkdocs mkdocs-macros-plugin mkdocs-material python
Last synced: 8 days ago
JSON representation
zensical-macros-utils is a zensical-based project that provides macros to extend cards, code blocks, etc, in Zensical documents.
- Host: GitHub
- URL: https://github.com/7rikazhexde/zensical-macros-utils
- Owner: 7rikazhexde
- License: mit
- Created: 2025-02-01T14:57:48.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-06-12T02:40:56.000Z (12 days ago)
- Last Synced: 2026-06-12T04:19:35.132Z (12 days ago)
- Topics: documentation, jinja2, mkdocs, mkdocs-macros-plugin, mkdocs-material, python
- Language: Python
- Homepage: https://7rikazhexde.github.io/zensical-macros-utils/
- Size: 7.42 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zensical-macros-utils
[zensical-macros-utils](https://pypi.org/project/zensical-macros-utils/) is a [zensical](https://zensical.org/)-based project that provides macros to extend cards, code blocks, etc, in Zensical documents.
[](https://github.com/7rikazhexde/zensical-macros-utils/actions/workflows/pages/pages-build-deployment) [](https://7rikazhexde.github.io/zensical-macros-utils/)
## 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](https://pypi.org/project/zensical-macros-utils/)
```bash
# For pip
pip install zensical-macros-utils
# For uv
uv add zensical-macros-utils
```
### Config settings
1. Add the extension to your `zensical.toml`
```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
```
1. Start the development server
```bash
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](https://7rikazhexde.github.io/zensical-macros-utils/).
## License
MIT License - see the [LICENSE](./LICENCE) file for details.