δΈζ | English
- π Dashboard: Overview of blog statistics and quick actions
- π Post Management: Browse, search, and filter posts by category and tags
- βοΈ Markdown Editor: Online editing with auto-save and keyboard shortcuts
- π Hugo Server Control: Start/stop Hugo dev server with real-time logs
- π Advanced Search: Full-text search with category and tag filtering
- β‘ Real-time Updates: WebSocket-based live log streaming
- πΎ Cache System: SQLite-based caching for fast post retrieval
- π Password Login: Single-admin authentication gates every API and the realtime channel
- π Plugin System: Extend hugo-admin with gRPC-based plugins β see the plugin system design and
proto/plugin.proto
- Backend: Flask + Flask-SocketIO
- Frontend: Tailwind CSS + Alpine.js
- Real-time Communication: WebSocket (Socket.IO)
- Process Management: psutil
- Database: SQLite (for caching)
Pull the image from GHCR and run with Docker Compose:
# Clone the repository
git clone https://github.com/Svtter/hugo-admin.git
cd hugo-admin
# Start the service
docker compose up -dOpen your browser and navigate to http://127.0.0.1:5050.
See docker-compose.yml for volume mounts and environment variables. Adjust the volume paths to match your Hugo site layout.
- Python 3.9+
- Hugo (installed and in PATH)
- Clone the repository:
git clone https://github.com/Svtter/hugo-admin.git
cd hugo-admin- Install dependencies:
pip install .- Configure the application:
cp config.py config_local.py
# Edit config_local.py to set your Hugo root directory- Run the application:
python app.py- Open your browser and navigate to
http://127.0.0.1:5050
Edit config.py or create config_local.py to customize:
# Hugo root directory (parent of content/)
HUGO_ROOT = '/path/to/your/hugo/site'
# Content directory
CONTENT_DIR = HUGO_ROOT + '/content'
# Hugo server settings
HUGO_SERVER_PORT = 1313
HUGO_SERVER_HOST = '127.0.0.1'- View blog statistics (post count, tags, categories)
- Check Hugo server status
- Quick access to common operations
- Recent posts overview
- Browse all posts with pagination
- Search posts by title, content, tags, or categories
- Filter by specific category or tag
- Click any post to edit
- Edit Markdown files with syntax highlighting
- Auto-save on changes
- Keyboard shortcut:
Ctrl+S/Cmd+Sto save - Real-time save status indicator
- Start Hugo server (with or without drafts)
- Stop running server
- View server status (PID, uptime, CPU, memory)
- Real-time log streaming
# Install dev dependencies
pip install -r requirements-dev.txt
# Run all tests
pytest
# Run with coverage
pytest --cov=. --cov-report=htmlhugo-admin/
βββ app.py # Flask application
βββ config.py # Configuration
βββ pyproject.toml # Dependencies and project metadata
βββ Dockerfile # Docker image build
βββ docker-compose.yml # Docker Compose configuration
βββ pytest.ini # Pytest configuration
βββ services/ # Business logic
βββ routes/ # Flask Blueprints (API routes)
βββ frontend/ # React + Vite SPA
βββ tests/ # Test suite
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Login required: every
/api/*endpoint and the SocketIO realtime channel are gated behind a password-authenticated session; unauthenticated requests get401. - On first start a default
admin/adminaccount is created β setADMIN_USERNAME/ADMIN_PASSWORD(or change the password in-app) before exposing the service. - Passwords are stored only as salted hashes (
werkzeug.security); credentials live indata/auth.jsonand are never committed. A corrupt/unreadable credential file fails closed (startup aborts) rather than silently resetting the admin. - File operations are restricted to the
contentdirectory, with path-traversal protection. - Set a strong
SECRET_KEYin production and keep the service on a trusted network or behind a reverse proxy.
- Basic framework
- Hugo server control
- Post browsing and search
- Markdown editor
- Markdown preview
- SQLite caching system
- Test suite with CI/CD
- Image upload and management
- Docker support
- Git operations interface
- Password-based admin login
- Batch operations
- Multi-user support
Full documentation (deployment, usage, development, changelog) is available at:
https://sun-praise.github.io/hugo-admin/
Topics include:
- Docker deployment
- Quick start
- Cache system
- GitHub setup
- Frontmatter refactor
- Plugin system β gRPC-based plugin architecture, capabilities, and how to write your own
Built with MkDocs Material; source lives in docs/, auto-deployed via .github/workflows/pages.yml.
Apache License 2.0 - see LICENSE file for details
Built with β€οΈ for the Hugo community.
