Contributing

How to contribute to the project.

Thank you for your interest in contributing to Plugify! We welcome contributions from the community, whether it's improving the source code, enhancing the documentation, or fixing bugs. Below, you'll find guidelines on how to contribute effectively.

How to Contribute

To contribute to Plugify, please use GitHub's pull request functionality. If you're new to pull requests, you can learn more about them on the GitHub help page.

When creating a pull request, please:

  • Provide a clear description of the changes you made.
  • Explain the reason for the changes.
  • Reference any related issues or discussions.

Once submitted, we will review your pull request, discuss any necessary changes, and either merge or close it. If your contribution is successful, we’ll gladly add you to our credits page (if you wish).

Contributing to the Source Code

If you're contributing to the source code, please follow these steps:

  1. Test Your Changes: Ensure that your changes work as expected and do not introduce new issues.
  2. Follow Coding Conventions: Adhere to our coding style guidelines. We recommend using our Clang-Format and Clang-Tidy configurations to automatically format your code.

Coding Style

  • Use meaningful variable and function names.
  • Keep functions small and focused.
  • Add comments where necessary to explain complex logic.
  • Follow the existing code structure and patterns.

Contributing to the Documentation

Plugify's documentation is built using Shadcn-Docs, and the source files are located in the documentation repository. Documentation contributions are also submitted via pull requests.

Documentation Structure

  • Wiki Pages: Simple markdown files in the docs directory.
  • Source Code Documentation: Generated using Doxygen. Configuration files are located in the docs directory.

Doxygen Documentation

The source code is documented using Doxygen. Here’s an example of how to document a function:

/**
 * @file
 * @brief Brief description of the file.
 */

/**
 * @brief Brief description of the function.
 *
 * Detailed description of the function.
 */
void exampleFunction();

If you need to manually document specific parts of the code, you can extend or modify the Doxygen configuration file for the relevant module.

Building the Documentation Locally

Before submitting a pull request, you should test your changes by building the documentation locally. This ensures that the HTML output is correct and looks good.

Steps to Build Documentation

  1. Navigate to the build directory:
    cd build
    
  2. Configure the build with Doxygen enabled:
    cmake .. -DPLUGIFY_BUILD_DOCS=ON
    
  3. Build the documentation:
    cmake --build . --target docs
    
  4. View the documentation in your browser:
    your_favorite_browser docs/html/index.html
    

Automating the Build Process

To save time, you can create an alias in your shell configuration file (e.g., .bashrc or .zshrc):

alias docbuild='cd docs && doxygen Doxyfile'

Now, you can simply run docbuild in your terminal to generate the documentation.

CI/CD Pipeline

Once your pull request is merged, our CI/CD pipeline will automatically:

  1. Build the documentation.
  2. Update the wiki.
  3. Publish the changes.

This process typically takes 10-15 minutes.

Tips for Contributors

  • Communication: If you're unsure about something, feel free to ask questions in the Discord community or open an issue on GitHub.
  • Small Changes: Break large contributions into smaller, manageable pull requests.
  • Testing: Always test your changes thoroughly before submitting a pull request.

Thank You!

We appreciate your contributions and look forward to working with you to make Plugify even better. If you have any questions or need assistance, don’t hesitate to reach out!