Development Guide
Complete development guide for the LATTS Internal Documentation system, including local setup, Makefile commands, and contribution workflows.
Development Guide
This guide explains how to develop and deploy the LATTS Internal Documentation site using Hugo and Cloudflare Pages.
Quick Start
Prerequisites
- Hugo Extended v0.148.2 or later
- Node.js v20 or later
- Git with modules enabled
Local Development
Clone and Initialize:
git clone https://github.com/latts-ie/wiki-internal.git cd wiki-internal make install # Install all dependenciesStart Development Server:
make serve # Visit: http://localhost:1313
Available Make Commands
Our comprehensive Makefile provides all the automation you need:
| Command | Description | Use Case |
|---|---|---|
make help | Show all available commands | Getting started |
make status | Check project health and dependencies | Troubleshooting |
make install | Install Hugo modules and npm packages | Initial setup |
make build | Build site for production | Local testing |
make serve | Start development server | Content editing |
make test | Run comprehensive tests | Quality assurance |
make clean | Clean build artifacts | Troubleshooting |
make deploy-cf | Deploy to Cloudflare Pages | Production deployment |
make lint | Run linting checks | Code quality |
Example Development Workflow
# Daily development workflow
make status # Check everything is ready
make serve # Start editing content
# ... make changes ...
make test # Validate changes work
git add . && git commit -m "Update documentation"
git push # Triggers automatic deployment
CI/CD Pipeline
The repository uses a comprehensive GitHub Actions workflow in .github/workflows/deploy.yml:
Pipeline Jobs
🧪 Quality Checks
- Hugo configuration validation
- Markdown linting (optional)
- Link checking (optional)
🔨 Build & Test
- Install dependencies (Hugo modules + npm)
- Build site with optimizations
- Validate generated HTML
- Check LATTS branding presence
🚀 Deploy
- Deploy to Cloudflare Pages
- Update preview URLs in PR comments
- Performance monitoring
Deployment Speed: Changes go live in ~2-3 minutes after merge.
Modern Hugo Setup
This project uses Hugo Modules (not git submodules) for modern dependency management:
Key Features
- Hugo Modules: Modern dependency management
- PostCSS Processing: Optimized CSS with autoprefixer
- Git Integration: Direct edit links on every page
- Offline Search: Fast client-side search indexing
- Responsive Design: Mobile-first, accessible interface
Technology Stack
| Component | Technology | Version |
|---|---|---|
| Static Site Generator | Hugo Extended | v0.148.2+ |
| Theme Framework | Google Docsy | v0.12.0 |
| Module System | Hugo Modules | Latest |
| Styling | PostCSS + Bootstrap | Latest |
| Search | Lunr.js | Latest |
Content Management
Adding New Content
Create New Page:
hugo new docs/section/new-page.mdEdit Front Matter:
--- title: "Page Title" linkTitle: "Short Title" weight: 10 description: "Page description" ---Test Locally:
make serve
Content Guidelines
- Clarity: Use simple, direct language
- Structure: Follow existing page templates and organization
- Accuracy: Test all commands and procedures
- Completeness: Include troubleshooting and “next steps”
- Screenshots: Add visual guides for UI-based processes
Performance Optimization
Build Performance
- Build Time: < 3 seconds for full site rebuild
- Dependencies: Cached Hugo modules and npm packages
- Incremental Builds: Only changed content rebuilds locally
Runtime Performance
- Page Load: < 1 second globally via Cloudflare CDN
- First Contentful Paint: < 0.8 seconds average
- Lighthouse Score: 95+ (Performance, Accessibility, SEO)
- Mobile Optimized: Responsive design with touch-friendly navigation
Caching Strategy
HTML pages: 1 hour (frequent updates)
CSS/JS assets: 1 year (content-hashed filenames)
Images: 1 year (automatic WebP conversion)
Font files: 1 year (WOFF2 with font-display: swap)
Troubleshooting
Common Issues
Build Fails - Missing Dependencies:
make clean # Clear build artifacts
make install # Reinstall dependencies
make status # Verify Hugo Extended is installed
Deployment Failing:
# Check GitHub repository secrets are configured:
# - CLOUDFLARE_API_TOKEN
# - CLOUDFLARE_ACCOUNT_ID
Content Not Updating:
# Verify local development
make serve # Check content appears locally
make test # Ensure no validation errors
Debug Commands
make status # Complete health check
hugo config # Verify Hugo configuration
hugo server --debug # Detailed development server logs
Getting Help
- Quick Issues: Check
make statusfor common problems - Build Problems: Review GitHub Actions logs in repository
- Content Questions: Create issue with
documentationlabel - Technical Support: Contact LATTS development team
Contributing
Content Contribution Workflow
- Find what to improve: Browse documentation or check GitHub issues
- Edit content: Use “Edit this page” links or clone repository
- Preview changes: Run
make serveto test locally - Submit PR: Create pull request with clear description
- Team review: Automated testing + peer review process
- Auto-deploy: Approved changes go live automatically
Development Guidelines
- Test locally: Always run
make testbefore submitting - Follow standards: Check existing content patterns
- Documentation: Update README for new features or changes
- Performance: Optimize images and minimize dependencies
All contributions are reviewed for:
- Content accuracy and clarity
- Proper Hugo formatting
- Mobile responsiveness
- Link validation
- Security best practices