Hi-Frameworks docs sources are available in a Github Repository and right now we need all the help we can get improving them to make everyones life better.
But how do you contribute?
Steps to contribute
Preparing
- Download and install git
- Download and install latest maven.
- Fork repository Hi-Framework-docs on GitHub
- Clone the fork repository
- Configure the git upstream
Modifying the docs
- Run the docs locally
- Edit the docs sources
Sharing your contribution
- Pull changes from the upstream
- Push to the fork repository
- Submit a pull request
Now that you know all the steps you will have to go through, it's time to go.
Preparing
Install git
The sources are stored in a git repository. We need to install git in order to be able to manage the docs source-code. Make sure you can type-in git on a command line and run it without having errors, right after installation.
Install maven
The documentation engine is a maven plugin, meaning we must install maven in order to run the docs. Minimum supported version is 3.3.9.
Make sure you can type-in mvn on a command line and run it without having errors, right after installation.
Fork the docs repository
This is when you copy the Hi-Framework-docs repository to your own GitHub account:
After clicking on Fork, A repository named Hi-Framework-docs will be created under your account. The next step is to clone that repository.
Clone your fork repository
This is when you download a copy of your Hi-Framework-docs repository to your computer.
#
cd /path/to/place/docs/sources/
# WARNING
# Provide the correct value for the <your-username> token
git clone https://github.com/<your-username>/Hi-Framework-docs.git
Configure git upstream
What if we make changes to the original repository?
How do you fetch the changes we made into your own copy of the Hi-Framework-docs? Thats the purpose of the upstream.
# upstream references the original Hi-Framework-docs repo
git remote add upstream https://github.com/Emerjoin/Hi-Framework-docs.git
Modifying the docs
There is one thing you should know by now: Each Hi-Framework is documented in a correspondent git branch. For example, the documentation of the 1.0.0 version can be found under the 1.0.0 git branch.
Lets proceed then.
Run the docs locally
There is no fun typing code that you don't get the chance to test. You will want to render the docs as you modify them and thats exactly what this section is about.
You need to pick a Hi-Framework version to document. We will assume you want to document the 1.0.0 version.
cd Hi-Framework-docs
# checkout the correspondent git branch
git checkout 1.0.0
You now need to decide what exactly you want to hack. There two sub-directories under your Hi-Framework-docs directory, which are: tutorials, getting-started.
Each of the sub-directories of the Hi-Framework-docs directory corresponds to a documentation project.
|-- Hi-Framework-docs
|-- tutorials
|-- getting-started
Lets say you want to hack the tutorials project:
# enter the tutorials project
cd tutorials
# run the project
mvn arqiva:run
The terminal will present you a URL to browse. Just copy it and paste it in a browser of your preference
and you will be displaying the docs running on your machine.
If you decide to hack the getting-started instead, feel free. The same procedure applies.
Edit the docs sources
Both sub-directories: getting-started and tutorials have a sub-directory named docs-project.
|-- Hi-Framework-docs
|-- tutorials
|-- docs-project *
|-- pom.xml
|-- arqiva.properties
|-- getting-started
|-- docs-project *
|-- pom.xml
|-- arqiva.properties
Thats the directory you will be working on. It contains the documentation template and the topics written in markdown. Feel free to play around. We rely on your curiosity to understand certain things we wont be explaining here.
.
What happens when you are done hacking? It's time to share you contributions.
Sharing your contribution
This is when you decide to push your local changes away .
Pull changes from the upstream
The first thing to do is to fetch the changes that were made to the original Hi-Framework-docs.
# fetch changes from upstream
git fetch upstream
Once you have fetched the changes, its time to merge them to your local changes.
# we assume you are working on the 1.0.0 version
git merge upstream/1.0.0
The next step is to make sure your changes are stored in your remote GitHub repository:
https://github.com/<your-username>/Hi-Framework-docs.git
Push to your fork repository
Lets cut to the chase :
# again we assume you are working on 1.0.0 docs
git push origin 1.0.0
Your changes will be pushed to your GitHub repo and the only thing missing will be: you kindly
asking us to pull the changes from your repository. That is done via a pull-request.
Submit a pull request
Thanks to the well designed UI of GitHub, it's super-easy to submit a pull-request
You are now good to go. Hack, hack and hack again. Help us spread the word and get as many contributors as possible, even if they are just going to help with spelling. 