Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

This utility will convert a Post to a Page in Publii 0.46.x

License

Notifications You must be signed in to change notification settings

bjazmoore/Post2Page-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Post2Page Converter

version 0.1.0 - 9/27/2024

THIS UTILITY HAS BEEN RETIRED AS THE FUNCTIONALITY IS NOW PART OF PUBLII NATIVELY

This utility will convert a Post to a Page in Publii 0.46.x

I created this utility to aid in quickly converting posts from Publii before 0.46.x that were used as pages into actual pages in Publii 0.46.x or later. The utility is written in Python 3.x. It is a GUI application using the TKinter library (as ugly as that is). I have created an executable for the windows environment that can be downloaded here. On the MacOS or Linux operating system execute the tool using it as a Python script.

Downloading the Program

Windows

Post2Page.exe for Windows

MacOS & Linux

Using the scripts on other operating systems (MacOS or Linux) requires a local copy of Python 3 (usually installed).

  1. Download repository to obtain the source files.
  2. Make sure they are both in the same folder.
  3. Launch the program by opening a terminal prompt, navigating to that folder and issuing the commmand:
python ./main.py

Warning I have not tested this script on the MacOS or Linux OS, as I do not have access to these. I expect that things will work, bu there is certainly a possiblity they will not.

How to Use Post2Page Converter

Always backup your site before converting posts to pages.

  1. Open the application on your system (or execute it as a Python script from the command prompt).

figure 1

  1. click "Select site" and navigate to where your Publii folder stores sites (usually c:/users/User_Dir/Publii/sites). Select the top-level folder for a site (shown below).

figure 2

  1. The utility will run several checks to make sure your site is ready to convert posts to pages. First it will connect to the SQLite database which confirms that the folder does is indeed a Publii site. Next it checks to see what your current theme is. Next it checks the theme's config.json file to make sure it supports PAGES. Finally it checks to see if there are one or more posts that are in Published or Draft status and are not already a page. The figure below shows the tool trying to access a site with a current theme that does not support Pages.

figure 3

  1. Once all the checks succeed the tool will list all posts that are not alredy pages. Select the one you want to convert to a page.

figure 4

  1. The post details will be displayed and a button to convert it to a page will be added to the interface as shown below.

figure 4a

  1. Click the button "Convert to Page" to begin the process. You will be asked if you are sure.

figure 4b

  1. Confirm that you are sure and the page will be converted.

figure 4c

###Warning:

If you are converting a post from a version of Publii before 0.46 that is acting as the homepage for your site (as shown below) open Publii and set this setting (Theme -> Custom Settings -> Layout -> Homepage display) back to "Latest Posts".

figure 5

After converting that post to a Page set it to your new homepage (as shown below) in Site Settings -> Advanced Options -> SEO -> Homepage.

figure 6

Warnings and License

WARNING: It is not required to close Publii when converting posts to pages but I highly recommend it.

Always backup your site before converting posts to pages.

The author assumes no responsibility for issues, problems, lost data, etc for using this tool. Backup you site first!

Licensed MIT.

About

This utility will convert a Post to a Page in Publii 0.46.x

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages