Skip to content

Contributing to Hugo Admin

Thank you for considering contributing to Hugo Admin! We welcome contributions from the community.

How to Contribute

Reporting Bugs

If you find a bug, please create an issue on GitHub with: - A clear description of the bug - Steps to reproduce - Expected behavior - Actual behavior - Your environment (OS, Python version, Hugo version)

Suggesting Features

We'd love to hear your ideas! Please create an issue with: - A clear description of the feature - Use cases - Why it would be valuable

Pull Requests

  1. Fork the repository and create your branch from main

    git checkout -b feature/my-new-feature
    

  2. Make your changes

  3. Follow the existing code style
  4. Add tests if applicable
  5. Update documentation as needed

  6. Test your changes

    # Run tests
    pytest
    
    # Run with coverage
    pytest --cov=. --cov-report=html
    

  7. Commit your changes

  8. Use clear commit messages
  9. Reference any related issues

  10. Push to your fork

    git push origin feature/my-new-feature
    

  11. Create a Pull Request

  12. Provide a clear description of the changes
  13. Link to any related issues
  14. Wait for review

Development Setup

  1. Clone your fork:

    git clone https://github.com/YOUR_USERNAME/hugo-admin.git
    cd hugo-admin
    

  2. Create a virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    

  3. Install dependencies:

    pip install -r requirements-dev.txt
    

  4. Configure for development:

    cp config.py config_local.py
    # Edit config_local.py with your Hugo site path
    

Code Style

  • Follow PEP 8 for Python code
  • Use meaningful variable and function names
  • Add docstrings to functions and classes
  • Keep functions focused and small
  • Write clear comments for complex logic

Testing

  • Write tests for new features
  • Ensure all tests pass before submitting PR
  • Aim for good test coverage
  • Test both success and error cases

Documentation

  • Update README.md if adding new features
  • Add docstrings to new functions/classes
  • Update CHANGELOG.md for significant changes
  • Keep documentation clear and concise

Code of Conduct

  • Be respectful and inclusive
  • Welcome newcomers
  • Give constructive feedback
  • Focus on the code, not the person

Questions?

Feel free to open an issue for any questions or concerns!

License

By contributing, you agree that your contributions will be licensed under the Apache License 2.0.