Powerful Templates

close up of an Einstein lightbulb light up in the dark

You guys asked for it, and here it is. We’re so excited to announce the brand new templating feature in CloudCannon.

Making changes to the structure of your website can involve editing every single HTML page. Now you can include a file into your HTML pages making updating a breeze

We’ve made the syntax as simple as possible. Simply adding <!-- include header.html --> to an HTML page is all you need to save yourself some serious time. See our docs for a more detailed explanation.

We’ve also launched a few smaller features to make your life easier. Adding an underscore to the beginning of a file name (e.g. _header.html) makes the file inaccessible to visitors and hides it from your clients in the client editor. This is great if you have templating files lying around you don’t want anyone to see.

Highlighting the current page is much more straightforward. CloudCannon automatically adds a class of cc-active to any <a> tags which point to the current page. Using some CSS and the cc-active class you can highlight the active page (Especially useful when you’re using includes).

You might also be interested in

Graphic showing gears and sparkles icons on blue gradient background

New CloudCannon features and improvements (October 2022)

CloudCannon

10 November 2022

Read more
Hugo Shortcodes

Editing Content with Hugo Shortcodes: Built-in and Custom Shortcode Support

CloudCannon

3 November 2022

Read more
Photo illustration of Pagefind compass logo and a pile of unorganized pages

Introducing Pagefind: Static Low-bandwidth Search at Scale

Liam Bigelow

16 July 2022

Read more