A clean and beautiful Hugo theme, which built using Tailwind CSS.
English | 中文
Before using this Hugo theme, ensure that you meet the following requirements:
- Install Go. Refer to the documentation on Hugo Modules Prerequisite.
- Ensure that your Hugo version is v0.112.0 or later. Refer to the documentation for configure-cache-busters.
-
Clone the example code.
git clone https://github.com/mrhelloboy/hugo-theme-seven-demo.git
-
Execute the commands:
cd hugo-theme-seven-demo hugo mod npm pack npm install hugo server
-
Install Go and Hugo.
-
Create a new site.
hugo new site [sitename] cd [sitename] # Remove the themes directory in the site rm -rf themes
-
Initialize Hugo module.
hugo mod init github.com/[username]/[sitename]
-
Import the theme module.
In the
hugo.toml
file, configure the theme:[module] [[module.imports]] path = 'github.com/mrhelloboy/seven'
As the theme requires additional configuration parameters, to avoid errors, it's recommended to first use the example's hugo.toml and then customize as needed.
Note: If using the example
hugo.toml
, comment outcustomSocial = "extra_social.html"
to prevent an error during startup.For more information about Hugo modules and their usage, please refer to Hugo Modules.
-
Install dependencies and start the server.
hugo mod npm pack npm install hugo server
hugo mod clean
hugo mod get
hugo mod tidy
First delete
package-lock.json
andpackage.json
.
hugo mod npm pack
npm install
Refer to the Hugo Deployment Documentation for details.
-
Copy the example's
netlify.toml
to your own site and push the changes to GitHub. -
Register and log in to Netlify.
-
Import your GitHub project; Netlify will automatically build based on the
netlify.toml
file.