Get the free theme
View Categories

The Snippet Library

3 min read

Table of Contents

If you write the same markup across several pages, the snippet library saves it once and inserts it by name wherever you need it.

Save any chunk of HTML and CSS as a named snippet. Organize snippets into categories so a growing library stays navigable. Names are yours to choose, so a list might hold espresso down (again), closed Mondays, and railroad time. Then insert a snippet by name into any page, header, footer, or per page override box. Each snippet can show an optional live preview so you can confirm you’re inserting the right one.

It’s built on the same option storage the free theme already uses for the header and footer, so snippets behave like the rest of Canvas. This is a power user upgrade for people writing markup across many pages, not a missing essential the free theme withholds.

<lc-toy:snippet-library>
insert with
<aside class=”rail”>The 8:14 still runs.</aside>
<ul class=”hours”> <li>Tue to Sun, 6 to 2</li> </ul>
<header class=”hero”> <h1>Open by the freight house</h1> </header>
<p class=”note”>Milepost 47. Closed Mondays.</p>