Installing, Using and Updating Publii Themes
Themes in Publii define the overall look of your site; they decide the layout of posts and pages, and how the homepage looks. Publii comes with one theme preinstalled for you and set the standard Simple theme by default.
Below you will find more information on how to view, download and install the various Publii themes available via the Marketplace.
Using the Publii Marketplace
The Publii Marketplace is the central hub where users can download a selection of free and premium Themes and Plugins for Publii. On initial installation, Publii includes only one free theme: Simple and no plugins. Should you wish to use a different theme that better suits your site's needs or install a plugin that expands the feature set of your website, then Publii Marketplace is where you can find it.
After clicking the Themes option in the Three-Dot Menu, the Themes section of Publii will be opened. Here you can see any themes that you currently have installed. To go to the Publii Marketplace, click on the Get More Themes box; it will be the first box in the list of themes. This will open your browser to the Publii Marketplace.
The homepage of the Marketplace displays a selection of the most recently-released themes and plugins; from here, you can click on the Browse All Themes or Browse All Plugins links on the right-side of the screen to open the Theme Marketplace or Plugin Marketplace respectively.
Viewing and Downloading a Theme
After opening the Publii Marketplace, click on the Browse All Themes text of the right of the screen to see the full range of available themes. From here, you can click on each theme to be taken to the description page, which provides details of the specific features included with the theme.
In addition, each theme includes a Live Preview option, which will allow you to see how the theme looks on a live site. To view the demo page, click on the Live Preview button on the right of the screen. Within the demo page you can use the main menu to explore the various layouts, colour schemes and other options that are included with the theme.
To download a theme, click on the blue Download button; the file explorer will open to let you choose a folder to download the files to. Each download will be in .zip format, but there's no need to extract it; Publii will be able to handle extracting and installing the theme for you.
Installing a Theme
After the download is complete, you will need to install the theme via the Publii interface. This is a very simple process. To do so, follow these steps:
- Open the Publii application, and click on the Three-Dot Menu icon in the top-right of the Publii interface to open the main menu, and then click the Themes button.
- You will see a list of your installed themes. On this page, click on the Install Theme button at the top. This will open File Explorer.
- Navigate to the folder where you downloaded the .zip theme file from the Publii Marketplace, and double-click it.
- Publii will now install the theme and add it to the list of available themes.
Your theme is now installed.
Activating the Theme
When a new theme is installed in Publii, it doesn't automatically add the theme files to your site; this is to prevent your site's files from becoming bloated with theme files that are not in use. To use the theme on your active site, follow these steps:
- In the Publii app, click on the Site Settings in the left-sidebar menu.
- On the Site Settings screen, click on the drop-down box next to the Current Theme setting.
- In the list of themes, you will see your newly-installed theme in the Install and Use section; select it, then click on the Save Settings button at the top of the screen.
- Your new theme is now activated; preview your site and you'll be able to see how it looks!
If you are happy with your new theme and wish to continue using it, it's a good idea to Uninstall your previously-used theme to free-up space and reduce the overall weight of your site. To do so, click on the drop-down list next to the Current Theme option then, under the Uninstall heading, select the theme you wish to uninstall and click the Save Settings button; the files will now be removed.
Note that uninstalling the theme in this manner doesn't remove the theme completely from Publii; you will still be able to switch back to it at any time by using the Install and Use option. Uninstalling simply prevents the theme files from being uploaded to your site.
Translating a Theme
Publii includes support for language .json files and overrides that can be used to translate non-content areas of a theme, such as button labels. The main language file for each theme can be found in the respective theme folder wherever your Publii docs are stored, such as publii/themes/themeName/themeName.language.json
. To translate the theme, an override version of the language file with the same name must be created in the sites/siteName/input/languages
folder (the languages folder may need to be manually created first). This file will then be used as an override for the base language file.
For a full step-by-step guide to theme translation, and a breakdown of how it works, visit the Publii translation guide article.
Changing to a different theme
Swapping to a new theme after you get bored with your current one is super-easy; just open the Site Settings screen again and choose your new theme from the Install and Use section of the Current Theme option. If you want to try out a completely new theme, you may use the Publii Theme Marketplace to download and install a new theme; this will then appear in the Install and Use section of the Current Theme section. If you've already switched between multiple themes on your current site you'll notice that all your previously-installed themes appear under a separate Use heading; this allows for quick switching between installed themes without the need to copy the files across again.
Updating your theme
With new features and theme updates being added to Publii regularly, it's important to make sure that you are always using the latest version of your theme on your site to ensure compatibility.
When new theme updates are available, you will be able to download the updated file via the Publii Theme Marketplace; once done, go through the regular install process via the Themes section of the Three-Dot Menu; this will add the updated files to Publii.
Once done, you'll need to copy the updated files to your active site; to do so, open the Site Settings page as before and click on the Current Theme drop-down list. Your currently-installed themes and their version numbers will appear in the Use section of the list, while updated versions will appear in the Install and Use section. Click on your theme name in the Install and Use section, then press the Save settings button. The updated theme files will be copied over, ready for your site to use.
Uninstalling a theme
If you've switched between multiple themes on your site, each theme's files will be included in the website files that are generated when you sync with your server, potentially bloating the website's total size slightly. To combat this you can uninstall any themes from your site that you are not using; the files will still be available in Publii, they simply won't be included in your site's files.
To uninstall a theme, in the Site Settings → Theme section, open the drop-down list. Underneath the Use and Install and Use sections you'll see a third Uninstall section, which displays all your currently-installed themes. Click on the theme you wish to uninstall, then hit the Save settings button to remove it from your site files. The theme will still appear in the Install and Use section, so you'll be able to re-activate and use the theme again at any time without the need to go through the installation process again.