Download

Publii CMS v0.46.x: Introducing Pages, Enhanced Sync Mechanism, New Image Config Options and Simple Theme v.3

We're excited to announce the release of Publii CMS version 0.46, which brings a highly requested feature from our community: Pages. Until now, Publii exclusively supported posts, but with this update, we've expanded the platform's capabilities to include dedicated pages, offering a whole new way to manage your content.

Introducing the Pages Feature: A Long-Awaited Addition

For quite some time, our community has been requesting a feature that allows for creating pages separate from posts, and we've listened. The new Pages tab in Publii v.46 allows users to create and manage pages with the same ease and flexibility as posts but with crucial differences catering to more complex site structures.

Introducing the Pages Feature

While the page creation process is similar to posts—choose one of the three available editors and start writing—the main distinction lies in how pages are treated within the site. Pages exist independently of the post loop, meaning they are separate entities that do not mix with your site's regular blog posts (listings).

Like with posts, Pages come with various options in the pageConfig settings. This means you can enable or disable features such as comments, display of the date, or author information. By default, these options are turned off for Pages, giving you a clean slate to work with. However, it's important to note that you won't find options like related pages or navigation between pages, as is available for posts. This is by design, reflecting the nature of Pages as standalone content rather than part of a sequential or related series.

Nested Pages: Creating Hierarchical Content

One of the standout features of Pages is the ability to nest them, allowing for hierarchical structures. You can designate a page as a parent, with other pages acting as its children, and so on. This nesting can be managed directly within the page editor or in bulk using the Edit Hierarchy button available on the Pages listing.

Nested URLs

Nested URLs and Custom Homepages

Another highly requested feature that comes with the Pages is support for nested URLs, providing more organized and user-friendly web addresses. Additionally, you can now natively set any Page as the homepage of your site. This means that the content of the selected Page, along with its individual settings like SEO, will be displayed as your site's main page. 

Set page as homepage

If desired, you can move the previous index page with the post listing to a different directory, such as "blog," by adjusting the settings in the "Pretty URLs" section of your site settings.

Post prefix

You must update your themes and plugins to the latest versions to take full advantage of the new Pages feature. 

Pages have been designed based on the existing post structures so that you may find additional page templates in your theme. This includes the standard templates and an "empty container" template, providing a blank canvas for adding your custom code. This flexibility ensures that Pages can be easily integrated into your site design.

Important: If you have overridden theme files, we strongly advise against updating to the new versions without proper preparation, as it may cause your customizations to stop working correctly. Before proceeding with an update, carefully compare and merge your files, or consider renaming or removing the override folder.

For those using custom themes or making significant modifications to official Publii themes, we have also published a detailed article in our dev documentation that guides you through manually adding Page support. This resource is invaluable for users who need to integrate Pages into their unique theme setups.

Remember to update your plugins to support the new Pages feature. This will help maintain full functionality and compatibility with Publii v.46.

Enhanced Image Support: New Configuration Options for Posts, Tags, Authors, and Pages

Another exciting enhancement is the addition of image support within the configuration options for various content types, including posts, tags, authors, and pages. Publii offers a range of customization fields, as detailed in our Theme Settings API documentation. With this update, you can configure images for these elements, providing even greater flexibility and creative options.

Enhanced Image Support: New Configuration Options for Posts, Tags, Authors, and Pages

This new feature is handy if you want, for example, to have multiple featured images. You can now configure a different featured image in your post teasers than the one displayed on the actual post page. The same applies to tags and author profiles, allowing you to present a more personalized and visually engaging experience across your site.

Enhanced Repeater Field Capabilities: New Image and File-Dropdown Support

In Publii v.46, we've further expanded the capabilities of the Repeater Field, which was first introduced in version 0.43 as a powerful tool for theme and plugin development. The Repeater Field allows for the dynamic addition of multiple instances of a particular set of fields within the Publii backend, offering a more granular level of customization and flexibility.

Image in repeater field

With this update, we've added support for two new field types within the Repeater control:

  • Image Field Support: You can now add image fields within a Repeater, allowing for the dynamic inclusion of images as part of your content configurations. This is particularly useful for scenarios where multiple images need to be managed dynamically, such as in sliders, where you can now create a slider from pictures and descriptions alone without needing post content.

  • File-Dropdown Field Support: Additionally, we've introduced support for a file-dropdown field within the Repeater control. This field allows users to select files from the File Manager, offering a streamlined way to manage and incorporate various file types into your repeater-controlled content.

These enhancements make the Repeater Field an even more powerful tool for developers and users, providing more options for customizing and managing content in Publii. Whether you're building complex layouts or need more control over your content's structure, the updated Repeater Field is designed to meet your needs more efficiently and quickly.

Improved Sync Mechanism: Enhanced File Change Detection

In response to feedback from our users, we've significantly improved how Publii detects changes in synced files. Previously, Publii generated a single MD5 checksum for the entire site, which was stored in the files.publii.json file. This approach often led to issues where, despite only one file being edited, the sync process would mistakenly re-upload many files due to mismatched checksums.

With the new method, the files.publii.json file now contains a list of all files in your site, each with its own individual checksum. This change allows Publii to detect which files have been modified more accurately and ensure that only those specific files are uploaded during synchronization. Here's how it works:

  1. Individual File Checksums: The files.publii.json now includes a detailed list of every file on your site, each accompanied by its own MD5 checksum. This allows Publii to precisely determine which files have been altered since the last sync.
  2. More Efficient Syncing: During synchronization, Publii compares the local files.publii.json with the list on the server. If differences in checksums are found, only those files that have changed will be uploaded, reducing the risk of unnecessary bulk uploads and speeding up the deployment process.
  3. Improved Reliability: Moving away from a single checksum for the entire site to individual file checksums, this new method significantly reduces the chances of sync issues, ensuring a more reliable and efficient update process.

