Skip to content

lopins/hugo-template

Repository files navigation

中文 | English

Hugo logo

Hugo Template

A fast and flexible static site generator built with love by bep, spf13, and friends in Go.



Get Started

Define Domain

Change the baseURL in config.yml to your site's URL

baseURL: "https://lopins.github.io/hexo-template"

or

baseURL= "https://lopins.github.io/hugo-template"
  1. pull theme into themes/ and update it.

    git submodule add git@github.com:adityatelange/hugo-PaperMod.git themes/hugo-PaperMod && git submodule update --init --recursive

  2. update theme: "hugo-PaperMod" in config.yml and configure other fields

  3. update editPost: "https://github.com/lopins/hugo-template/tree/main/content" in config.yml

  4. into themes/hugo-PaperMod to configure the theme in theme.yml

Push to Github

git add . && git commit -m ':wrench:docs(themes): Add or update configuration files' && git push origin main

  1. Install

    Click "Use this template" -> "Create a new repository"

1. Create a new repository

  1. Set up

    Set up and enable GitHub Pages service

2. Set up GitHub Pages branch

  1. Publish

    Publish an article on the "hugo branch" of Github.

3. Write or Upload an Markdown file

Notice

Submodule to Change Theme

# Add Submodule - Upadte Submodule
git submodule add git@github.com:adityatelange/hugo-PaperMod.git themes/hugo-PaperMod
git submodule update --init --recursive

# Delete Submodule
git submodule deinit -f themes/hugo-PaperMod
rm -rf .git/modules/themes/hugo-PaperMod
rm -rf themes/hugo-PaperMod

# Display Submodule - Pull Submodule - Sync Submodule
git submodule status
git submodule foreach git pull origin main
git submodule sync

Permission

If you meet the problem like remote: Permission to xxx denied to github-actions[bot].

When you push your changes, you need to give the permission to the github-actions[bot] in your repo's.

By following the steps below: Settings -> Actions -> General -> Workflow permissions -> Read and write permissions -> Save.

License

MIT License.