Gitfolder
The built-in gitfolder tag — an embedded browser for a public GitHub repo folder (or the whole repo): a file tree, syntax-highlighted source, inline images, a Markdown/SVG source-vs-preview toggle, per-file copy/download and GitHub links, and a Download ZIP button. Files are fetched once at build time and cached. Usage, caching, options, and a live example.
A built-in tag that embeds a small IDE-style browser for a folder in a public GitHub repo: a file tree on the left, the selected file on the right — syntax-highlighted source for code, inline display for images, and a Source ⟷ Preview toggle for Markdown and SVG — plus per-file copy / download, a link to each file’s source on GitHub, and a Download ZIP of the whole repository. The repo’s detected license is shown at the bottom, so readers know the terms before reusing the code. It’s perfect for showing an example project inline without copy-pasting every file into the page.
The folder is fetched at build time — only the requested subfolder, over the GitHub API,
never a git clone — and then cached, so a rebuild never re-downloads a folder it already
has. The reader’s browser loads nothing from GitHub: the files, their highlighting, the
rendered previews, and any displayed images are all baked into the page or served from your
own site; the zip is a static file too.
Usage
Use a self-contained {% gitfolder … %}{% endGitfolder %} with a github
(owner/repo):
{% gitfolder github="aardvarkdocs/sample-site" %}{% endGitfolder %}renders, live: