This documentation is open source. Anyone is welcome to create and edit it. Notably, we love it when users:
- Find errors or have ideas on how to improve existing documentation
- Have an idea for NEW documentation that would help other users
Before contributing for the first time, please review our Code of Conduct
Please follow these steps when contributing changes.
- Create a new feature branch off of
main. Name the branch "feature/my-new-changes", where "my-new-changes" is reflective of the branch's purpose. - Make commits on your feature branch.
- Submit a PR from your feature branch into the
developbranch. - Your PR will be reviewed by a DevRel team member, and merged in when ready.
- The DevRel team member will merge
developintomainwhen ready to deploy to production.
Please submit PRs at least two weeks prior to the date you'd like the documentation changes to go live. This gives the Developer Relations team enough time to review your updates and merge them in.
More detailed instructions about how to contribute changes are below.
To contribute to the documentation, you'll need:
- A GitHub account.
- Optional A code editor such as Visual Studio Code.
- An understanding of Markdown. A helpful cheat sheet is available here.
It's also helpful to know some basic git concepts before diving into contribution. These concepts include:
Each top-level directory inside of the headless-docs repo relates to a separate body of documentation, as shown below.
/atlas-content-modeler-> Atlas Content Modeler documentation/atlas-search-> Atlas search documentation/atlas-> Atlas hosting platform documentation/faustjs-> Faust.js documentation/glossary-> Headless WordPress glossary
With your fork created, you can edit any Atlas docs from this GitHub repository. Before following these steps, make sure you are on the wpengine/headless-docs repository, not your fork.
-
Select the product for which you want to edit an article.
-
Find the article you want to edit and click to open the file.
-
Select the pencil (Edit this file) icon at the top of the article.
-
Make any edits to the article directly through the GitHub website.
Note: If you are using a desktop client or the command line and are forking or cloning the repository, be sure to make your changes in a new branch. Doing so ensures that you produce a pull request (PR) rather than committing changes directly on the
developbranch. -
At the bottom of the page, add a title for your change in the Commit changes section.
-
Accept the default branch name or make a new one and click Commit changes.
-
baseshould default todevelopandcompareshould default to{your-branch}.If the settings are not correct, use the dropdown menus to select the appropriate settings. The fork menus might not be present.
-
Describe the changes that you made in a PR message.
Use the following guidelines to create the PR message:
- Provide a brief description of the change, starting with an imperative verb. For example, "Add a paragraph about... ."
- If you make a complex edit, explain why you are making the edit in the larger box under Commit changes. For example, if you are changing the formatting of an article because you want an ordered list instead of an unordered one, say, "Switch list in the middle of the article to ordered to show a clear progression of steps."
-
Click Create pull request.
A member of the Atlas team will review your PR. Depending on the review feedback, you might need to make additional changes.
Should you need to make additional changes to the PR, follow these steps:
-
From the
wpengine/headless-docsrepo, select the Pull requests tab. -
Find and click your PR.
-
Click the Files changed tab.
-
Click the pencil icon next to the file that you want to change.
-
Make your change in the editor.
-
Provide a brief description of the change.
-
Click the Commit directly to the
your-branch-namebranch option, and then click Commit changes.
A member of the Atlas team will merge your changes or request additional ones.
When creating new Atlas content, we recommend using the "Docs Like Code" methodology. While you can easily edit pages through GitHub, article creation tends to be easier with familiarity with your chosen code editor and familiarity with the command line. If this is your first time using either:
- Generate an SSH key for authentication from the command line to GitHub.
- Add an SSH key to your GitHub account.
- Familiarize yourself with basic Git commands.
With Git set up on your local machine, perform the following to create a new page:
-
On your local machine
cdinto the directory you want to copyheadless-docsinto. -
Clone your fork of the
headless-docsrepository. Entergit clone <GitHubUsername>/headless-docs. After the cloning completes, runcd headless-docs. -
Create a branch for your new page. Run
git checkout -b "feature/my-new-changes", where "my-new-changes" is reflective of the branch's purpose. -
Open the
headless-docsrepo in your code editor and make changes. Using an in-browser Markdown preview tool like StackEdit can be helpful to see what the page you're editing will look like when it's rendered to HTML.Note: If your article includes images, add the image to the
assetsof the product directory and add a link to the image in your article. For example, assuming your image is named Picture1.png use{{<img src="../assets/Picture1.png" title="" alt="">}} -
If you create any new documentation pages, be sure to add the following metadata at the top of the file:
--- slug: /product-name/title-of-page title: Title of Page description: SEO-friendly description of page --- -
Save all created and edited files.
-
Create a pull request (PR).
a. Add your new content and image files, if any:
git add title-of-page.mdxgit add assets/Picture1.pngb. Commit the file:
git commit -m "Create a new page"c. Push the change:
git push upstreamd. In your web browser, navigate to https://github.com/wpengine/headless-docs.
e. Select Pull Requests
f. You should see your branch name at the top of the Pull Requests page. Select Compare & pull request.
h. Your
base-repositoryshould default towpengine/headless-docsandbaseshould default todevelop. Click the dropdown onhead-repositoryand select your clone of the support-how-to repo. Click the dropdown oncompareand select your branch. Select Create new pull request. -
Add a title and a description describing your change. Finally, select Create pull request.
A member of the Developer Relations team will review your changes. Be sure to look out for any questions or requests for further changes they may have. Once the PR is approved and merged in, a DevRel team member will get it deployed to production.
If you spot any issues with the documentation, please create an issue so it can be addressed.