GitHub

Experimental WordPress import, a new theme and expanded editor functionality

The new Publii beta, has been made available to download. This time around we're getting experimental with the first implementation of WordPress import tools, plus there's a brand new theme and some extra functionality for the editors Publii uses, among plenty of other features, fixes and other little additions to make using Publii better than ever.

New theme: TechNews

Tech is an everyday part of life, so its no wonder that so many of us get a bit geeky around gadgets. Publii's new beta includes a stylish tech-portal style theme, TechNews, that'll let you indulge your inner (or outer!) geek.

TechNews is a great option for users that publish new posts regularly; the frontpage includes five different layout options that provide a strong visual impact (these layouts are available for tag and author pages too!), and there's a sidebar with even more listings for all your big releases. On the post side of things, you can choose whether or not to include the sidebar, providing a nice way to attract visitors to other areas of your site, or drop in a bit of advertising, which TechNews supports.

Technews Publii Theme
New Technews Theme - Live demo

TechNews is included with the update package, so once you're updated it'll be ready for you to activate and use.

WordPress Import Tools (Experimental!)

Many of our users have mentioned that they would like to utilize Publii for their website, but without an easy way to migrate their existing WordPress posts it would create an awful lot of work to actually implement. Crafting a full suite of import tools that would facilitate this takes a bit of time, but with this release of Publii we can introduce the first iteration, with more complex options to come.

In this release, the WordPress Import Tool will be able to import posts, images, authors plus tags OR categories from a WordPress WXR file. Because Publii only uses Tags as its equivalent of categories, during import you can choose whether to use your WordPress categories or its tags as Publii tags. Posts will automatically be assigned to the tags/categories that they were attached to in the WordPress installation.

Publii WordPress Importer

For author import, you can choose to import the authors from WordPress, keeping them attached to their respective posts, or you can assign all the imported posts to your main Publii author.

The WordPress Import Tool can be found in the Tools section of the Publii interface if you want to give it a try; this is still an experimental feature as there's more testing and features to be added over the coming months, so for now we advise only using the import feature when creating a new website, rather than replacing your existing WordPress version of the site with Publii, until all the features have been properly implemented and tested.

Search and Replace in Custom CSS, HTML and Source Code Editors

If you're experienced with web development it can be useful (or just plain fun!) to play around implementing your own custom CSS and HTML to your Publii site to give it your own custom look and feel. And if you do this long enough, you may well end up with a sizeable amount of custom code in the included editors; something that will be quite painful to sift through when you want to make changes!

Search and find and replace editor

This release has added both Search and Search and Replace features to the custom code editors, which includes the custom HTML and CSS tools, as well as the post source code editor. Now there's no need to painstakingly search through your custom code to find the area you want to change; a quick search and you can get things done much more quickly than before.

Modified Preview

The capabilities of the preview features were heavily expanded in the last beta, and one of the changes was the use of the webview element, which is much more powerful than iframe, which was used previously. However, after further testing by our users and us, it was discovered that webview has some serious issues with resources. Since iframe doesn't give enough benefits over its flaws, we have instead decided to remove the preview window entirely.

Modified Preview

Instead of opening a preview window, from this beta whenever you click on the Preview button the preview will open in your chosen browser. The benefit here is that there will be no hash rendering issues, and opening the preview in a browser external to Publii will be much safer as its generated within the browser sandbox; that is, there's no risk of malicious scripts being inserted, as any such attempts would need to use Electron's rights.

You shouldn't need to change any settings to use this new preview, however you may find that your preview isn't opening in your preferred browser; for example, you may have Chrome installed, but the preview will open in Edge instead. If this is the case, then it's likely that *.html files are associated with Edge on your OS, since the preview generates and then opens an .html file rather than a URL. You can modify this within your system settings.

Rebuilt System Messages

Sometimes Publii needs to let you know what's going on, and to do so it'll show a pop-up with any important system messages. Sometimes though, this system could become a little over-zealous, causing a flurry of information that wasn't always necessary. By rebuilding the system messages, we've limited the number of pop-ups that can appear at any given time, avoiding overloading users with information that perhaps is not absolutely necessary.

 Rebuilt System NEssages

Regenerating Thumbnails during Theme Change

Thumbnails are an important part of your website's aesthetics, and since each theme can use different thumbnails depending on its layout it's necessary to regenerate them whenever you switch between themes. Previously, Publii would show a pop-up with a link to the settings screen where the regenerate thumbnails tool was, but in the latest build it is possible to simply regenerate the thumbnails directly when switching the theme. It's nothing big, but it keeps things flowing smoothly when you're playing around with multiple theme types.

Netlify _redirects file support

When deploying your site to Netlify, redirects are usually handled by a special _redirects file that is added to the root of the site folder, rather than an .htaccess file that most hosts would use. With this beta, Publii will automatically rename the .htaccess file it generates to _redirects, so any changes you make via the .htaccess editor tool in Publii can now be applied on your Netlify site.

Rewritten S3 client - Large file support!

Amazon S3 is a popular deployment platform for websites, whether standalone or as part of a larger project. It was one of the first platforms beyond FTP that we added support for in Publii due to its flexibility. However, one of the issues that we had was that our sync process could run into issues when dealing with large files, or indeed a large number of files.

Publii Amazon S3 rewritten

To fix this, we've rewritten the S3 client to completely remove the problems with large files; now S3 can be used with any size website without running into any snags along the way.

Improvements

As always, as well as the new features we've also added a slew of improvements to existing Publii functionalities to make it smoother, more user-friendly, or just more pleasant to see and use. This time around you'll be able to enjoy the following improvements:

  • Added error message when config.json is broken.
  • Improved the syntax highlighting in the Custom HTML tool for better readability.
  • Removed the flashing effect that occurred when navigating from the sidebar and topbar in the site view; this is possible as we have implemented a new method for rendering the site preview.
  • Disabled pasting clipboard content as text; now it's possible to move HTML blocks into an article using copy and paste.
  • Improved the messages displayed when using manual deployment.
  • Implemented file removal from the destination directory when using manual deployment.
  • Updated the TinyMCE editor.
  • The Save and Preview button is now locked when the currently-used theme is uninstalled.
  • Updated Electron to version 1.7.8, which fixes an RCE vulnerability.
  • ...plus a load of minor code improvements that will improve the overall user experience.

Bug fixes

Nobody likes bugs, but there's always going to be a few snags in even the best-prepared apps. Thankfully, our users are very helpful at keeping us informed if they run into any issues, so with this beta we've been able to implement the following bug fixes:

  • Fixed preview not working when writing the first post if no author was chosen.
  • Fixed bug with authors not updating on lists in some cases.
  • Fixed bug in themes when using the Custom HTML tool.
  • Fixed issue with the application background on MacOS High Sierra.
  • Fixed links to the general post list that are displayed on tags and author listings.
  • Removed memory leaks that existed in some of the event listeners.

Note: Before installing a new version of Publii, we recommend that you backup all your websites using the back up option.

Download Publii

Subscribe

Get the latest Publii news, updates and more delivered directly to your email inbox

You can change your mind at any time by clicking the unsubscribe link in the footer of any email you receive from us, or by contacting us at contact@tidycustoms.net. By clicking below, you agree that we may process your information in accordance with our Privacy Policy.