Build a custom theme
A custom theme is a folder of templates, stylesheets, scripts, images and fonts, packaged as a ZIP file. This section is for the person who builds it, such as a web developer. It assumes you know HTML and CSS.
The templates are written in a template language called Twig. Paligo gives each template the page content and information about the site, such as its title, languages and navigation. The template decides what HTML to produce around them.
The quickest way to build a theme is to start from Paligo Base:
Download Paligo Base, as described in Download a theme, and unzip it.
Change its templates, styles and options.
Preview it on your own content with Paligo Theme Studio, or upload it to a test layout.
When it is ready, upload it to the layout you publish with, or push it from Paligo Theme Studio.
You can also have an AI coding assistant, such as Claude Code or GitHub Copilot, make the changes for you. Paligo Base includes instructions that tell the assistant what a theme must contain and what it can use. See Build a theme with an AI coding assistant.
The topics in this section describe each part of a theme:
Start from Paligo Base: how Paligo Base is built, and where to change it.
Build a theme with an AI coding assistant: how to have an AI coding assistant build or change a theme.
Theme package structure: the folders and files, and how to package them.
The theme manifest: the
theme.jsonfile that describes the theme.Theme templates: the templates Paligo uses and what each one must contain.
Theme options reference: how to offer options in the Layout Editor.
Theme assets: stylesheets, scripts, images and fonts.
Translate a theme: text in the theme that changes with the language.
Template variables: everything a template can show.
Paligo components and helpers: ready-made search, navigation and language controls.
Search in a theme: how a theme works with Nexus Search, Algolia and Coveo.
What theme templates can use: the parts of Twig that themes can and can't use.
Theme validation messages: what the checks report and how to fix it.
Important
A theme controls only the look and structure of the pages. It can't contain server code, and templates run with a restricted set of Twig features, so a theme can't read or change anything outside its own pages.