Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lopins/hugo-template
Template of Hugo, with CI/CD by GitHub Actions.
https://github.com/lopins/hugo-template
blog-engine blog-template github-actions github-pages hugo hugo-template static-site-generator
Last synced: 7 days ago
JSON representation
Template of Hugo, with CI/CD by GitHub Actions.
- Host: GitHub
- URL: https://github.com/lopins/hugo-template
- Owner: lopins
- License: mit
- Created: 2024-10-06T13:35:16.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T15:49:13.000Z (about 2 months ago)
- Last Synced: 2024-10-29T16:13:02.696Z (about 2 months ago)
- Topics: blog-engine, blog-template, github-actions, github-pages, hugo, hugo-template, static-site-generator
- Language: HTML
- Homepage: https://www.wooooden.com
- Size: 71.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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` or `config.toml` to your site's URL
```yml
baseURL: "https://lopins.github.io/hugo-template"
```### [Configure Theme](https://github.com/lopins/hugo-template/issues/2)
1. pull theme into `themes/` and update it.
`git submodule add [email protected]:zhaohuabing/hugo-theme-cleanwhite.git themes/cleanwhite && git submodule update --init --recursive`
`cp -r exampleSite/* ../`
2. In `config.yml` or `config.toml`, change the value of the `theme` property to "cleanwhite"
~~3. update `editPost: "https://github.com/lopins/hugo-template/tree/main/content"` in `config.yml` or `config.toml`~~
### Push to Github
`git add . && git commit -m ':wrench:docs(themes): Add or update configuration files' && git push origin main`
### [Publish Article](https://github.com/lopins/hugo-template/issues/1)
1. Install
Click "Use this template" -> "Create a new repository"
![1. Create a new repository](https://github.com/user-attachments/assets/1046f118-8c2a-4ed8-bc8b-1258941455c4)
2. Set up
Set up and enable GitHub Pages service
![2. Set up GitHub Pages branch](https://github.com/user-attachments/assets/acd90bfd-0a25-4809-a39b-fc5d562f414b)
3. Publish
Publish an article on the "hugo branch" of Github.
![3. Write or Upload an Markdown file](https://github.com/user-attachments/assets/2b1a97ea-ac79-4647-a340-f71569699c11)
## Notice
### **Submodule** to Change Theme
```
# Add Submodule - Upadte Submodule
git submodule add [email protected]:zhaohuabing/hugo-theme-cleanwhite.git themes/cleanwhite
git submodule update --init --recursive# Delete Submodule
git submodule deinit -f themes/cleanwhite
rm -rf .git/modules/themes/cleanwhite
rm -rf themes/cleanwhite
git config --remove-section submodule.themes/cleanwhite
git config -f .gitmodules --remove-section submodule.themes/cleanwhite
git rm --cached themes/cleanwhite
git add . && git commit -m 'Update .gitmodules before removing submodule'# 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](LICENSE).