Please do! Thanks for your help improving the project! 🎈
All contributors are welcome. Please see the newcomers welcome guide for how, where and why to contribute. This project is community-built and welcomes collaboration. Contributors are expected to adhere to our Code of Conduct.
Not sure where to start? First, see the newcomers welcome guide. Grab an open issue with the help-wanted label and jump in. Join the Slack account and engage in conversation. Create a new issue if needed. All pull requests should reference an open issue. Include keywords in your pull request descriptions, as well as commit messages, to automatically close issues in GitHub.
Sections
Relevant coding style guidelines are the Go Code Review Comments and the Formatting and style section of Peter Bourgon's Go: Best Practices for Production Environments.
In order to contribute to Meshery, please follow the fork-and-pull request workflow described here.
Make sure you have the following prerequisites installed on your operating system before you start contributing:
-
To verify run:
node -v
npm -v
-
To verify run:
go version
-
-
Install a recent release of the Hugo "extended" version. If you install from the Hugo release page, make sure you download the
extended
version, which supports SCSS.To verify run:
hugo version
-
Install
PostCSS
so that the site build can create the final CSS assets. You can install it locally by running the following commands from the root directory of your project:npm install --save-dev autoprefixer npm install --save-dev postcss-cli
Starting in version 8 of
postcss-cli
, you must also separately installpostcss
:npm install -D postcss
-
Note: If you're on a Windows environment then it is highly recommended that you install Windows Subsystem for Linux (WSL) both for performance and ease of use.
Follow the following instructions to start contributing.
1. Fork this repository.
2. Clone your forked copy of the project.
git clone --depth=1 https://github.com/<your-username>/docs.git
3. Navigate to the project directory.
cd docs
4. Add a reference(remote) to the original repository.
git remote add upstream https://github.com/layer5io/docs.git
5. Check the remotes for this repository.
git remote -v
6. Always take a pull from the upstream repository to your master branch to keep it at par with the main project (updated repository).
git pull upstream master
7. Create a new branch.
git checkout -b <your_branch_name>
8. Install the dependencies for running the site.
make setup
9. Make the desired changes.
10. Run the site locally to preview changes.
make site
This will run a local webserver with "live reload" conveniently enabled. ( NOTE: while using the make command on Windows, there sometimes arises an error in identifying the command even after it is installed (unrecognized command), this is because the PATH for the binary might not be set correctly ).
11. Track your changes.
git add .
12. Commit your changes. To contribute to this project, you must agree to the Developer Certificate of Origin (DCO) for each commit you make.
git commit --signoff -m "<commit subject>"
or you could go with the shorter format for the same, as shown below.
git commit -s -m "<commit subject>"
13. While you are working on your branch, other developers may update the master
branch with their branch. This action means your branch is now out of date with the master
branch and missing content. So to fetch the new changes, follow along:
git checkout master
git fetch origin master
git merge upstream/master
git push origin
Now you need to merge the master
branch into your branch. This can be done in the following way:
git checkout <your_branch_name>
git merge master
14. Push the committed changes in your feature branch to your remote repo.
git push -u origin <your_branch_name>
15. Once you’ve committed and pushed all of your changes to GitHub, go to the page for your fork on GitHub, select your development branch, and click the pull request button. Please ensure that you compare your feature branch to the desired branch of the repo you are supposed to make a PR to. If you need to make any adjustments to your pull request, just push the updates to GitHub. Your pull request will automatically track the changes in your development branch and update it.
To contribute to this project, you must agree to the Developer Certificate of Origin (DCO) for each commit you make. The DCO is a simple statement that you, as a contributor, have the legal right to make the contribution.
See the DCO file for the full text of what you must agree to and how it works here. To signify that you agree to the DCO for contributions, you simply add a line to each of your git commit messages:
Signed-off-by: Jane Smith <[email protected]>
In most cases, you can add this signoff to your commit automatically with the
-s
or --signoff
flag to git commit
. You must use your real name and a reachable email
address (sorry, no pseudonyms or anonymous contributions). An example of signing off on a commit:
$ commit -s -m “my commit message w/signoff”
To ensure all your commits are signed, you may choose to add this alias to your global .gitconfig
:
~/.gitconfig
[alias]
amend = commit -s --amend
cm = commit -s -m
commit = commit -s
Or you may configure your IDE, for example, Visual Studio Code to automatically sign-off commits for you:
Please contribute! Layer5 documentation uses Jekyll and GitHub Pages to host docs sites. Learn more about Layer5's documentation framework. The process of contributing follows this flow:
- Create a fork, if you have not already, by following the steps described here
- In the local copy of your fork, navigate to the docs folder.
cd docs
- Create and checkout a new branch to make changes within
git checkout -b <my-changes>
- Edit/add documentation.
vi <specific page>.md
- Run site locally to preview changes.
make site
- Commit, sign-off, and push changes to your remote branch.
git push origin <my-changes>
- Open a pull request (in your web browser) against the repo.
Users can now test their code on their local machine against the CI checks implemented using make run-tests
.
To test code changes on your local machine, run the following command:
make run-tests
To build a Docker image of the project, please ensure you have Docker
installed to be able to build the image. Now, run the following command to build and serve the files locally.:
Important
This requires Docker Desktop version 4.24 or later, or Docker Engine with Docker Compose version 2.22 or later.
make docker
Layer5 uses ES-Lint to maintain code quality & consistency in our UI Code.
All contributors are invited to review pull requests. See this short video on how to review a pull request.
Resources: https://lab.github.com and https://try.github.com/
This repository and site are available as open source under the terms of the Apache 2.0 License.
Community First
The Layer5 community champions developer-defined infrastructure, giving engineers the power to reshape application delivery. We empower operators in reimagining how they manage modern infrastructure: collaboratively.
Open Source First
Our projects establish industry standards and enable service developers, owners, and operators with repeatable patterns and best practices for managing all aspects of distributed services. Our shared commitment to the open source spirit push the Layer5 community and its projects forward.