Last updated: 26 September 2025
API Cheats Reference
Quick reference for the most commonly used shortcodes, filters, and functions in Quesby Boilerplate.
Shortcodes
Image Shortcode
{% image "path/to/image.jpg", "Alt text", "css-class" %}{% image "/assets/images/hero.jpg", "Hero image", "hero-image" %}Parameters:
src(string): Image path (relative to/assets/images/)alt(string): Alt text for accessibilityclass(string, optional): CSS class name
Output:
<img src="/assets/images/path/to/image.jpg" alt="Alt text" class="css-class" loading="lazy">SVG Shortcode
{% svg "path/to/icon.svg", "css-class" %}{% svg "/assets/images/logo.svg", "site-logo" %}Parameters:
src(string): SVG path (relative to/assets/images/)class(string, optional): CSS class name
Output:
<svg class="css-class" role="img" aria-label="SVG icon"> <!-- SVG content --></svg>Code Shortcode
{% code "javascript" %}function hello() { console.log("Hello World!");}{% endcode %}Parameters:
language(string): Programming language for syntax highlighting
Filters
SEO Filters
seoTitle
{{ title | seoTitle: site.name }}{{ "My Post" | seoTitle: "My Site" }}Output: "My Post | My Site"
canonical
{{ page.url | canonical: site.url }}{{ "/blog/post" | canonical: "https://example.com" }}Output: "https://example.com/blog/post/"
absoluteUrl
{{ "/assets/image.jpg" | absoluteUrl: site.url }}{{ content | absoluteUrl: site.url }}Output: "https://example.com/assets/image.jpg"
Date Filters
formatDate
{{ date | formatDate: "YYYY-MM-DD" }}{{ date | formatDate: "MMMM Do, YYYY" }}{{ date | formatDate: "relative" }}Output: "2024-01-15", "January 15th, 2024", "2 days ago"
Content Filters
excerpt
{{ content | excerpt: 160 }}{{ content | excerpt: 300 }}Output: First 160/300 characters of content
stripHtml
{{ content | stripHtml }}{{ "<p>Hello <strong>World</strong></p>" | stripHtml }}Output: "Hello World"
slugify
{{ "My Awesome Post!" | slugify }}{{ "Hello World" | slugify }}Output: "my-awesome-post", "hello-world"
Global Data
Site Data
{{ site.name }} // "Quesby - Boilerplate"{{ site.url }} // "https://example.com"{{ site.description }} // "Site description"{{ site.author }} // "Author Name"{{ site.logo }} // "/assets/images/logo.svg"{{ site.favicon }} // "/assets/images/favicon.webp"{{ site.theme }} // "quesby-core"{{ site.defaultVisualTheme }} // "dark"{{ site.socialImage }} // "/assets/images/og-image.jpg"{{ site.twitter }} // "@username"{{ site.language }} // "en-US"Collections
{{ collections.posts }} // All blog posts{{ collections.documentation }} // All documentation pages{{ collections.pages }} // All regular pages{{ collections.projects }} // All project pages{{ collections.news }} // All news itemsPage Data
{{ page.url }} // Current page URL{{ page.date }} // Page creation date{{ page.inputPath }} // Source file path{{ page.outputPath }} // Output file path{{ page.fileSlug }} // URL slug{{ page.filePathStem }} // File path without extensionFrontmatter Fields
Common Fields
---title: "Page Title"description: "Page description"date: 2024-01-15author: "Author Name"tags: ["tag1", "tag2"]draft: false---SEO Fields
---seoTitle: "Custom SEO Title"seoDescription: "Custom SEO description"seoImage: "/custom-image.jpg"seoKeywords: "keyword1, keyword2"seoCanonical: "https://example.com/custom-url"seoNoIndex: falseseoNoFollow: false---Content Fields
---image: "/assets/images/featured.jpg"postType: "article" # or "website"noindex: falseclass: "custom-page-class"---Template Variables
Layout Variables
{{ postClass }} // CSS class for post pages{{ postType }} // Open Graph type{{ class }} // Page-specific CSS classTheme Variables
{{ theme }} // Current theme name{{ site.theme }} // Same as aboveEnvironment Variables
Available Variables
QUESBY_CONTENT_PATH=/path/to/contentNODE_ENV=developmentUsage in Templates
{{ env.QUESBY_CONTENT_PATH }}{{ env.NODE_ENV }}Common Patterns
Blog Post Loop
{% for post in collections.posts %} <article> <h2><a href="{{ post.url }}">{{ post.data.title }}</a></h2> <p>{{ post.data.description }}</p> <time>{{ post.date | formatDate: "MMMM Do, YYYY" }}</time> </article>{% endfor %}Navigation Menu
<nav> <ul> <li><a href="/">Home</a></li> <li><a href="/blog/">Blog</a></li> <li><a href="/documentation/">Docs</a></li> </ul></nav>Social Meta Tags
<meta property="og:title" content="{{ seoTitle or title }}"><meta property="og:description" content="{{ description }}"><meta property="og:image" content="{{ image | absoluteUrl: site.url }}"><meta property="og:url" content="{{ page.url | canonical: site.url }}">Conditional Content
{% if draft %} <div class="draft-notice">This is a draft</div>{% endif %}
{% if tags %} <div class="tags"> {% for tag in tags %} <span class="tag">{{ tag }}</span> {% endfor %} </div>{% endif %}Quick Commands
Development
pnpm serve # Start development serverpnpm dev # Eleventy only (no CSS watch)pnpm css:watch # CSS watching onlyBuild
pnpm build # Production buildpnpm css:build # CSS build onlyUtilities
pnpm gen:ec-css # Generate Expressive Code CSSTroubleshooting
Common Issues
- Images not loading: Check path starts with
/assets/ - CSS not updating: Run
pnpm css:build - Content not showing: Check
QUESBY_CONTENT_PATH - Theme not applied: Verify
themeinsite.json
Debug Mode
DEBUG=Eleventy* pnpm serveNeed more details? See the complete API Reference for advanced usage and configuration options.