Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.

Examples of HTML Plugins

This file is essentially a unit test for doctools/oil_doc.py, which contains all the HTML plugins.

Related: How We Build Oil's Documentation.

Table of Contents
Link Shortcuts with $
Syntax Highlighting Specified In Front matter
Syntax Highlighting With Fenced Code Blocks
sh-prompt
Pygments
Plugins We Should Have

Link Shortcuts with $

Syntax Highlighting Specified In Front matter

If every pre block in a document needs the same higlighter, you can specify it in the front matter like this:

---
default_highlighter: oil-sh
---

My Title
========

Right now we only allow oil-sh, which is a generic formatter that works for both shell and Oil code (detail: it's the same as sh-prompt for now). This is what we use in idioms.html and known differences.

Syntax Highlighting With Fenced Code Blocks

sh-prompt

$ echo hi   # comment
hi

Pygments

x = 42
print(x, file=sys.stderr)

Plugins We Should Have

A shell session could look like this:

$ echo one
$ echo two

Embeddings:


Generated on Sat Jan 23 00:06:31 PST 2021