This repository contains the source code for WSO2 Ballerina Integrator documentation.
This repository is open and we welcome your contributions!
Follow the below topics to learn more:
As an open-source project, WSO2 Ballerina Integrator documentation welcomes contributions from the community. Before you contribute, read the following guidelines to understand how you can contribute:
Follow the steps below if you need to perform a minor modification (For example: changing a term, fixing a link, adding another bullet point, etc.):
- Go to the page you want to edit.
- Click the edit (pen) icon in the top right corner.
- Edit the
.md
file. - Add a commit message and commit. This will open a Pull Request (PR).
- Fill in the relevant details and submit the PR.
- Get the PR reviewed and merged by a maintainer.
Follow the steps below if you need to perform a major modification (For example: adding a new page, replacing an image, etc.):
Prerequisites:
Set up the machine and run the project locally by following the Running the project locally documentation.
-
When working, always start by getting a pull from upstream so that you are in sync with the upstream.
-
In your forked repository, make your changes in a new Git branch.
-
The
docs-kola/en/docs/
directory contains all the.md
files with content. Find the relevant location and do the modification.NOTE:
Refer to the Markdown Cheat Sheet for styling and formatting.
-
Navigate to the
docs-kola/en/
directory in the terminal and build the repository with the following command:mkdocs serve
NOTE:
Refer to Run MkDocs for more information.
- If the styling and formatting are fine, you can commit the changes, push them and send in a pull request.
To locally execute the project, ensure that both Python and pip are installed on your machine.
-
If you are using MacOS, it is likely that a version of Python is pre-installed on your machine. To confirm this, execute the following command in your terminal:
python --version
Upon running the command, you should observe an output similar to the following example which is the default version of Python on your machine:
Python 2.7.2
-
You also need to install python3. Check if you have python3 installed by running the following command:
python3 --version
NOTE:
For a seamless experience and compatibility with the versions of MkDocs and other plugins we utilize, it is recommended to use Python 3.8.x, 3.9.x, or 3.10.x.
-
If you don't have Python installed, download Python from the official downloads page and install.
-
Verify the python3 version by running the following command:
python3 --version
Upon running the command, you should observe an output similar to the following:
Python 3.9.6
- Once you are done, you will have two versions of Python on your machine; python2 and python3.
-
python3 is pre-installed in these versions, which you can verify with
python3 -V
. -
Run
sudo apt install -y python3-pip
to installpip
and verify withpip3 -V
.
pip is already installed if you are using Python 3 >=3.4 downloaded from python.org.
-
Verify the pip3 version by running the following command:
pip3 --version
Upon running the command, you should observe an output similar to the following:
pip 21.2.4
-
If pip is not already installed on your machine, download
get-pip.py
to install pip by clicking here. Then run the following command to install it:python3 get-pip.py
Fork the GitHub repository: https://github.com/wso2/docs-kola.git
Navigate to the location where you want to clone the repository and clone the forked repository.
git clone https://github.com/<git-username>/docs-kola.git
-
Navigate to the
<language-folder>
(en
) inside the folder containing the repository that you cloned.cd docs-kola/en/
-
Install the required pip packages.
This will install MkDocs and the required theme, extensions, and plugins.
For python3, use the following command:
pip3 install -r requirements.txt
-
Run the following command to start the server and view the site on your local server.
mkdocs serve
NOTE:
If you get any error saying that MkDocs command is not found, try the following command:
python3 -m mkdocs serve
-
Open the following URL on a new browser window to view the Micro Integrator documentation site locally:
INFO:
If you are making changes and want to see them on the fly, run the following command to start the server and view the site on your local server.
-
Navigate to the
mkdocs.yml
file. -
Change the following configuration to
false
as shown below: > > ``` #Breaks build if there's a warning strict: false -
Run the following command to start the server and to make the server load only the changed items and display the changes faster. > >
mkdocs serve --dirtyreload
-
If you are running the
mkdocs serve --dirtyreload
command to run the MkDocs server, make sure to change the configuration in themkdocs.yml
file as follows before sending a pull request. > >strict: true
NOTE:
If you are adding new images or new pages to the doc space, update the base path when locally running the project.
-
Open the
mkdocs.yml
file located in thedocs-kola/en/docs/
directory. -
Update the
base_path
tohttp://localhost:8000/en/latest
by uncommenting the entry. -
Make sure to undo this change before submitting the pull request.
-
-
Accept and sign the Contributor License Agreement (CLA) before sending pull requests. For any changes to be accepted, the CLA must be signed.
-
You need to accept the CLA when you are prompted via a GitHub email notification on sending your first PR. Subsequent PRs will not require CLA acceptance.
-
If the CLA gets changed for some (unlikely) reason, you will be presented with the new CLA text after sending your first PR after the change.
Licenses this source under the Apache License, Version 2.0 (LICENSE). You may not use this file except in compliance with the License.