Contribute to Mendix Docs
Introduction
All Mendix documentation is open to the Mendix community, which means you can make changes and add to it in ways that you see necessary. Do you see a how-to that is inaccurate or a section of the Studio Pro Guide that needs to be updated? You can easily help us improve the documentation for the whole Mendix community!
All the Mendix documentation is stored in a GitHub repository. With a GitHub account, you can edit all existing documentation. You can also write a new how-to on an awesome topic of your choice and submit it. When making documentation changes, follow the Documentation Writing Guidelines.
To work on the documentation in GitHub, use Markdown. For details on this easy-to-use syntax, see the GitHub Guide to Mastering Markdown.
Quick guide to making a documentation change:
- Fork the development branch of the mendix/docs repository.
- Create a new branch from the forked development branch.
- Make your changes in the new branch.
- Create a pull request with the Mendix development branch as the base.
For details on how to fork a repo and create a pull request, watch How to Contribute to Someone’s GitHub Repository (Fork/Pull Request).
This how-to teaches you how to do the following:
- Edit existing documentation in GitHub
- Edit existing documentation locally and build local previews
- Leave feedback on existing documentation
- Create new documentation
Prerequisites
Before starting with this how-to, make sure you have completed the following prerequisites:
- Have a GitHub account (sign up at Join GitHub)
You can create and edit files directly online within GitHub, or outside GitHub using your preferred writing and committing tools.
In the Editing the Documentation and Previewing Changes Locally section below, you will also learn how to fork and clone the mendix/docs repository, edit documentation locally, and build local previews.
Editing the Documentation in GitHub
To edit existing documentation in GitHub, follow these steps:
-
Click View on GitHub () in the upper-right corner of the specific Mendix documentation page that you want to work on.
The file of this doc opens on GitHub.
-
Click Edit this file () in the upper-right corner.
-
If you already have a fork of the development branch of the mendix/docs repository, the doc opens in a web editor.
-
If you do not have a fork yet, the following page opens and tells you need to fork the repository to propose changes. Click Fork this repository.
The doc opens in a web editor.
-
-
Make your changes in the editor. Make sure the changes align with our Documentation Writing Guidelines.
-
Click Commit changes in the upper-right corner above the editor. The Propose changes dialog box opens.
-
Enter a commit message, add more description if needed, and then click Propose changes.
The Open a pull request page opens.
-
Make sure the pull request uses our development branch as the base.
For more information, see Creating a Pull Request and GitHub Standard Fork and Pull Request Workflow.
-
Add a title for the pull request.
If you need your pull request to be merged on a specific date (for example, for a specific release), specify that in the title of the pull request or as a comment. Otherwise, all pull requests are reviewed and merged under the assumption that the content can be published immediately. -
Make sure that Allow edits by maintainers is selected.
-
Click Create pull request.
The pull request is created. The Mendix Docs team will review the pull request as soon as possible. After the review and if there are no questions, the pull request will be published and you will be able to see the changes on the Mendix Docs site!
Editing the Documentation and Previewing Changes Locally
If you want to work outside GitHub, Mendix recommends using the following tools to contribute to the Mendix documentation:
- For writing, editing, and previewing documentation – Typora, Visual Studio Code, or Visual Studio Code in the browser (accessible by pressing Period after opening your fork of the mendix/docs repository)
- For committing your documentation – GitHub Desktop, Visual Studio Code, or Sourcetree
You can clone a local copy of a forked repository, make documentation changes, and build local previews. To do so, follow these steps:
-
Fork the development branch of the mendix/docs repository in GitHub. For more information, see Fork a repository in GitHub.
-
Clone the forked repository using your preferred Git client, such as Visual Studio Code, GitHub Desktop, or Sourcetree:
- Clone using Visual Studio Code:
- In Visual Studio Code, open the Command Palette (Ctrl + Shift + P, or Command + Shift + P on a Mac).
- Search for
clone
. - Select Git: Clone.
- Enter the URL of the forked repository (example URL: https://github.com/YOUR-USERNAME/docs) and select a destination directory.
- Or clone using GitHub Desktop:
- In GitHub Desktop, choose the option File > Clone Repository > URL.
- Enter the URL of the forked repository and select a destination directory.
- Or clone using Sourcetree:
- In Sourcetree, click Clone.
- Enter the URL of the forked repository and select a destination directory.
The repo is cloned into a folder called docs in the location you selected. You can rename it afterwards if you want to.
If you are running on Windows, avoid using a long directory path for the local directory; some files can reach the limits of Git’s file length. A base path of up to 50 characters works, but 64 characters is currently too long. - Clone using Visual Studio Code:
-
Prepare the local repository with the Node package manager (npm) packages. You only need to do this once for this local repository. To do so, follow these steps:
-
Download and install the Node.js LTS version (20.10 as of 2024). You do not need Chocolatey if that is offered.
-
After the installation, make sure to verify the current Node.js version. You can do so by running the following command in a terminal:
node -v
. -
In the root directory of the local repository, run the following command in a terminal:
npm install
.If any new or changed files show up as uncommitted files, discard the changes. Do not commit them.
-
-
Create a new branch from the local repository’s development branch and edit the documentation locally with your preferred editing tool. For example, you can open the local repository folder with Visual Studio Code, create a new branch from its development branch, find the file and make changes in the new branch. Remember to save your changes.
-
To run a local version of site to preview your changes, in the root directory of the local repository, run the following command in a terminal:
npm run build
. -
Once the site is built, you see a table indicating how many pages have been created:
-
Wait until the server is set up before you can see the site:
-
To see the local site preview, go to
http://localhost:1313/
. -
Navigate in the left sidebar menu to the page that you just made changes to, and you can preview your changes locally!
As long as the current local build is still running, each time after you save your changes, it will detect your changes and rebuild the site. Wait until the web server is available again, and you will be able to preview the changes you just saved!
If you do not see the changes you just saved, clear your browser cache, close and reopen the browser, and go to the local site again. Alternatively, in many browsers, such as Google Chrome, Firefox, and Microsoft Edge, you can perform a hard refresh on the current page by pressing Ctrl + Shift + R, or Command + Shift + R on a Mac. This hard refresh ignores cached content.
If the above solutions do not work, stop the current running build in the terminal by pressing Ctrl + C and run the commandnpm run build
again. -
When the changes are ready to be submitted, stage and commit the changes using your preferred Git client, and create a pull request with the Mendix development branch as the base.
Leaving Feedback on the Documentation
If you find an issue with the documentation—whether it is a typo, a missing step, or a specific technical problem—we want to know about it so we can improve!
Click Leave Feedback () in the upper-right corner of the screen.
Then you will be brought to our GitHub repo’s Issues page. Please include the following details in your feedback:
- The document you are working with
- A detailed description of what is wrong
- Details on what can be improved or what the fix is, if applicable
- Screenshots of your Mendix Platform usage, if applicable
We look at all feedback and take it seriously, and we will be in contact about how to resolve it.
Writing New Documentation
The sections below present the key steps in writing new documentation for Mendix.
Using a Template
To submit a new how-to or Studio Pro Guide page to the Mendix documentation, start with a Mendix documentation template:
- To get the how-to template, right-click this link and save the file locally: How-to Template
- To get the reference page template, right-click this link and save the file locally: Mendix Studio Pro Guide Page Template
Guidelines and Conventions
Follow these guidelines and conventions when writing:
- Reference and use our Documentation Writing Guidelines
- Make sure the Markdown file name reflects the title of the page (for example, if the page is titled “Create Your App,” the file name should be create-your-app.md)
- Name the Markdown and image files in lower-case with a hyphen (
-
) between each word, and do not use spaces or any other symbols in the file name (for example,&
), as these will not be accepted - When creating screenshots:
- Make sure the resolution of your screen is 100% (or a multiple thereof) so that your images are sharp
- Focus on the part of screen that contains the information you need so that the browser does not have to shrink the image when it displays it, and crop the image closely
- Make sure the image file has a name that makes sense so it is easy to find it
- Save the image as a .png (preferred), .jpg, or .gif file
- Save the image file in a sub-folder in the attachments folder for the location of the document (this sub-folder should have the same name as the document file name you are working on)
Submitting Your Work
When you are ready to submit your work, follow these guidelines:
- Commit new Markdown files via your preferred Git client or via the Create new file button in the Mendix GitHub repo (where you can copy-paste your text)
- Commit new image files via your preferred Git client or via the Upload files button in the GitHub repo (where you can drag and drop your image files)
Finally, create a pull request that specifies the Mendix development branch as the base (for more information, see Creating a Pull Request).
Signing the Contributor License Agreement
The first time you make a contribution to the Mendix documentation (via a pull request), you need to sign the Contributor License Agreement for mendix/docs.
To access the license agreement, go to the Checks section of the pull request’s Conversation tab and click Details for license/cla.
This only needs to be done once.