Hello World with Publii

Have you ever wanted a place on the Internet to claim as yours? Here is how to setup a website like this one. Then you can make it uniquely yours.

Start

  1. Download and install Publii from https://getpublii.com/
  2. Open Publii, which runs you through a site creation wizard. It doesn’t matter what you set here, because you can change it from the settings later.
  3. Create a new post. If you’re not sure which editor to use, WYSIWYG might be easiest. Write and save your post.
  4. Click on “Preview your changes” at the bottom left:
    Image description

Congratulations, you have a website :)

Experiment

Now is the fun part: see how you can customise it.

  1. Replace the placeholder homepage intro with your own. Go to Theme > Layout > Homepage > Hero Text and edit it.
  2. Have a look at the colours, fonts and various styling in the Theme settings.
  3. Add a new page (e.g. About). A page can have text on its own, or it can contain a list of posts.
  4. Make the new page accessible, by creating a new menu. Don’t forget to tell Publii site that this is the “main menu”:
    Image description

Publish

Let’s publish it, so we can brag :) First, we’ll tell Publii to give us the files of the website. Then we’ll upload them to CloudFlare pages, for free hosting.

  1. Go to Server, and click ZIP server type.
  2. Set up the website with relative URLs (that will be until you know your official URL).
  3. Setup the output directory to somewhere easy to find.
    Image description
  4. Click on “Sync Your Website” at the bottom left. That will give you the folder with your website’s files.
CloudFlare

Cloudflare is a world-wide Content Delivery Network (more details here ). They like it when they can host stuff themselves, so they provide free static file hosting. We have a website made of static files, so that’s perfect for us.

  1. Sign up for an account on CloudFlare and confirm your email.
  2. Click “Start building” if it asks you whether you have an existing project.
  3. Once you can see the dashboard, go to Workers and Pages on the bottom left
    Image description
  4. Click on the Pages tab
  5. Upload the folder that Publii generated
    Image description

CloudFlare will give you a link where your website now lives. Make a cup of tea - it takes a couple of minutes to deploy it for the first time.

Update

  1. Make some changes in Publii
  2. Click on “Sync Your Website”
  3. Open the Cloudflare Dashboard > Workers and pages > Your site name
  4. Click on “Create New Deployment” and upload the folder that Publii updated.
    Image description

Next Steps

  1. Get a domain name and assign it to the website. You can do that from within CloudFlare. Domain names cost money and are usually renewed every year.
  2. Setup an automatic deployment, to publish whenever we click “Sync Your Website”