Hugo Site Deployed in Cloudflare
This repository contains the source code and configuration for a website built with Hugo, a fast and flexible static site generator. The site is deployed using Cloudflare Pages, which provides a seamless and automated deployment process.
Before getting started, ensure you have the following:
-
Hugo: Install Hugo on your local machine to build and preview the site locally.
-
Cloudflare Account: Sign up for a Cloudflare account to deploy and manage the site using Cloudflare Pages.
- Clone the Repository: Clone this repository to your local machine using the following command:
git clone https://github.com/your-username/your-repo.git
- Configure Hugo: If you haven't set up your Hugo site yet, run the following command inside the repository's root folder:
hugo new site .
-
Customize Your Site: Add your content, templates, and assets in the appropriate directories within the
content
andlayouts
folders. Customize the theme and other settings in theconfig.toml
file. -
Preview Locally: To see your changes locally, use Hugo's built-in server:
hugo server
Visit http://localhost:1313
in your web browser to view the site.
-
Sign in to Cloudflare: Log in to your Cloudflare account.
-
Add Your Site: Go to the Cloudflare Pages dashboard and add your Hugo site's repository.
-
Configure Build Settings: Set the build command (e.g.,
hugo
) and output directory (e.g.,public
) in the Cloudflare Pages dashboard. You can also configure any environmental variables required for your build. -
Deploy: Cloudflare Pages will automatically deploy your site whenever you push changes to your repository's main branch.
-
Custom Domain (Optional): If you have a custom domain, you can link it to your Cloudflare Pages deployment using the provided guidelines.
With Cloudflare Pages, each time you push changes to the main branch of your repository, Cloudflare Pages will automatically build and update your live site. Enjoy hassle-free continuous deployment with Hugo and Cloudflare!
Contributions to this project are welcome! If you find a bug or have any suggestions for improvement, please open an issue or submit a pull request.