Publii keeps on moving forward, and with the new beta release that's now available for download you'll find a few new functionalities, fixes and optimizations that'll make using the app better than ever. In this beta we've got expanded options in the WordPress Importer tool, revised internal link generation and some fresh changes to accessing your app settings.
Inline Editor Toolbar
Our first addition in this beta release is a simple yet useful inline editor toolbar to make editing your content on the fly a bit easier. Usually when writing a post if you want to add any text formatting or do some slightly more fiddly things like inserting links, changing highlight styles, or adding headers, blockquotes and code blocks, you'll have to highlight the text you want to change then adjust it in the toolbar at the top of the editor window.
With an inline editor, highlighting any bit of text in the post editor will make a simplified toolbar with all the general options you appear directly above the highlighted text, so you can quickly modify it and move on without hunting around the more expansive icons and options in the regular toolbar. It won't change your life, but you may well save enough time for a few extra cups of coffee in your day!
New Internal Link Functionality
Broken links are a bane for your site visitors; if they can't reach the content they're interested in the risk of them heading elsewhere to find it increase dramatically, and a broken link can quickly push them over the edge. In the 10th beta release of Publii we've reworked the internal link functionality to limit risk of your existing internal links being boken by site changes.
In particular, this new functionality means that internal links are no longer tied to the domain name of your site, so if you decide to switch your domain name around at a later date your internal links will be preserved; no need to comb through your content to find any offenders!
WordPress Importer: Import pages and custom post types
After the addition of the basic WordPress import functionality in the last beta release, we've been slowly enhancing its feature set, starting with improving the number of types of content you can import.
The first iteration supported import of posts, categories and tags, but now two additional types are supported:
Pages - Pages in WordPress are essentially the same as posts, but are expected to be used for static content that won't change much, such as About Us pages and the like. These will be imported as posts in Publii; if you want them to be used similarly to pages in WordPress, you can turn on the Hide this post in listings setting available on the post edit screen.
Custom Post Types - In WordPress, these can be used to add extra information to posts. However, as Publii does not have custom post types of its own, they will be imported as post content also. This can be useful if the post types were used to store more extensive notes for your blog, for example.
With these content types supported you'll be able to get your new Publii site up and running even faster than before.
WordPress Importer: Auto-insert post content HTML formatting
The thing about importing a lot of content from your WordPress site is that you won't necessarily know if the content is properly formatted for HTML; some of the content may have been wrapped in shortcodes or other elements that would be filtered by WordPress during content generation, repackaging it to be displayed correctly as HTML. If this content is then imported into Publii it may not be formatted correctly, causing it to not be displayed or to be displayed incorrectly.
To prevent this issue from arising, we've added an option to automatically add paragraph and line break HTML formatting to your imported content, similar to the wpautop function that is built-in to WordPress. You can select whether you wish to do this or not in the WordPress Importer after selecting the WXR file you want to import (it is enabled by default).
A new home for App Settings
Many of our users have been using Publii to build and manage multiple sites across a range of computers, which means that they need to be able to quickly deploy their existing websites to new Publii installs. However, getting this sorted had some rather tedious steps to complete one the app was installed; Publii required users to create a new website on first run before the Global Settings could be accessed, where they could change the site files storage location to point to their existing site content.
In this release, the Global Settings screen is now accessible from the site selection screen, so as soon as Publii opens you can reconfigure your site location without creating a blank site that you'll need to delete a moment later once your settings are ready.
Favicon support in themes
It's a strange name, but a Favicon is a simple thing; it's the little logo that you'll usually see to the left of the site name in your browser's tabs or bookmarks. A favicon can make your site easily recognizable in the swarm of tabs that modern internet users (which is pretty much all of us!) have open.
This version of Publii adds favicon options to its themes, which you can specify in the Additional tab of your theme's custom settings, which you'll find in the Theme section of the Publii interface. The recommended size for a favicon is a tiny 16x16 pixels, which can convey all your site's character in a bite-sized file. You can use any image file you like though; just drag and drop it into the upload area. You can also specify whether to save the favicon as a .png or .ico file should you need to.
Custom HTML in AMP site version
The AMP version of your site is super-fast and great for viewing on mobile devices, but it was also standardized in the theme, preventing custom HTML content from being added as is possible in the normal, full-fat site. With this beta, you'll be able to add Custom HTML to your AMP site's head and footer sections too; you'll find the new AMP header and AMP Footer tabs in Publii's Custom HTML tool.
Specify Open Graph image
When a post from your website is shared on social media platforms like Facebook, its Open Graph functionality allows particular elements of the preview such as the title or description to be user-defined, making the preview far more inviting. Crucially, such previews will also use images taken from the post; many social media posts perform better when there is an image attached so it's usually a good idea to include one.
Publii already includes the ability to generate Open Graph tags for your content, but if there is no image available for the preview to use then a fallback image (in Publii's case, the site logo) would be used instead. The latest beta adds a small improvement to this functionality by allowing for an alternative fallback Open Graph image to be defined for your site. This option can be found in the Settings → Advanced Options → Open Graph tab of your Settings screen.
Put your slightly-technical hats on for this one. The catchy (or should that be cachey?) ?v= allows fine control over how your visitors' browsers cache your site. In plain language, when you visit a website your browser can save a lot of the site's content and store it. Then, when you go back to that site, it will just reload this data from storage rather than redownloading it from the website's server.
Lang attribute automatically added to HTML tag
Search engines use the information on your site to better target users' searches; data included in the HTML tag of a site can give search engines a more accurate picture of the type of content the page provides. Publii now automatically defines the lang attribute, which tells search engines which language your site uses, by using the language selected for your website in Publii.
Developer additions: All-view post custom configuration, smallupload uploader field
For development-minded folks there are two useful additions in this beta release. First off, it's now possible to use custom options specific to each post in post listings as well as on the post view itself. This could be used, for example, to set a video link within each post and display it on the listings page as well as the post page. On the more modest side of things, a new smallupload uploader field has been added especially for favicons, given the new favicon feature added in this version of Publii.
There's always a way to make Publii better, and with each release our dev team do their best to improve the core of the app to make it more responsive, intuitive and flexible. This time around the following improvements have been implemented:
The Sync button now better indicates when a sync is required.
Added a warning about cleaning the destination directory when selecting a manual deployment output location.
Optimized WordPress Importer's storage of imported data; import is now faster, especially for larger website.
Added a retry when uploading to GitHub Pages if issues are detected.
Updated Electron to 1.7.9.
Improved Netlify sync process; it may be slightly slower, but will not exceed the API Rate Limits for larger websites.
Theme tags are now always displayed in alphabetical order.
Twitter Card post excerpt is now automatically generated from the post content if the user has not specified their own description.
Just like how there's always a way to improve an app, there's also always some bugs to squash, no matter how careful you are! This release includes the following fixes:
Fixed issue with disappearing featured images in some cases during post save.
Fixed issue with tag link when the tag slug is not based on the tag name.
Fixed pagination; featured, trashed and removed posts are now counted correctly.
Fixed author/tag post counters; featured, trashed and hidden posts are now counted correctly also.
Fixed website name in sidebar; now the display name is used instead of the slug.
Fixed issue with founded edge cases in WP Importer
Fixed issues with CSS minification in some cases related to calc().
Fixed issue with lazy load for GIF images in all themes.
Phew! That was a lot to get through, but there's still more work to be done. We hope that you enjoy the new stuff in the 10th Publii beta, and don't forget that you can join us on our Publii Community Hub and give us some feedback on the app and what features you'd like to see added in the future, report bugs, or just get a bit of advice on specific features.
A very special thank you to Victor from PUSHR, who has kindly sponsored our download section and provided us with a CDN from https://www.pushrcdn.com