Skip to content
 
 

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.


Demo  ·  Official  ·  Docs  ·  Community


🚀 Get Started

1. Define Domain

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

baseURL = "https://lopins.github.io/hugo-template"

2. Configure Theme

Click to expand theme configuration steps

Step 1 — Add the theme as a submodule

git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
git submodule update --init --recursive
cp -r exampleSite/* ../

Step 2 — Set the theme in config

In config.toml, change the theme property:

theme = "LoveIt"

3. Push to GitHub

git add . && git commit -m "🔧 docs(themes): Add or update configuration files" && git push origin master

✍️ Publish Articles

Click to expand article publishing guide

1. Install

Click "Use this template""Create a new repository" to fork this template.

1. Create a new repository

2. Set up GitHub Pages

Go to Settings → Pages and select the gh-pages branch as the source.

2. Set up GitHub Pages branch

3. Publish an article

Add a new Markdown file under the content/posts/ directory, then push to the main branch. GitHub Actions will build and deploy automatically.

3. Write or Upload a Markdown file


⚠️ Notice

Submodule Management

# ── Add / Update Submodule ──────────────────────────────────────
git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
git submodule update --init --recursive

# ── Delete Submodule ────────────────────────────────────────────
git submodule deinit -f themes/LoveIt
rm -rf .git/modules/themes/LoveIt
rm -rf themes/LoveIt
git config --remove-section submodule.themes/LoveIt
git config -f .gitmodules --remove-section submodule.themes/LoveIt
git rm --cached themes/LoveIt
git add . && git commit -m 'Update .gitmodules before removing submodule'

# ── View / Pull / Sync Submodule ────────────────────────────────
git submodule status
git submodule foreach git pull origin master
git submodule sync

Permission Issues

If you encounter the error:

remote: Permission to xxx denied to github-actions[bot].

Grant write permissions to github-actions[bot] in your repository:

Settings → Actions → General → Workflow permissions → Read and write permissions → Save


📄 License

MIT License

Releases

Packages

Contributors

Languages