What's a website without content? In the Posts section of Publii you can create articles that will make up the bulk of the content on your site. Depending on the theme selected, these posts may be displayed in order on the frontpage, or displayed as individual preview cards. In this section we'll look at how to add, remove or edit your posts.
Adding a Post
To add a post in Publii, click on the Posts option in the left sidebar, then click on the green Add new post button at the top-right of the page; if you have not created any posts yet the button will instead be blue and in the centre of the screen.
You'll see the Create New Post page, where you'll be doing all your writing and editing. The text editor included with Publii includes all the options that you'd expect, including the ability to insert tables and pictures or embed media from online video websites like Dailymotion. These options are all available in the toolbar at the top of the editor; if you are unsure about which icon corresponds to which option, you may mouse over an icon to see a tooltip about it's function. Before continuing, remember to add a Post Title in the field provided above the toolbar; until this is done you will not be able to save any changes to the post.
As well as the text editor there are a number of additional options that allow for finer control of your post. These options are all included in the right sidebar, separated into tabs for easy sorting. The following options are available (note that not all options are available for all themes):
- Post author - Select which author should be displayed as the creator of the post.
- Set custom post date - Clicking on this option allows you to modify the displayed publication date and time on the post, instead of using the exact date and time it was created in the Publii app.
- Mark as featured - If enabled, then the post will be highlighted on listing pages such as tag pages, so that more visitors will notice it.
- Hide post - Enabling this option will stop the post from appearing on listing pages, such as author or tag pages.
- Exclude from homepage - When enabled, the post won't appear in any frontpage showcase sections, but will continue to appear in listings and other pages that generate post lists, unlike the standard Hide post option.
- Featured Image - The featured image usually appears at the top of the post and is also used as the post-preview picture. To add a featured image to your post you can either drag and drop an image onto the Featured Image box, or click on the Choose File button to open a file explorer window to select a photo from your computer.
- Alternative Text - This option is only available if you have a featured image set. Here, you can add text that will be displayed if the image cannot load, or read by a screen-reader used by visually-impaired users to describe the photo.
- Caption - Another featured-image-only option, text added here will be added as a caption under the photo.
- Credits - Name or other text added here will appear as a credit, letting people know who took the picture or owns the copyright if it is not your own.
- Tags - This field sets which tags (categories) the post should be attached to, so users will see it when browsing posts by tags.
- Main Tag - when you add multiple tags to a post Main Tag will appear; you can select which tag should appear with the post on the frontpage or other pages (supported by the selected themes only).
- Post Slug - The post slug is a URL-friendly version of the post title, without spaces or special characters. If left blank Publii will automatically generate this, so it can be ignored if you're not sure what to do!
- Page Title/Meta Description - These two fields provide the meta-data for the post; this data is used by search engines and may be displayed in search results, but can be ignored if preferred.
- Meta Robots Index - This option decides what permissions search engine 'robots', which log webpage data and generate search results, have. Index will allow the search engines to include your page in search results, while Follow will allow the search engine robots to follow links on the post to provide more nuanced results. If you're not familiar with this setting you can leave it at the default.
- Canonical URL - If your post is duplicate content from another part of your site, you can enter the original post's URL here to prevent the duplicate content impacting your search ranking.
- Post Template - If available, this option will let you choose a post layout; whether additional layouts are available depends on the theme you are using.
- Display X (where X is an element from the post page) - The display options allow you to enable or disable individual post elements, such as share buttons, author bio etc...The global options are defined in the Theme Settings; options here are to override the global settings for a single post.
- Navigation Color (not available in all themes) - Defines whether navigation buttons to move between posts on the tag are dark or light colored; this should be set depending on the coloring of your hero image e.g. an image with a dark background should use light navigation colors.
Saving your Post
When your post is ready to save you have multiple options available, accessible via the blue button at the top of the right sidebar; by default this will be set to Save and Close. Clicking on the arrow at the right side of the button will let you switch between the following four options:
- Save and Close - Saves and publishes the post, and returns you to the post list screen.
- Save - Saves and publishes the post, but doesn't return you to the listing page, so you can continue to edit the post.
- Save as Draft - Saves the post as a draft, so it will not be visible on the live site even after syncing.
- Save and Publish (only visible on draft posts) - If you have previously saved a post as a draft, this additional option will be available. Using it saves changes to the post, and publishes it so it will be visible on the live site after the next sync.
Editing a Post
You can make changes to a post at any time, even after publishing. You only need to click on the post you want to edit in the Posts screen and you'll be taken to the Edit Post page, where you can make and save your changes just like when creating a new post.
Deleting a Post
Deleting a post is quite a bit easier than writing one! On the Posts screen you'll see a list of your created posts; just add a check to the left of the post you want to delete, and click the red Move To Trash button that appears; this will move the post to the Trash section where it may be deleted permanently later, or restored.
Restoring/Permanently Deleting a Post
When a post is first deleted it is not totally removed from the Publii app; instead, it is moved to separate Trash category from where it may be permanently deleted or restored if you change your mind. To view deleted posts, click on the Trashed filter listed at the top of the Posts screen, under the search bar:
This will display a list of deleted posts. To select a post, click on the checkbox to the left of the name; you will now see two new options at the top of the post list to permanently Delete the post, or Restore it to its original category. Click your chosen button and the post will be moved accordingly. Bear in mind that once a post is deleted from the trash section it will no longer be available or restorable.
Duplicating a Post
If you wish to duplicate a post to reuse its layout, settings etc...then you can easily do so. When on the Posts screen, in the list of posts find the one(s) that you wish to duplicate and click the box to the left of its name to add a checkmark to it; a new set of options will appear at the top of the list, including a Duplicate button; click on this to automatically create a duplicate post named postName Copy.
Editing Post Publication Date
By default Publii will set the publication date and time to the moment the post is saved in the Publii app, rather than when it is synced to your site, which may cause issues if you will not perform a sync for some time. In such cases you can manually modify the publication date and time.
In the right sidebar, click on the Status tab, then click on the date and time under the Published heading; this will open a pop-up box where you can modify the published date and time. Don't forget to save the changes!
Note: If the post's publication date is set to a future time, it will not be automatically published and synced by Publii as it only uploads the static website files; it will simply display the future publication date on the post. Posts may be saved as drafts to prevent them appearing on your live site, and can be published and synced when required.