Modern website for Rustun VPN project built with Hugo.
- 🌍 Multilingual - Support for English and Chinese with easy switching
- 📱 Responsive - Works seamlessly on desktop, tablet, and mobile
- ⚡ Fast - Static site generation for optimal performance
- 🎨 Modern Design - Clean, professional UI with smooth animations
- 🚀 Easy Deployment - Deploy to GitHub Pages, Netlify, Vercel, etc.
- Hugo Extended (v0.100.0 or higher)
macOS:
brew install hugoLinux:
# Download from https://github.com/gohugoio/hugo/releases
# Or use package manager
sudo apt-get install hugo # Debian/Ubuntu
sudo dnf install hugo # FedoraWindows:
choco install hugo-extended
# Or use scoop
scoop install hugo-extended# Start development server in smartethnet.github.io directory
hugo server -D
# The site will be available at http://localhost:1313
# Changes are reflected in real-time# Generate static files
hugo
# Output will be in the 'public' directoryA pre-built static version is available in the public/ directory after running hugo. You can serve it with any web server:
# Using Python
python3 -m http.server 8000 -d public
# Using Node.js
npx serve public
# Using PHP
php -S localhost:8000 -t publicsmartethnet.github.io/
├── hugo.toml # Hugo configuration
├── content/ # Content files
│ ├── en/ # English content
│ │ └── _index.md
│ └── zh/ # Chinese content
│ └── _index.md
├── themes/
│ └── rustun/ # Custom theme
│ ├── layouts/
│ │ └── index.html # Main layout
│ ├── static/
│ │ ├── css/
│ │ │ └── style.css # Styles
│ │ └── js/
│ │ └── main.js # JavaScript
│ └── theme.toml
└── public/ # Generated static files (after build)
Edit hugo.toml:
[params]
version = '0.0.1' # Update thisEdit hugo.toml:
[params]
github = 'https://github.com/smartethnet/rustun'Edit themes/rustun/layouts/index.html and search for download URLs to update release versions.
Edit themes/rustun/static/css/style.css and update CSS variables:
:root {
--primary-color: #ff6b35;
--secondary-color: #004e89;
/* ... other colors */
}-
Build the site:
hugo
-
Push the
publicdirectory togh-pagesbranch:cd public git init git add . git commit -m "Deploy website" git push -f git@github.com:smartethnet/rustun.git main:gh-pages
-
Enable GitHub Pages in repository settings, select
gh-pagesbranch.
- Connect your repository to Netlify
- Build command:
hugo - Publish directory:
public
- Import your repository in Vercel
- Framework preset: Hugo
- Build command:
hugo - Output directory:
public
Create .github/workflows/deploy.yml:
name: Deploy Hugo site to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build
run: hugo --minify
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2The site automatically detects browser language and displays the appropriate version:
/- Default (English)/zh/- Chinese version
Users can switch languages using the language switcher in the navigation.
- Size: ~50KB (HTML + CSS + JS combined)
- Load Time: <1s on fast connections
- Lighthouse Score: 95+ across all metrics
- Mobile Friendly: Fully responsive design
MIT License - see the main project repository for details.
For issues or questions, please visit: