Skip to main content

Pelican plugin: render Obsidian-style callouts from Markdown blockquotes

Project description

pelican-obsidian-callouts

A Pelican plugin that renders Obsidian-style callouts from standard Markdown blockquotes.

Installation

pip install pelican-obsidian-callouts

Then add it to your pelicanconf.py:

PLUGINS = ["pelican.plugins.obsidian_callouts"]

Usage

Write callouts in your Markdown content using Obsidian syntax:

> [!note]
> This is a note.

> [!warning] Watch out!
> Something to be careful about.

> [!tip]+
> Foldable callout, expanded by default.

> [!danger]-
> Foldable callout, collapsed by default.

Supported types

note, tip, important, warning, caution, abstract, info, todo, success, question, failure, danger, bug, example, quote

Unknown types are left as plain blockquotes.

Foldable callouts

Append + (expanded by default) or - (collapsed by default) after the callout type. A small inline <script> block is injected once per page to wire the click handler — no external JS dependency.

HTML output

<div class="pelican-callout pelican-callout-note">
  <div class="pelican-callout-title">
    <img src="..." class="pelican-callout-icon" alt="note" width="18" height="18">
    Note
  </div>
  <div class="pelican-callout-body">
    <p>Body text here.</p>
  </div>
</div>

CSS classes

Class Purpose
.pelican-callout Outermost container
.pelican-callout-[type] e.g. .pelican-callout-warning
.pelican-callout-title Title row (icon + text)
.pelican-callout-icon Lucide icon <img>
.pelican-callout-body Body content
.pelican-callout-foldable Added when callout is foldable
.pelican-callout-expanded Foldable callout, currently open
.pelican-callout-collapsed Foldable callout, currently closed

Icons come from lucide-static via unpkg CDN.

Development

git clone https://github.com/tclancy/pelican-obsidian-callouts
cd pelican-obsidian-callouts
uv sync --all-groups
uv run pytest

License

MIT

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

pelican_obsidian_callouts-1.0.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

pelican_obsidian_callouts-1.0.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file pelican_obsidian_callouts-1.0.1.tar.gz.

File metadata

File hashes

Hashes for pelican_obsidian_callouts-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1483d6b33b126612e8d4147dbf142aece1a7ae9a3cdabb186d23c16eb2379aaf
MD5 1cddb053955788c4bc5cff90f16d089f
BLAKE2b-256 e2f478fdc6fda5692e56674310df9b0a37f6b1f0c17281bae11092ee9b6dcb9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pelican_obsidian_callouts-1.0.1.tar.gz:

Publisher: publish.yml on tclancy/pelican-obsidian-callouts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pelican_obsidian_callouts-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pelican_obsidian_callouts-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a63c03bf7a48e830df88a152cef99be518e856d0171b451e2b259177d850266
MD5 e20740b00d2814a1cc841ccf599063ba
BLAKE2b-256 6b9e0b7eb7a2c334619ce44563d6b1ffa3da3e4df91e6a1f957b003dce70b30f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pelican_obsidian_callouts-1.0.1-py3-none-any.whl:

Publisher: publish.yml on tclancy/pelican-obsidian-callouts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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