Note: After this change, your site may re-upload all files during the first synchronization, but this will only occur once. Subsequent syncs will only upload modified files.

Note: It's important to note that if, for any reason, you prefer to restrict access to the file list,  you can create a redirect from the files.publii.json to your homepage or block access to the file using, for example,.htaccess rules.

This update should significantly improve the sync process, making it more accurate and efficient while providing better control over your site's deployment.

Redesigned and Rewritten: Simple Theme v.3

With the release of Publii v.46, we're also excited to introduce the completely redesigned and rewritten Simple Theme v.3. This latest version features an enhanced appearance and a refined codebase, ensuring better performance and compatibility with the newest features in Publii, including full support for Pages.

The redesign brings a fresh, modern look to the Simple theme while optimizing its underlying code for improved speed and flexibility. Whether you're creating a blog, portfolio, or business site, the updated Simple theme provides a sleek, responsive design that takes full advantage of Publii's latest capabilities.

See it in action

Simple theme v.3

Note: If you prefer to continue using the Simple theme in its previous form (v.2), we recommend not updating to v.3. The file for version 2 will still be available for download on the theme's page under the "Changelog" section.

Widespread Theme Updates: Expanded Support for Pages and Typography Enhancements

In addition to the Simple theme, nearly all Publii themes have been updated to support the new Pages feature. But that’s not all—these updates also enhance typography, making achieving the perfect look for your site easier.

Italic fonts

We've added support for dedicated italic versions of variable fonts already existing within Publii themes. These are not just slanted versions of regular text but specifically designed italic fonts that offer a more polished and authentic appearance. These fonts are automatically detected and loaded, though you can turn off this feature if desired.

Moreover, the typography options in the Theme Settings have been expanded with several new controls under the FONTS tab. These include:

  • Letter Spacing: Now adjustable for the entire site, allowing for finer control over text appearance.
  • Headings (H1-H6) Customization: You can now configure the font style, letter spacing, and line height for headings, providing more flexibility in how your content is displayed.

These enhancements ensure you can fully customize your site's typography, aligning it perfectly with your design vision.

Improvements

We've made several improvements to enhance user experience and website functionality:

  • Added support for parsing internal links in mini-WYSIWYG fields. Previously, internal links like <a href="# INTERNAL_LINK#/post/29">link</a> were only functional within the WYSIWYG editor. Now, this functionality has been extended to include theme config options, as well as tag and author settings, providing more flexibility in linking content throughout your site.
  • Removed trailing spaces from Site ID in Netlify configuration to avoid unexpected sync issues.
  • Added more detailed logs when rendering issues occur. In addition to the error message, the full error stack is now displayed, providing deeper insights into what went wrong and helping developers diagnose and resolve issues more effectively.
  • Added isMainTag flag in tags data for easier differentiation between regular tags and main tags.
  • Added a message indicating that the updated theme contains custom overrides.
  • Added support for the Rust programming language in the code syntax highlighter, expanding the range of languages that can be accurately highlighted in the editor.

Bug Fixes

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

  • Fixed issues with responsiveImageAttributes, responsiveSizes, and responsiveSrcSet helpers.
  • Fixed issue with saving site settings using the bottom Save button.
  • Fixed the issue when saving an author when theme settings were not saved initially.
  • Fixed issues with invalid handling of default parameter values under post/tag/author config.
  • Fixed issues with WYSIWYG editors in repeater control.

Hotfixes

Publii Hotfix 0.46.1

  1. Posts Index Link: Introduced a new option to add a "Posts Index" link to the link dropdown menu when a "Post Prefix" is set.
  2. Page Selection for Privacy Link: In Site Settings, you can select a specific page for the Privacy Link. This supports external and internal links, with internal links now available for both posts and pages.
  3. Featured Image ID Bug: Addressed an issue where the featured_image_id was causing problems. (GitHub)
  4. Broken Internal Links to Author Pages: Fixed broken internal links that pointed to author pages. (GitHub)
  5. Nested Pages Issue: Resolved a problem related to nesting pages. (GitHub)
  6. Incorrect Image Paths for Pages: Fixed issues with image paths for pages. (GitHub)
  7. Author Saving Problem: Fixed a bug preventing correct author saving. (GitHub)
  8. Initial Page Upload Issue: Addressed a problem with the initial upload of pages. (GitHub)
  9. Corrected Links to Frontpage and Posts Index: Fixed links to the homepage and posts index to ensure they include index.html when necessary.
  10. Improved Error Display During Synchronization: Enhanced the display of errors during synchronization. (GitHub)

Final Thoughts

Publii CMS v0.46 is a significant step forward in our mission to create a more versatile and user-friendly platform. With the introduction of the Pages feature, enhanced synchronization methods, expanded image configuration options, and numerous other improvements, we continue to respond to the needs and feedback of our vibrant community. These updates not only increase the functionality and flexibility of Publii but also ensure that our users have the tools they need to create and manage their websites more efficiently.

As always, your feedback plays a vital role in shaping Publii's future. We encourage you to share your thoughts, suggestions, and any issues you encounter on our community forum. Together, we can make Publii even better.

We’re excited to see what you create with the latest version and look forward to your continued 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