- Create a documentation '/docs' directory in your repository for eg.
wire-serverand add your markdown documentation files there. - The '/docs' files will be included (as linked files) in the
wire-docsrepository via a submodule and will be pulled during the build process. - The submodule management documentation can be at Submodule Management
Note: The further instructions will refer to wire-server as the example repository containing the documentation files, but the same applies to any other repositories. Feel free to include these instructions in your own repository's documentation.
- The Markdown (.md) pages in the docs directory should be self-contained, including any static images or diagrams. However, please note that links within these documents may not function correctly, as they are relative to the
wire-docs/srcdirectory due to the symlink structure. To ensure that document links work as intended, collaborate with thewire-docsrepository to identify their correct locations.
- wire-docs: Main documentation repository
- wire-server/docs: Documentation related to the documentation pages in the
wire-server(the submodule) repository.
For content in wire-server/docs:
- Make changes directly in the
wire-server/docsdirectory - Create a PR against the
wire-server:developbranch. *Note: Thedevelopbranch is specific towire-server. Other repositories may have different branch names. - Once merged, these changes will be picked up by
wire-docsthrough submodule updates. - In
wire-docs:- Update the
wire-serversubmodule (to the latest commit) and commit that change - Test with
make runbefore creating a PR
- Update the
For content only in wire-docs:
- Make changes directly in
wire-docs/src - Create a PR against
wire-docs:mainbranch
When a page needs to be moved because it's related to code changes in your repository (e.g., wire-server), follow these steps:
- Add the page to
wire-server/docsand merge it to the develop branch. - In
wire-docs:- Update the
wire-serversubmodule (to the latest commit) and commit that change - Delete the original page from
wire-docs/src - Create a relative symbolic link to the file in the
wire-servermodule:cd src/developer/reference/ rm example-file.svg ln -s ../../../wire-server/docs/src/developer/reference/example-file.svg example-file.svg
- Update the
- Commit new linked files before testing with
make run - Test with
make runbefore creating a PR
- Create the file in
wire-server/docs - Merge it into
wire-server:develop - To make it discoverable on docs.wire.com:
- Update the
wire-serversubmodule reference inwire-docsand commit the change - Create a relative symbolic link to the file in the
wire-servermodule:cd src/developer/reference/ ln -s ../../../wire-server/docs/src/developer/reference/example-file.svg example-file.svg - Commit new linked files before testing with
make run - Update the navigation structure in mkdocs.yml or update the directory's README.md to include references to the new file, or add references to the new file from relevant existing pages
- Test with
make runand create a PR towire-docs:main
- Update the
- Add the page to
wire-docs/srcin the appropriate location - Update the navigation structure in mkdocs.yml or update the directory's README.md to include references to the new file, or add references to the new file from relevant existing pages
- Test with
make runand create a PR towire-docs:main
- Identify all references to the file in
wire-server/docsandwire-docs - Remove all references and links from navigation (mkdocs.yml) and other pages
- Delete the file from its location in
wire-server/docsand merge towire-server:develop - Update the
wire-serversubmodule reference inwire-docsand commit the change - Delete the symlink from
wire-docs/src - Commit local deleted files before testing with
make run - Submit a PR to
wire-docs:main
- Identify all references to the file in
wire-docsandwire-server/docs - Remove all references and links from navigation (mkdocs.yml) and other pages.
- Update the submodule reference in
wire-docsif the file is linked from a submodule. - Delete the file from its location
- Commit local deleted files before testing with
make run - Submit a PR to
wire-docs:main
All changes to documentation go live when the Prod Env Latest Build and Deploy to S3 workflow on wire-docs runs post merging the PR on wire-docs:main. Currently, submodule updates from wire-server to wire-docs are performed manually, but there are plans to automate this with a pipeline in the very near future.
-
Since
wire-docsworks with multiple repositories, it's crucial to ensure that documentation changes in each submodule likewire-serverare compatible with the symlink structure inwire-docs. To achieve this, we have implemented an automated validation workflow using GitHub Actions. -
Create a workflow that automates documentation validation between the
wire-serverandwire-docsrepositories like mentioned in build workflow. -
When a PR is made to
wire-server'sdevelopbranch, GitHub Actions cloneswire-docsand temporarily modifies its .gitmodules to point to the PR branch instead ofdevelop. It then runs a build process to validate that the documentation changes work correctly withwire-docssymlink structure. -
If the build succeeds, the PR can be merged. If it fails, the PR author must address the issues before merging.
- After merging the PR in
wire-server, a second PR is created inwire-docsto update the submodule reference to the latest commit inwire-server. This PR is then verified by Build Test workflow and can be merged if successful.