This is a port of the TufteCSS (with several adaptations) to the Eleventy static site generator build system. It’s implemented as a bunch of custom shortcodes for Nunjucks templating.
Adapted from Dave Liepmann's Original
This is Sri’s modification of Tufte CSS implemented with Hugo shortcodes in a Markdown file.
Markdown Tests
Markdown stuff like ‘indent for code’ works!
is real
New Stuff
Subtitles
my subtitle
Blockquote Example
Use {% Quote attrib=, url= %}...{% endQuote %} shortcode for Blockquotes!
[It is] notable that the Feynman lectures (3 volumes) write about all of physics in 1800 pages, using only 2 levels of hierarchical headings: chapters and A-level heads in the text. It also uses the methodology of sentences which then cumulate sequentially into paragraphs, rather than the grunts of bullet points. Undergraduate Caltech physics is very complicated material, but it didn’t require an elaborate hierarchy to organize.
That’s the end of the quote!
Can also use Regular Markdown Blockquotes if you don’t need the attribution. – Sri
Epigraphs
The English language . . . becomes ugly and inaccurate because our thoughts are foolish, but the slovenliness of our language makes it easier for us to have foolish thoughts.
If you’d like to introduce your page or a section of your page with some quotes, use epigraphs. Modeled after chapter epigraphs in Tufte’s books (particularly Beautiful Evidence), these are blockquote elements with a bit of specialized styling.
The syntax is {% Epigraph attrib= %} ... {% endEpigraph %}
SideNote Example
The {% SideNote id= %}...{% endSideNote%} inline shortcode contains the contents of the sidenote. The snid is a unique string representing that sidenote.
Example:
In print, Tufte has used the proprietary Monotype BemboSee Tufte’s comment in the Tufte book fonts thread. font. A similar effect is achieved in digital formats with the now open-source ETBook, which Tufte CSS supplies with a @font-face reference to a .ttf file. In case ETBook somehow doesn’t work, Tufte CSS shifts gracefully to other serif fonts like Palatino and Georgia.
MarginNote Example
This is a margin note. Notice there isn’t a number preceding the note.
Chat about tools and aspirational projects on my DS|CAFE Discord server. Chat me up on Mastodon and Bluesky

