obfuskode protects email addresses from harvesting robots. Use it to add an email address to your Quarto document. In HTML output the address is obfuscated by the Obfuskoder command line tool; in PDF output it becomes a normal clickable mailto: link; in every other format it appears as the plain email address.
Rendering HTML formats requires the obfuskode command line tool on your PATH. It ships inside Obfuskoder.app; choose Obfuskoder ▸ Install Command Line Tool… to install it. Other formats render without the tool.
quarto add alderete/obfuskodeThis will install the extension under the _extensions subdirectory.
If you're using version control, you will want to check in this directory.
Add the shortcode wherever an email address should appear, inline or on its own line:
{{< obfuskode email=sue@example.com >}}
{{< obfuskode email=sue@example.com link-text="Email Sue" link-title="Send Sue a message" subject="Hello" >}}The arguments mirror the CLI's Basic-mode options. All are named; only email is required. Quote any value containing spaces.
| Argument | Required | Description |
|---|---|---|
email |
yes | The email address to publish. |
link-text |
no | The visible, clickable link text (defaults to the email address). |
link-title |
no | Pop-up message shown when hovering the link. |
subject |
no | A pre-set subject line for the email. |
fallback |
no | Text shown to visitors without JavaScript (default: "Enable JavaScript to view email"). HTML formats only. |
The CLI's advanced --html mode is not supported by the shortcode. To obfuscate arbitrary markup, run obfuskode --html yourself and paste the snippet into a raw HTML block.
| Output format | Result |
|---|---|
| JavaScript-capable HTML (websites, Reveal.js, dashboards) | The obfuscated snippet from obfuskode, generated at render time. |
| PDF (LaTeX, Beamer, Typst, ConTeXt) | A clickable mailto: link built from the same arguments — the un-obfuscated equivalent of the snippet. fallback is ignored. |
| Everything else (Word, Markdown, EPUB, plain text) | The plain email address; the other arguments are ignored. |
Two things to know:
- Encoding is intentionally randomized, so every render produces a different (but equivalent) snippet. Expect HTML output to differ between renders.
- Errors fail the render loudly — a missing
email, an invalid address, or a missing CLI stops the build rather than publishing garbage.
Here is the source code for a minimal example: example.qmd.