Hugo Themes
Seven
A clean and beautiful Hugo theme, which built using Tailwind CSS.
- Author: mrhelloboy
- GitHub Stars: 40
- Updated: 2024-05-22
- License: MIT
- Tags: Archive Blog Dark Mode Light Personal Responsive
A clean and beautiful Hugo theme, which built using Tailwind CSS.
English | 中文
Examples
→ Example Website
Prerequisites
Before starting to use this Hugo theme, please ensure the following requirements are met:
- Go is installed
- Ensure
Hugo >= v0.124.0
Quick Start
1. Clone this repository
git clone https://github.com/mrhelloboy/seven.git
2. Navigate to the exampleSite directory
cd exampleSite
3. Run the following commands
cd hugo-theme-seven-demo
hugo mod npm pack
npm install
hugo server
Starting from Scratch
1. Install Go and Hugo
2. Create a Site
hugo new site [sitename]
cd [sitename]
rm -rf themes
3. Initialize Hugo Modules
hugo mod init github.com/[username]/[sitename]
4. Import the Theme Module
Configure the theme in hugo.toml
[module]
[[module.imports]]
path = 'github.com/mrhelloboy/seven'
Because the theme requires additional configuration parameters, it’s recommended to use the configuration file provided in exampleSite first, and then modify it as needed.
For more information on Hugo Modules and their usage, please refer to Hugo Modules
5. Install Dependencies and Start
hugo mod npm pack
npm install
hugo server
Updating Theme Module
hugo mod clean
hugo mod get
hugo mod tidy
Updating package.json
First delete
package-lock.json
andpackage.json
.
hugo mod npm pack
npm install
Deployment
Please refer to the Hugo Deployment Documentation
Example of deploying to Netlify
:
Create a
netlify.toml
file in your site with the following content:[build.environment] HUGO_VERSION = "0.124.0" [build] publish = "public" command = "hugo --gc --minify" [context.deploy-preview] command = "hugo --minify -D -F -b $DEPLOY_PRIME_URL" [context.branch-deploy] command = "hugo --minify --gc -b $DEPLOY_PRIME_URL"
Register and log in to Netlify
Import your GitHub project, and Netlify will automatically build it based on the
netlify.toml
file.
Maintainers
@mrhelloboy
License
MIT © mrhelloboy.