This document provides guidance for GitHub Copilot agents and Large Language Models (LLMs) contributing to the Layer5 Academy content repository at https://github.com/layer5io/layer5-academy. These guidelines ensure consistency, quality, and alignment with the project's educational mission.
Layer5 Academy is the official content repository for Layer5's learning platform, hosting all official learning paths, challenges, and certifications. It serves as the primary source of educational content for engineers learning about cloud native infrastructure, service meshes, Kubernetes, and related technologies.
Key Characteristics:
- Role: Content repository for Layer5 Academy learning platform
- Primary Technology: Hugo static site generator (extended version 0.146.0+)
- Content Focus: Educational materials including learning paths, challenges, certifications, and hands-on labs
- Integration: Works in combination with:
- academy-theme - provides layouts, styles, and components
- academy-build - central build and deployment pipeline
- academy-example - starter template for organizations
Technology Stack:
- Hugo (extended version 0.146.0 or later)
- Go modules (for theme management)
- Node.js & npm (for build tools)
- Markdown/MDX for content
- PostCSS for styling
- Go (version 1.24.5 or later) - Required for Hugo modules
- Hugo Extended (version 0.146.0 or later) - Core static site generator
- Node.js and npm - For build tools and dependencies
- Git - For version control
# Clean up and verify Go module dependencies
go mod tidy
# Install necessary tools and npm packages
make setup
# Start the local Hugo development server
make siteThe local development server will be available at
http://localhost:1313/academy. Note that the local preview uses only the
academy-theme. In production, content is wrapped by the Layer5 Cloud UI, so
minor visual differences may occur.
# Build site for production
make build
# Build site for local consumption with custom base URL
make build-preview
# Clean cache and restart development server
make clean
# Fix Markdown linting issues
make lint-fix
# Update academy-theme to latest version
make theme-updatelayer5-academy/
├── content/ # All learning content (Markdown/MDX)
│ ├── _index.md # Homepage content
│ ├── certifications/ # Certification tracks
│ ├── challenges/ # Hands-on challenges
│ └── learning-paths/ # Structured learning paths
├── layouts/ # Hugo layout overrides (if any)
├── static/ # Static assets (images, videos, documents)
├── .github/ # GitHub workflows and configuration
│ ├── workflows/ # CI/CD pipelines
│ └── build/ # Build scripts
├── hugo.yaml # Hugo site configuration
├── go.mod # Go module dependencies (includes academy-theme)
├── package.json # npm dependencies
├── Makefile # Commands for local development & build
└── CONTRIBUTING.md # Contribution guidelinesContent is specifically tailored for:
- Platform engineers
- DevOps engineers
- Site Reliability Engineers (SREs)
- IT administrators
- Kubernetes operators
- Cloud native developers
- Open source contributors
- Solution architects
- Enterprise architects
Layer5 Academy supports several educational content types:
- Learning Paths (
/content/learning-paths/) - Structured sequences of educational modules covering comprehensive topics - Challenges (
/content/challenges/) - Hands-on practice exercises and real-world scenarios - Certifications (
/content/certifications/) - Formal credential tracks with assessments - Labs - Interactive, hands-on exercises embedded within learning paths
- Modules - Individual units within learning paths
- Format: All content must be written in Markdown following Hugo conventions
- Frontmatter: Every content file requires proper YAML frontmatter
- Tone: Professional yet approachable, clear and concise
- Style: Follow technical writing best practices
- Audience Level: Adapt complexity to target audience (beginners, intermediate, advanced)
---
title: "Getting Started with Service Meshes"
description: "Learn the fundamentals of service mesh architecture and implementation"
date: 2025-01-15
author: "Layer5 Community"
draft: false
weight: 1
tags:
- service-mesh
- kubernetes
- microservices
categories:
- fundamentals
---- Accuracy: Ensure all technical information is current and correct
- Clarity: Use clear explanations with examples
- Practical Focus: Include hands-on exercises and real-world applications
- Progressive Complexity: Build concepts incrementally
- Visual Aids: Use diagrams, screenshots, and code samples where appropriate
- Cross-References: Link to related content within the Academy
- External Resources: Reference official documentation when appropriate
- Code Examples: Test all code snippets for accuracy
- Consistency: Follow established terminology and conventions
- Explore First: Review existing content to understand structure and style
- Follow Patterns: Maintain consistency with existing learning paths and challenges
- Test Locally: Always preview changes using
make sitebefore committing - Small Changes: Make focused, minimal modifications
- Proper Structure: Ensure content follows Hugo's directory structure
- Frontmatter Validation: Verify all required frontmatter fields are present
# 1. Navigate to content directory
cd content/
# 2. Create or edit content files
vi learning-paths/service-mesh-fundamentals/_index.md
# 3. Start local development server to preview
make site
# 4. Verify changes at http://localhost:1313/academy
# 5. Fix any linting issues
make lint-fix
# 6. Commit changes with descriptive message
git commit -s -m "docs: add service mesh fundamentals learning path"- Images: Place in
/static/images/with descriptive names - Documents: Place in
/static/assets/for downloadable content - Videos: Host externally (YouTube, Vimeo) and embed using Hugo shortcodes
- File Naming: Use lowercase with hyphens (e.g.,
service-mesh-diagram.png) - Size Optimization: Compress images and assets before committing
The academy-theme provides custom shortcodes for enhanced content. Reference the academy-theme documentation for available shortcodes.
The academy-theme is included as a Go module and provides:
- Layout templates and partials
- Styling and design system components
- Custom Hugo shortcodes
- Interactive elements
Local Development with Theme:
When developing both the content and theme simultaneously:
// In go.mod, add a replace directive:
replace github.com/layer5io/academy-theme => ../academy-themeThe academy-build pipeline:
- Aggregates content from multiple repositories
- Applies the academy-theme
- Generates the complete Academy site
- Deploys to Layer5 Cloud
Publishing: Merged changes to the master branch are automatically
integrated into the central academy-build pipeline and deployed to the Academy
platform.
Use academy-example as a reference for:
- Creating organization-specific content repositories
- Following Academy content standards
- Understanding best practices
- Content Rendering: Verify all content renders correctly
- Links: Test all internal and external links
- Images: Ensure all images load and display properly
- Code Samples: Validate code snippets are syntactically correct
- Navigation: Check menu structure and breadcrumbs
- Responsive Design: Preview on different screen sizes
- Build Success: Ensure
make buildcompletes without errors
# Fix common Markdown issues automatically
make lint-fixThis uses markdownlint-cli2 to enforce consistent Markdown formatting.
- Content renders correctly in local preview
- All links are valid and working
- Images are optimized and load properly
- Frontmatter is complete and valid
- Code examples are tested and accurate
- Markdown linting passes
- Build completes successfully
- Commit is signed-off (DCO)
All commits must be signed-off to indicate agreement with the Developer Certificate of Origin:
# Sign-off on a commit
git commit -s -m "docs: add new learning path"
# Configure Git to automatically sign-off
git config --global alias.commit "commit -s"- Fork Repository: Create a personal fork of layer5-academy
- Create Branch: Use descriptive branch names (e.g.,
feature/docker-learning-path) - Make Changes: Edit content following guidelines in this document
- Test Locally: Preview changes using
make site - Commit Changes: Use conventional commit messages with sign-off
- Push Branch: Push to your fork
- Open PR: Submit pull request against the
masterbranch - Address Review: Respond to feedback and make necessary changes
Follow the Conventional Commits format:
<type>(<scope>): <subject>
<body>
<footer>
Types:
docs- Documentation/content changesfeat- New features or contentfix- Bug fixes or correctionschore- Maintenance tasksrefactor- Content reorganization
Examples:
git commit -s -m "docs: add Kubernetes networking learning path"
git commit -s -m "fix: correct code example in service mesh challenge"
git commit -s -m "feat: add advanced certification track"-
Create directory structure:
mkdir -p content/learning-paths/my-topic
-
Create
_index.mdwith proper frontmatter:--- title: "My Topic Learning Path" description: "Comprehensive guide to learning my topic" date: 2025-01-15 weight: 10 draft: false ---
-
Add modules as subdirectories with their own content files
-
Include hands-on labs and exercises
-
Test thoroughly using
make site
- Create challenge file in
/content/challenges/ - Include clear objectives and success criteria
- Provide starter code or templates if applicable
- Add detailed instructions and hints
- Test the challenge steps manually
- Review current content for context
- Make minimal, focused changes
- Preserve existing structure and style
- Update dates and version references
- Test all affected links and references
# Add image to static directory
cp image.png static/images/learning-paths/my-topic/
# Reference in Markdown
- Follow Existing Patterns: Maintain consistency with current content structure
- Test Everything: Always preview changes locally before committing
- Be Specific: Use clear, precise technical language
- Add Value: Ensure content provides practical, actionable information
- Cross-Link: Connect related content within the Academy
- Stay Current: Use up-to-date tools, versions, and best practices
- Be Inclusive: Use welcoming, inclusive language
- Respect DCO: Always sign-off on commits
- Don't Break Structure: Maintain Hugo's directory conventions
- Don't Skip Testing: Never commit untested content
- Don't Use Placeholders: Provide complete, ready-to-use content
- Don't Include Secrets: Never commit credentials or API keys
- Don't Modify
.gitignorefor build artifacts (node_modules/,public/,resources/) - Don't Make Breaking Changes: Avoid changes that affect academy-build integration
- Don't Copy Content: Ensure all content is original or properly attributed
- Don't Skip Sign-Off: All commits must include DCO sign-off
- All content changes require review by maintainers
- Address all feedback constructively
- Make requested changes promptly
- Keep PRs focused and manageable in size
- Reference related issues in PR descriptions
- Use closing keywords (e.g., "Fixes #123", "Closes #456")
- Provide context and rationale in issue comments
- Label issues appropriately
- Engage respectfully with the community
- Ask questions in the Layer5 Community Slack
- Participate in the Layer5 Discussion Forum
- Follow the Code of Conduct
- Academy Documentation: https://docs.layer5.io/cloud/academy
- Content Creation Guide: https://docs.layer5.io/cloud/academy/creating-content
- Platform Development: https://docs.layer5.io/cloud/academy/platform-development
- academy-theme: https://github.com/layer5io/academy-theme
- academy-example: https://github.com/layer5io/academy-example
- academy-build: https://github.com/layer5io/academy-build
- Hugo Documentation: https://gohugo.io/documentation/
- Go Modules: https://go.dev/doc/modules/
- Markdown Guide: https://www.markdownguide.org/
- Community Slack: https://slack.layer5.io
- Discussion Forum: https://discuss.layer5.io
- Newcomers Guide: https://layer5.io/community/newcomers
- Contributing Guide: CONTRIBUTING.md
- Email: security-vulns-reports@layer5.io
- Policy: See SECURITY.md for full security policy
- Confidentiality: Report security issues privately, not in public issues
- Never commit secrets, credentials, or API keys
- Validate all external links for safety
- Review code examples for security best practices
- Keep dependencies up to date
Build Errors:
# Clear Hugo cache
hugo --cleanDestinationDir
# Verify Go modules
go mod tidy
# Reinstall npm packages
rm -rf node_modules package-lock.json
npm installTheme Issues:
# Update theme to latest version
make theme-update
# Or manually
hugo mod get -u github.com/layer5io/academy-themeLinting Errors:
# Auto-fix Markdown issues
make lint-fixPreview Not Working:
- Ensure Hugo extended is installed (not standard Hugo)
- Check that ports 1313 is not in use
- Verify Go and Node.js are properly installed
- Review hugo.yaml for syntax errors
- GitHub Issues: https://github.com/layer5io/layer5-academy/issues
- Community Slack: Join #academy channel
- Documentation: Reference official Academy docs
- PR Reviews: Ask for clarification on review feedback
The repository uses automated workflows for:
- Build and Release (
build-and-release.yml) - Automated builds and releases - Static Site Deployment (
static.yml) - GitHub Pages deployment - Label Management (
labeler.yml,label-commenter.yml) - Automatic PR labeling - Slack Notifications (
slack.yml) - Community notifications - Release Drafting (
release-drafter.yml) - Automated release notes
Important: Ensure your changes don't break CI/CD workflows. Test builds locally before committing.
- Understand First: Read existing content and documentation before making changes
- Test Locally: Always preview changes using
make site - Make Minimal Changes: Focus on specific objectives, avoid scope creep
- Follow Conventions: Maintain consistency with existing patterns
- Document Context: Provide clear commit messages and PR descriptions
- Engage Community: Ask questions and seek feedback when needed
- Sign Off Commits: Always include DCO sign-off
- Respect Security: Never commit sensitive information
- Stay Updated: Keep dependencies and content current
- Be Patient: Code review and feedback are part of the quality process
This repository and content are available as open source under the terms of the Apache 2.0 License.
Layer5 represents the largest collection of service mesh projects and their maintainers in the world. We champion developer-defined infrastructure, giving engineers the power to reshape application delivery and empowering operators to reimagine how they manage modern infrastructure collaboratively.
For more information, visit https://layer5.io or join our community at https://slack.layer5.io.