Theme package structure
A theme is a folder with this structure. Only theme.json and templates/page.html.twig are required.
my-theme/
├── theme.json the theme manifest (required)
├── templates/
│ ├── page.html.twig every topic page (required)
│ ├── base.html.twig a shared page frame the others extend
│ ├── portal.html.twig the portal page
│ ├── search.html.twig the search results page
│ └── partials/ smaller templates that others include
│ └── header.html.twig
├── assets/ stylesheets, scripts, images and fonts
│ ├── css/main.css
│ ├── js/theme.js
│ └── img/logo.svg
└── i18n/ translations of the theme's own text
├── en.json
└── de.jsonFolders under templates/ and assets/ can have any name and any depth.
Create the ZIP file
Compress the contents of the theme folder, not the folder itself, so that theme.json is at the top of the ZIP file.
macOS: open the theme folder, select everything in it, and choose Compress.
Windows: open the theme folder, select everything in it, and choose Send to > Compressed (zipped) folder.
If you compress the folder itself, Paligo still accepts the theme, but shows a warning. If the files are more than one folder deep, the upload is rejected.
Files that your computer adds are ignored and don't need to be removed: __MACOSX folders, .DS_Store, files starting with ._, Thumbs.db and desktop.ini. So are .git folders and .gitignore, .gitattributes, .gitkeep and .gitmodules files.
Limits
Limit | Value |
|---|---|
Size of the ZIP file | 20 MB |
Size of the files when unzipped | 100 MB |
Number of files and folders in the ZIP file | 5,000 |
Allowed file types
A theme can only contain files with these extensions:
.twig .css .js .json .svg .png .jpg .jpeg .webp .woff2 .ico .txt .md .map
If the ZIP file contains any other type of file, the whole upload is rejected. A theme can never contain .php files.
These are also rejected: symbolic links, two files with the same path, and paths that start with / or a drive letter or that contain ...