Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Report errors on the `issues page`. If you are reporting an issue, please include:
* Question for which issue came
* Language in which the code is not working
All the solutions available in the website at time of their creation are correct.
But questions' language might change later and their solution might need to be updated/corrected.
Look through the GitHub issues for some wrong solutions. Anything tagged with "bug"
is open to whoever wants to implement it.
At the time of writing, Google foobar only supported Java and Python. If any new language is added in near future, you can add the solution in that language as well.
Remember to update codetab.html as well
You can add any foobar question you faced. Check [Sample](_drafts/sample.md) on how to add a foobar question with its solutions
Ready to contribute? Here's how to set up foobar
for local.
- Fork the
foobar
repo on GitHub. - Clone your fork locally::
$ git clone git@github.com:rajat19/foobar.git
- Create a branch for local development::
$ git checkout -b name-of-your-bugfix-or-feature
- Commit your changes, quoting github issue in the commit message, if applicable and push your branch to GitHub::
$ git add .
$ git commit -m "Fix #XX - My awesome fix"
$ git push origin name-of-your-bugfix-or-feature
- Submit a pull request through the GitHub website.
Some things to keep in mind while adding questions/solutions-
- Questions are added in
markdown
files which have .md extensions. These are added in_posts
folder - Add a question post inside
_posts
folder starting with current date then question name. For ex-2021-01-01-foobar-got-interesting.md
- You are not necessarily required to add solutions for the foobar question you put. Do not add below line to your post if you do not wish to add any solution
{% include codetab.html btnClass="solution" langs="java py"%}
- The solutions are added in
_includes/code
folder. Add a folder with question name ex-foobar-got-interesting
. Add your solutions in this folder only. - By default, the website requires java and python solutions, if you wish to add only one of them, or just know solution in only one of the language, use
langs="java"
orlangs="py"
while using the line
{% include codetab.html btnClass="solution" langs="java py"%}
- If you have got working solutions in both python/java, don't include the langs part
{% include codetab.html btnClass="solution"%}