This guide will walk you through setting up the Hiero website locally on your machine. No prior experience with Hugo is required!
Before you start, make sure you have these tools installed on your computer:
- Hugo - The static site generator that builds our website
- Node.js - JavaScript runtime (version 14 or higher recommended)
- npm - Node package manager (comes with Node.js)
- Git - Version control system
On Linux:
sudo snap install hugoOr download from the Hugo releases page.
On macOS:
brew install hugoOn Windows:
choco install hugo-extended -yOr use Scoop:
scoop install hugo-extendedVerify Hugo Installation:
hugo versionYou should see something like hugo v0.xxx.x.
Download and install from nodejs.org (LTS version recommended).
Verify Node.js Installation:
node --version
npm --versionYou should see version numbers for both.
Open your terminal and navigate to where you want to store the project, then clone the repository:
git clone https://github.com/hiero-ledger/hiero-website.git
cd hiero-websiteThe project uses Tailwind CSS and other Node.js packages. Install them by running:
npm installThis command reads the package.json file and installs all required dependencies. It may take a minute or two.
Now you're ready to start the development server! There are two ways to do this:
This method automatically handles Tailwind CSS compilation and starts Hugo:
npm run startIf you only want to run Hugo without watching for CSS changes:
hugo serverWhat Happens:
- Hugo builds your site
- Starts a local development server
- Watches for file changes
- Automatically rebuilds when you save changes
Expected Output:
Web Server is available at http://localhost:1313/
Press Ctrl+C to stop
Open your web browser and go to:
http://localhost:1313/
You should see the Hiero website running locally!
The magic of Hugo's development server is live reload. Here's how it works:
- Open a file in your code editor (e.g., a blog post in
content/posts/) - Make changes - edit text, add content, modify layouts
- Save the file (Ctrl+S or Cmd+S)
- Watch your browser - it automatically refreshes to show your changes!
No need to:
- Restart the server
- Manually refresh your browser
- Run build commands
If you're working on a blog post that has draft = true in its front matter, you need to tell Hugo to show drafts:
npm run startOr with Hugo directly:
hugo server --buildDraftsNow draft posts will be visible at http://localhost:1313/blog/.
When you're done working, stop the development server by pressing:
Ctrl + C
in your terminal.
After starting the server, navigate to:
http://localhost:1313/blog/your-post-name/
Hugo will show errors in your terminal if something goes wrong. Common issues:
- Syntax errors in front matter - Check your YAML/TOML formatting
- Missing files - Make sure linked images or files exist
- Port already in use - Another process is using port 1313
To use a different port:
hugo server --port 3000To create a production-ready build (minified and optimized):
npm run buildThis creates a public/ directory with all the static files ready for deployment.
Hugo isn't installed or not in your PATH. Reinstall Hugo and verify with hugo version.
Node.js/npm isn't installed. Download and install from nodejs.org.
- Make sure the development server is running
- Check the terminal for error messages
- Try a hard refresh in your browser (Ctrl+Shift+R or Cmd+Shift+R)
- If still not working, stop the server (Ctrl+C) and start it again
Another Hugo server might be running. Either:
- Find and stop the other process
- Use a different port:
hugo server --port 3000
Now that you have Hugo running locally, you can:
- Create a blog post: See Blog Creation Guide
- Understand the workflow: See Workflow Guide
- Make your first contribution: Check Open Issues
| Command | Description |
|---|---|
npm install |
Install all dependencies |
npm run start |
Start dev server with Tailwind CSS watching |
hugo server |
Start Hugo server only |
hugo server --buildDrafts |
Include draft content in preview |
npm run build |
Build for production |
hugo new posts/title.md |
Create a new blog post |
Need Help? Ask questions in our Discord server or open an issue on GitHub!