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-0.1.0.tar.gz (7.5 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-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for pelican_obsidian_callouts-0.1.0.tar.gz
Algorithm Hash digest
SHA256 802ccf8cc6747e5ed7e412c42ee3345bb6d68536046cc10b7fac979c10d3c05c
MD5 b8a75d58c190706112e0a0dc5cf70da0
BLAKE2b-256 b3ff12ac1b9a1985006b4973111ff9500d5551ef1ea5539016c84ee0d0cd0aef

See more details on using hashes here.

Provenance

The following attestation bundles were made for pelican_obsidian_callouts-0.1.0.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-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pelican_obsidian_callouts-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86b722d71ec448953b74d46735d9fe9f3c2d8061459a85b12da8865a0590612b
MD5 64f9280e2d66e8e09bf50e79cfb23cc2
BLAKE2b-256 eda5a1371d129a9482bb2de3c0be00243651d98f81476db20df20736a2856357

See more details on using hashes here.

Provenance

The following attestation bundles were made for pelican_obsidian_callouts-0.1.0-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