Skip to content
ChaiBytes

How to Put a Pelican Website Online Free with Cloudflare Pages

You will learn how to publish a Pelican static site from a GitHub repository on Cloudflare Pages, which gives it a free pages.dev web address.

By , Founder

3 min read

Share

What You Need

You can put a simple website online with Cloudflare Pages if you have the following:

  • A computer with a terminal, where you can run commands.
  • A GitHub account, where your website files will be stored in a repository.
  • Access to the Cloudflare dashboard.
  • Pelican, a static site generator written in Python. You write your content in reStructuredText or Markdown and Pelican turns it into web pages.
  • A basic understanding of Git. The official guide assumes you know it, and it points to a Git handbook if you are new.

Example: Hina runs a small tailoring shop in Lahore. She wants a price list and a contact page online without paying for a hosting plan. Pelican can hold those pages, and Cloudflare Pages can publish them.

Step by Step

  1. Create a Pelican project directory. This folder holds everything about your website. Use the terminal and move into the new folder before you go on.
  2. Create a folder named content inside the project. Pelican reads your written pages from here. Keep this name exactly as it is, because you will type the same name later in the build settings.
  3. Create a new GitHub repository. Open the GitHub new-repository page and create one. This repository is where Cloudflare will read your site from.
  4. Send your local project to GitHub. Go to your project folder and run the commands the official guide gives in your terminal. This copies your files into the repository you just made.
  5. Open the Workers & Pages page. Sign in to the Cloudflare dashboard and find this page.
  6. Choose Import an existing Git repository. This connects Cloudflare to your GitHub account so it can see your files.
  7. Select your new repository and choose Begin setup. Pick the exact repository you created in step 3, not an older one.
  8. Fill in the Set up builds and deployments section. Enter the information the guide lists for this section. Check the spelling of the content folder name here, because a mismatch can stop the build from working.
  9. Find your site address. After deployment, Cloudflare gives your project a unique subdomain on pages.dev. Copy this address and open it in a browser to check your pages.
  10. Make a change and push it. Edit a page, save a commit and push it to GitHub. Cloudflare Pages rebuilds and deploys the site automatically.

Example: After Hina finishes these steps, she edits her price list in the content folder, commits the change and pushes it. Within the same workflow, her customers see the updated prices on her pages.dev address.

Tips and Common Mistakes

  • Check the content folder name. The guide says you set this name in the build command, so a typo will cause problems.
  • Push your code before you import the repository. Cloudflare can only build what is already on GitHub.
  • Use preview deployments before going live. When you open a pull request, Cloudflare can create a preview so you can see changes before they reach the live site.
  • Know your Git setup. If you clone with SSH, you must generate SSH keys on each computer you use to push or pull from GitHub.
  • Use the official guide for details. This article summarises the main path. Where the official Cloudflare guide has exact commands or fields, follow those.

Use It Responsibly

AI tools can help you understand Pelican and Git, but always check their answers against the official guide before you act on them. Never paste passwords, customer names, phone numbers, payment details or other private data into a prompt. You can use a prompt like this one:

I run a small shop and want a simple website built with Pelican. Explain in plain English what a content folder does. Do not ask me for any private or customer details.

Keep your GitHub and Cloudflare accounts secure with strong, unique passwords, and do not share login details with anyone. Follow the rules of your workplace or college if you are using their computers or accounts. Check Cloudflare’s own terms for the free plan before you rely on it for business use, because this guide does not cover those terms.

About the author

, Founder

Sources

  1. Pelican · Cloudflare Pages docs — developers.cloudflare.com Official source
  2. Introducing Cloudflare Pages: the best way to build JAMstack websites — blog.cloudflare.com Official source

Sources last checked . Apps change: if a step looks different, follow the maker's page.

Drafted with AI assistance from the help pages above and checked automatically for completeness. Always confirm dates, fees and requirements on the official website before acting. Report an error · How we correct mistakes

Was this helpful?

Questions or something to add?

Ask below. We read every comment and reply when we can.

Leave a comment

Be respectful. Comments with links are reviewed before they appear. Your email is used only to contact you about your comment, such as a reply from the editor.