Skip to content

openpress/easy-hugo-blog

Repository files navigation

Easy Hugo Blog (EHB)

Easy Hugo Blog(EHB)is a GitHub Template repo for creating a Hugo blog rapidly just by click Use this template.

It integrates several plugins/GitHub Actions to make things easy and simple.

Quick Start

Use mono repo to edit posts and serve GitHub Pages

  1. Use this template to create a repo, name it as <Your GitHub username/Orgnization>.github.io.
  2. To create new posts in content/post folder, and commit. Generated static content will be pushed to gh-pages automaticly
  3. Go to repo's Settings page, click Pages in left menu and set Pages' branch as gh-pages as below:

  1. A minute or two, your GitHub Pages site will be updated.

Use one repo to edit posts, another one to serve GitHub Pages

Use case:

A GitHub Free Plan account cannot use the GitHub Pages in a private repository. To make your source contents private and deploy it with the GitHub Pages, you can deploy your site from a private repository to a public repository.

Take your username/Organization as openpress for example:

  • openpress/homepage: A private repository of Easy Hugo Blog template
  • openpress/openpress.github.io: A public repository using GitHub Pages

Note: the two repos must belong to one user/organization.

And you need use deploy_key. Firstly set your private key to the private repository, and ensure that the Name is set as ACTIONS_DEPLOY_KEY

WX20221008-114114@2x

and set your public key to your public repository.

WX20221006-161458@2x

Note: You can use ssh-keygen Template to create a deploy key in GitHub repo instead of commandline.

Then just create posts and set the public repo's GitHub Pages' branch as gh-pages.

Done!

About

A template repo of Hugo blog for an easy and quick start.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published