$ show rothsandro/eleventy-notes
Eleventy Notes is a highly opinionated static site generator template built on top of Eleventy (11ty). It is designed for publishing personal notes, documentation, wikis, or blogs with a focus on rich interlinking, client-side search, and customization. The system is a static site generator that processes Markdown files into a fully featured website. It includes a modular architecture with core infrastructure (layout, header, sidebar), and modules for wikilinks, callouts (admonitions), tags, custom properties, dynamic content queries, table of contents, search (using Pagefind), bookmarks, theming, translations, and page navigation. The build process uses Parcel for CSS/JS bundling and Eleventy for HTML generation. The application is designed to be configured via a single JavaScript file (`app.mjs`) and a SCSS file (`app.scss`). The code is well-structured, uses ES modules, and demonstrates advanced patterns such as custom markdown-it plugins, a generic query engine, and a tree generator. It is a template intended for end users to fork and customize, but the underlying codebase itself exhibits high craftsmanship and could serve as a reference for building Eleventy-based projects.
The LLM identified 5 files worth highlighting for reuse:
A generic query runner that can filter, sort, offset, limit, and tree-ify any array of objects. It supports nested AND/OR filter groups, multiple sort criteria, and tree generation via the TreeGenerator class. The operators cover common comparisons, string matching, array inclusion, and regex. This module is self-contained (imports only shared ValueParser and TreeGenerator) and could be extracted and reused in any JavaScript project needing a declarative data querying mechanism.
A standalone Wikilink class that resolves `[[wikilink]]` syntax to actual URLs and labels. It handles paths with anchors, custom labels, auto-label generation (using title, fileSlug, or reference), and anchor labeling styles. It finds matching notes by case-insensitive path comparison. This component is reusable in any Markdown processing context (Eleventy, Obsidian-like tools, etc.) with minimal adaptation.
A custom markdown-it plugin that transforms blockquotes prefixed with `[!type]` into styled callouts (admonitions) with icons, foldable behavior, and nested support. It demonstrates deep integration with markdown-it's token stream, parsing blockquote structure, and adding custom render rules. The callout types are defined separately in `callout-types.js` with Lucide icons. This plugin is highly reusable for any markdown-it project that wants callout support.
A tree generator that converts a flat list of items into a nested tree structure based on a path property (e.g., filePathStem). It supports path replacement via regex patterns, configurable path properties, and initial expansion state based on depth, boolean, or regex. The resulting tree nodes include metadata like $treeKey and $treeExpanded. This module is reusable in any project that needs to build a hierarchical navigation from a flat file list.
A small, focused utility class that provides safe deep property access on objects using dot-notation paths (e.g., 'data.title'). Returns undefined for missing paths without throwing. It is used extensively throughout the codebase and is a clean, reusable pattern for any JavaScript project that needs to traverse nested objects.