The Publii team has easily slipped into their new, faster routine, and the first set of delights is ready to go. From some cleaning up of the UI with a new Tools section (with a few new additions of its own) to improving the visitor experience with support for 404 error pages, there's been quite a bit of tinkering over the last few weeks!
Initially Publii had few configuration options, but with each beta new settings and tools have been added such as custom CSS and HTML. These small options were added to restore feature were separated into their own section in the main menu; however, with so many new tools being added it was clear this method would quickly become unwieldy and confusing for new users.
With the latest Publii release a new menu option, Tools, has been added to the main menu, and all the useful little features that aren't directly required for running your site, but offer flexibility and security that goes beyond the standard settings have been moved to this section. The following existing options have been moved to the Tools section:
- Backups - This section allows you to create backups of your Publii website, or restore from an existing save.
- Regenerate thumbnails - The thumbnail regeneration tool rebuilds the thumbnails on your site to match the current theme settings; this should be used when you've swapped to a different theme that uses a different thumbnail layout to your prior theme.
- Custom CSS/HTML editors - If you want to insert your own CSS or HTML code, then using these editors you can do so without needing to open the website files directly.
There are also two new tools that have been added in this release, which we'll cover in the following sections.
Our first new tool is for users who like to fine-tune how search engine robots behave on your site. With it, you can expand on the standard options included with Publii to disallow crawling particular directories, or preventing robots from certain search engines accessing your site.
Clicking on the robots.txt Editor in the tools section will take you to a very simple screen; just a Back to tools and Save settings button, and a code area where you can enter your own content for the robots.txt file. Once done, just click save and you're good to go!
Another tool, another editor! This time it allows modification of the server .htaccess file, which provides lots of server-admin-focused functionalities for those in the know! Whereas the robots.txt file is used to modify the behavior of search-engine robots, the .htaccess allows fine-tuning of user access and movement; particular IPs can be blocked or redirected if someone isn't following the house rules, or prevent other sites from accessing content.
Usage is exactly the same as the other editors; simply open and enter your changes into the code box, then save. Easy peasy!
404 Page support
Dead links are a fact of a website's life; even the most carefully-built sites can have the occasional hiccup, and the more content you add and changes you make the higher the chance of visitors hitting one of these dead links. A 404 error page can let them know that something has gone wrong, and redirect them to other areas of your site.
The new beta of Publii includes support for basic 404 pages, which can then be built upon with your own HTML and CSS. To use this feature in our current themes it will be necessary to update your theme files; you can do this by heading to the Settings screen, clicking on the Theme drop-down list, and selecting your current theme in the Install and Use list; this will download the updated theme files and apply them.
To create the basic 404 page, simply open the Tools → .htaccess Editor page and enter the following text into the editor:
ErrorDocument 404 /404.html
This will enable the basic error page. If your a dab hand at HTML and CSS and want to modify it to add your own styling, content or other elements, you can do so by modifying the 404.hbs file in your theme folder.
Asian language support
Some of our users might be wondering why this is a new feature; after all, Publii already allows the use of asian-language characters in its content. However, the content was the only supported section; using asian characters in other, non-content areas such as for post or category slugs would cause issues.
In the new version of Publii we've added support for these characters in slugs via transliteration, meaning that Publii now boasts full compatibility with asian languages; wherever in the world you are you'll be able to create a website just for your local audience!
Disable AMP version
Accelerated Mobile Pages provide a fast way for visitors on slower mobile devices to enjoy the full range of your article content without delay, so it may seem natural to always want to have an AMP version of your pages available. Even so, many developers have raised criticisms, such as that Google, who backed the project, give preferential SEO treatment to sites that use AMP.
That's not the reason that we've added a Disable AMP version option to the latest Publii release though; that's simply because our users need to have the flexibility to build their site their way. Everybody has their own vision as to how their site should look and feel on mobile and desktop, and it's important to us that we provide the tools to let users decide what works for them. You'll find the enable/disable AMP option in the Advanced Options → AMP tab of the Settings main menu section.
Improved server cache support
Improvements and Enhancements
That's all for the new features, but we've also been tweaking Publii to get its existing features just right. With this release, you can enjoy the following new touches:
- Regenerate thumbnails tool now outputs a list of the files it has modified, so you can see where the changes have been made.
- The authors add/edit pages have been enhanced, with clearer, separated basic and advanced settings.
- Improved the Featured Images syntax in the RSS feed.
- Improved renderer behavior; now it will not crash when their are missing images.
- Enhanced error detection when uploading website; this will prevent crashes when website files are corrupted.
- The name of the website is now stored when creating a backup; changing the website name then restoring to a backup made prior to the change will restore the original website name.
- It is no longer possible to create authors/tags with empty slugs.
- The 404 page (404.hbs) was added to the all themes
As ever, we end on the numerous bugfixes that sort out those little things that sometimes go wrong with our app. In this releases bag of fixes is:
- Fixed issue with Featured Posts not displaying on some themes.
- Fixed random crashes caused by SQLite memory limits.
- Removed a syntax error from the JSON feed when HTML compression is enabled.
- Fixed multiple issues with RSS/JSON feed generation.
- Fixed issue with local AMP preview when the OS username contains spaces.
And that's everything for this release! We hope that you find something useful in these new features and fixes, and as always make sure to head over to our community page and let us know what you think.
Note: Before installing a new version of Publii, we recommend that you backup all your websites using the back up option.