Thank you for your interest in contributing to the Module Federation documentation! This guide will help you get started with setting up your environment, making changes, and submitting pull requests.
Before you begin, make sure you have the following installed on your machine:
-
Git
-
Node.js
-
nx
-
yarn
You also need a GitHub account and a fork of the module-federation/core repository.
Documentation website consists of 2 applications:
-
docs-ui
holds the visual part of the documentation website. When serving\building the docs app, docs-ui will be prebuilt as its dependency. -
docs
is the one that is meant to contain all the actual documentation.
To set up your environment, follow these steps:
-
Clone your fork of the module-federation/core repository to your local machine.
-
Navigate to the
apps/docs
folder inside the cloned repository. -
Run
npm install
to install the dependencies. -
By default, serving\building will pull the changes from the
main
branch. To use it, runnx run docs:serve
. Along with it there’s alocal
configuration, that provides an ability to rely on the files within the filesystem. Can be used by runningnx run docs:serve:local
You can now access the documentation site at http://127.0.0.1:8080/.
The documentation is written in AsciiDoc markup language, which is similar to Markdown but more powerful and expressive. You can learn more about AsciiDoc syntax from the AsciiDoc Writer’s Guide.
The source files for the documentation are located in the apps/docs/src/modules/ROOT/pages
folder. Each file corresponds to a page on the documentation site, and has a .adoc
extension.
To make changes to the documentation, follow these steps:
-
Find the file that corresponds to the page you want to edit or create a new file if you want to add a new page.
-
Open the file in your preferred text editor and make your changes using AsciiDoc syntax.
-
In case you created a new file, make sure to add it to sidebar navigation file
nav.adoc
located atdocs/src/modules/ROOT/nav.adoc
, so it appears in the website sidebar. -
Save the file and check the local development server for the updated page.
Once you are happy with your changes, you can submit a pull request to the module-federation/core repository. A pull request is a way of proposing your changes to be merged into the main branch of the repository.
To submit a pull request, follow these steps:
-
Commit your changes to your local branch using
git commit -m "your message"
. -
Push your changes to your remote fork using
git push origin your-branch
. -
Go to https://github.com/module-federation/core and click on "New pull request".
-
Select your fork and branch as the source and the main branch as the destination.
-
Fill in the title and description of your pull request and click on "Create pull request".
Your pull request will be reviewed by the maintainers of the module-federation/core
repository as well as by a technical writer who will check your content for accuracy, clarity, and adherence to Google Developers Documentation Style Guide. The technical writer may suggest some changes or improvements to your content before merging it to the main branch. and they will provide feedback or approve it.
That’s it! You have successfully contributed to the Module Federation documentation! Thank you for your time and effort!
If you have any questions or issues, feel free to reach out to us on GitHub Discussions