New laptop? Restore Publii website hosted on Github Pages from backup

Mandatory steps to restore from backup

  • Install Publii app on your laptop.

  • Open Publii and choose “Install from Backup”

    • Choose latest backup file from Onedrive_i.a.j-gmail.com/publii-gh-pages-websites/backups
  • Once the site backup loads in Publii, click on “Provide access data” in bottom left corner.

    • Select “Github Pages”

    • The configuration below is for my site, please change it to match the config of your website:

      Website URL: `amberja.in`
      Username/Organization: `amberj`
      Repository: `personal-website`
      Branch: `main`
                Token: Token `Publii GitHub Page v2.0` from `Dropbox/logins.txt`
      Click "Test connection".
      
  • Themes: Click on 3 dots icon in top-right corner, then click “Themes” and add “Mono” theme: Mono - Note to self: The theme file is kept in Onedrive_i.a.j-gmail.com/publii-gh-pages-websites/themes/ - The theme uses icon pack plugin Feather Icons, but I decided not to use icons in navigation bar. You can insert code like anywhere to insert an icon.

  • Now make some minor edit to any post or page. Then click “Sync your website” to see if sync is working (from local to Github pages) and double-check the same by verifying that the minor edit is reflected on Github Pages website.

Change location of Sites folder and Backups Folder

  • Note down the location of folder where Publii was installed by default (usually ~/Documents/ on Mac).
  • Open Onedrive_i.a.j-gmail.com/publii-gh-pages-websites/ and create a new folder with appropriate name to uniquely identify this installation. Create subfolders inside this folder with name sites and backups
  • Click on three dots in top right corner of Publii’s main screen and click on “App Settings”.
  • Scroll down to “Files location” section/block.
  • Change “Sites location” here to the Onedrive folder (Don’t select the checkbox that appears when you change the location).
  • Change “Backup location” here to the Onedrive folder.
  • Click “Save Settings” at the bottom. This should move Publii Sites from old folder to new location on Onedrive.
  • As a last step, COPY (don’t move) original Publii folder (where it was installed by default) and back it up as well (just in case something goes wrong). * If you start getting errors about config files missing, then make sure that original Publii folder is still kept in original folder.
  • Also goto Publii > three dots in top right corner > Themes and make sure that Mono theme is visible as thumbnail. If not, delete and add it again.

Plugins

Additional options

To be done:

Related post