# Contributing to MarfeelDocs
Marfeel uses a Pull Request based process to review changes before they’re added to Marfeel’s GitHub repository. Anyone with access to a repository can open a pull request.
Since docs are hosted on source code repositories the approval workflow is the same as any code related change. For more information about how to create a PR check out Cloning the repository section.
Product Managers are responsible for approving and reviewing every new document (as defined in the Codeowners file) in order to verify that all the styling and writing conventions are respected.
The main navigation structure is code owned by the Ada team.
# Branching and PR
When working on the Marfeel documentation, you can choose between two major styles of working:
- Work directly in the GitHub UI section, using the “Edit this File” and commit capabilities without having to clone the repository. This is useful for quick documentation updates, typo fixes, and lightweight Markdown changes.
- Clone the Marfeel Docs repo (opens new window) and get the site up and running locally. This is necessary for more thorough documentation content and infrastructure changes. Learn how to get set up using the Marfeel docs setup instructions.
# Edit using the GitHub UI
All articles can be edited by clicking the Edit this page in GitHub
button, located at the bottom of each article.
- Click on the
Edit this page in GitHub
button. - Make the desired changes in the article.
- Once satisfied with the changes, go to the bottom of the GitHub UI page and click the
commit changes
button. - Select an appropriate title for the Pull Request and click the
Create pull request
button. This will automatically prompt the article for review to the codeowners. - Once your changes are approved, click the
Squash and Merge
button. - To deploy your code in production, trigger the build (opens new window) and then the shuttle (opens new window) will be triggered automatically (if MarfeelDocs build succeeded).
- Check your changes are OK in production.
# Cloning the repository
If you prefer to do the changes within the repository folder locally, follow these instructions:
WARNING
This procedure assumes you have already created a repository on GitHub, or have an existing repository owned by someone else you'd like to contribute to. If you are using Github for the first time, the SSH key needs to be added. Refer to this Github's ssh configuration article (opens new window) for more information.
- On GitHub, navigate to the main page of the repository.
- Under the repository name, click the green Code button.
- Use the
Clone with HTTPS
option, copy the clone URL for the repository.
- Open the terminal.
- Change the current working directory to the location where you want the cloned directory to be made.
- Type
git clone
, and then paste the URL you copied in Step 3.
$ git clone git@github.com:Marfeel/RepositoryName.git
- Press Enter. Your local clone will be created.
- Create a new branch. For docs-only changes, use:
$ git checkout -b docs/some-change
- Edit the desired Markdown files in the
/docs
folder of the repository. - Validate your changes are also reflected in the
sections.json
file when needed.
Once you've done all your changes you'll have to commit the changes and submit a pull request.
- Add the files to the commit. From your repository main folder:
$ git add .
- Commit your changes.
$ git commit -m "Explain your changes here"
- Push your branch.
$ git push -u origin docs/some-change
Enter into Github and locate your repository.
Click on
Compare & pull request
. Note: Ensure that the status shows 'Able to merge' (in green).
`master` or `pre`?
Content directly targeting the main Docs website should be merged onto the master
branch, whereas content which is still a work in progress should target the pre
branch.
- You have the option to add any comments if required. Then click on
Create pull request
.
- Wait for a couple of minutes and verify that all checks have passed. You should then see the following screen:
- Wait until your reviewer has approved your changes.
GitHub desktop app
Using GitHub desktop app (opens new window) is a hybrid of the options above. We won't cover its flow in this article, but feel free to use it if you don’t want to use the terminal.
# Markdown Linting
If you edit files from your local environment, you can benefit from linting for your markdown files. Marfeel uses markdownlint-cli (opens new window) rules, with additional custom rules defined in Marfeel Coding Standards (opens new window).
Marfeel repositories using NPM usually have a markdown linter integrated:
If you're writing in a repository that doesn't have it, setting it up in VSCode is an alternative. We recommend the markdownlint extension (opens new window).
Ignore some warnings
Markdownlint default configuration sends warnings that Marfeel tolerates.
For example, it is expected for MarfeelDocs to have both a frontmatter title and an H1 in a document: