Skip to content

razn12/demo-hugo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hugo Site Deployed in Cloudflare

Introduction

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.

Prerequisites

Before getting started, ensure you have the following:

  1. Hugo: Install Hugo on your local machine to build and preview the site locally.

  2. Cloudflare Account: Sign up for a Cloudflare account to deploy and manage the site using Cloudflare Pages.

Getting Started

  1. Clone the Repository: Clone this repository to your local machine using the following command:
git clone https://github.com/your-username/your-repo.git
  1. 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 .
  1. Customize Your Site: Add your content, templates, and assets in the appropriate directories within the content and layouts folders. Customize the theme and other settings in the config.toml file.

  2. 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.

Deployment with Cloudflare Pages

  1. Sign in to Cloudflare: Log in to your Cloudflare account.

  2. Add Your Site: Go to the Cloudflare Pages dashboard and add your Hugo site's repository.

  3. 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.

  4. Deploy: Cloudflare Pages will automatically deploy your site whenever you push changes to your repository's main branch.

  5. Custom Domain (Optional): If you have a custom domain, you can link it to your Cloudflare Pages deployment using the provided guidelines.

Continuous Deployment

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!

Contribution

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.


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published