Black Week 40% Off Promotion!!!
Download

Publii CMS v0.46.2: Content Conversion, New Blog Listing Options, Global UI Enhancements and more...

We’re pleased to introduce Publii CMS version 0.46.2 (build 16967), bringing a range of updates that enhance flexibility in content management and improve site functionality. This release includes new options for creating custom blog post listings, tools for content conversion, expanded organizational options across the interface, and support for the Elixir programming language, among many other refinements. Each update aims to improve user experience, making Publii an even more powerful tool for creating and managing static websites.

Convert Posts to Pages and Pages to Posts

To further enhance flexibility in content management, we’ve introduced the ability to convert posts to pages and pages to posts. This feature allows users to adapt the structure of their website content more efficiently to meet changing needs.

Post to Page Conversion

In the Publii interface, this can be done by selecting one or more posts or pages in the list view. Once selected, click on the “More” dropdown menu at the top and choose the "Convert to page" or "Convert to post" option as needed.

During the conversion process, all metadata for the post or page will be preserved except for specific post/page options. This is because the options available for posts and pages may differ significantly. However, if you decide to convert the content back to its original type later, the original configuration settings will be restored, ensuring a seamless experience.

Creating a custom post listing with posts.hbs 

When we set the Posts Prefix in the SEO settings, for example, to "blog," our posts will be displayed in the /blog/ directory, such as /blog/our-post/. By default, the /blog/ page will be built using the index.hbs file. This setup works well if we display a "page" as the homepage. But what if we want the /blog/ page to have a custom layout different from the homepage? In that case, we should use the posts.hbs file.

Simply place posts.hbs in the theme's root directory, and Publii will automatically skip index.hbs and display the contents of posts.hbs on the page specified by the posts prefix, e.g., /blog/. This gives users complete control over the appearance and layout of the blog page, independent of the design set for the homepage.

Additionally, ensure you include the appropriate feature flag in the Supported Features section in the theme’s config.json file. Add "postsPage": true to enable support for this custom layout functionality, as outlined in the Publii Supported Features documentation.

Nested Tabs in Theme Settings

The theme settings have been enhanced with support for nested tabs, allowing for better organization of configuration options within the settings panel. This feature enables theme developers to create a more structured and user-friendly layout, especially useful when a specific section requires multiple settings that need to be grouped logically. By assigning a parentgroup to an option, you can nest it under a designated parent group, creating a clear hierarchy in the settings.

Nested options in the theme settings

For instance, let’s say you have settings related to the homepage and want to group specific hero section options within it. By using the parentgroup attribute, you can define these relationships in the theme configuration file as follows:

{
    "name": "heroText",
    "label": "Hero Section Text",
    "group": "Hero",
    "parentgroup": "Homepage",
    "value": "",
    "type": "wysiwyg"
}

In this example, "Hero Section Text" is part of the "Hero" group, nested under the main "Homepage" settings. This approach organizes options more effectively and improves usability by helping users locate related settings quickly.

Currently, this feature is supported by Bespoke theme in version 1.1.0.0.

Support for Elixir in Syntax Highlighting

We have expanded the range of supported languages in syntax highlighting to include Elixir, addressing the needs of developers who use this language in their posts or documentation.

To ensure Elixir syntax is displayed correctly on your website, you must enable the latest version of the Syntax Highlighter plugin, version 2.0.0, which adds support for Elixir. Make sure your plugin is up to date to take advantage of this new language support.

Interface Updates in Publii

We’ve made several adjustments to the interface to enhance usability and visual consistency across the app.

Firstly, we’ve reduced the base font size to 14px throughout the app, aligning it with standard application font sizing. Of course, users who prefer a larger font size can increase it in the app settings.

We've also updated the right sidebar for posts, pages, tags, and authors. Section headers now have background colors to make them more easily identifiable.

We’ve also refined various other elements, like icons and other small details, to create a cleaner, more cohesive look across the app.

Improvements

  • Default Fallback Language Set to English: English is now the default fallback language to prevent localization strings from accidentally appearing in the user interface, ensuring a consistent and professional look across all locations (ref. GitHub Issue)
  • Timezone Included in Article Schema: The article schema has been enhanced to include timezone information, improving SEO and providing search engines with more accurate data (ref. GitHub Discussions)
  • Improved Page Hierarchy Management: A new mechanism automatically removes duplicate entries within page hierarchies, resulting in cleaner, more organized site structures without requiring manual adjustments (ref. GitHub Discussion)

Bug Fixes

We've also addressed several bugs to improve stability and performance:

  • Removed Hidden Tags from RSS: Tags marked as hidden are now excluded from the RSS feed (ref. GitHub Discussion)
  • Excluded Posts from RSS: Posts marked as excluded from the homepage are also removed from the RSS feed (ref. GitHub Discussion)
  • Removed Warning Icon for GitLab/GitHub Deployment: The warning icon no longer appears when GitLab or GitHub is selected as the deployment method  (ref. GitHub Discussion)
  • Internal Links to Homepage Pages: Fixed an issue with generating correct internal links for pages set as the homepage  (ref. GitHub Issue)
  • og:url Value Generation: Resolved an issue with the correct generation of values in og:url and canonical tags for SEO  (ref. GitHub Issue)
  • WXR Image Path Fix: Addressed an issue in WXR where images were loading with paths instead of URLs in the src attribute  (ref. GitHub Issue)
  • WXR Author Name Conflict: Fixed an issue with WXR import when the imported file contains an author with the same name as the main Publii author  (ref. GitHub Issue)
  • Empty Directory Removal: Resolved an issue where empty directories were not correctly removed during website rendering  (ref. GitHub Discussion)

Final Thoughts

Publii CMS v0.46.2 was initially planned as a simple hotfix, but we decided to go beyond quick fixes and add a few new features and modifications that enhance both functionality and user experience. 

These updates are a testament to our commitment to continually improve Publii based on user feedback and evolving web standards. While this release provides vital fixes, it also adds new tools to give our users more control and flexibility in managing their sites.

As always, your feedback is invaluable in shaping Publii's direction. We encourage you to share your thoughts, ideas, and any issues you encounter in our community forum. Together, we can continue refining Publii to make it the best platform for static site generation.

We’re looking forward to seeing what you create with this update and appreciate your ongoing support and collaboration.

Download Publii

What are you waiting for?

Start building your site today.

  1. 1 Download Publii
  2. 2 Write your content
  3. 3 Publish your site
Create website