The Developer Portal brings together all the resources needed for experienced as well as beginning developers on the Internet Computer.
The Developer Portal uses Docusaurus.
While modifying documentation in the repository, you can preview the changes locally by executing the following commands - considering that you have nodejs installed -.
cd portal/
git submodule update --init --remote
npm install
npm start
The Developer Portal frontend should appear in your browser under http://localhost:3000.
To preview a specific locale in the context of an internationalization contribution, start the docs with the following command:
npm start -- --locale <locale>
Docusaurus is quite easy to use and facilitates the creation of documents. The developer portal uses Markdown as its default format with enhancements provided by Docusuaurus.
To create a document, head to the /docs
folder and create a Markdown file in the directory of your choice.
Here is an example of a docs sub-directory:
developer-docs/
developer-docs/
ic-overview.md
quickstart/
...
references/
...
- Making sure that the
.github/CODEOWNERS
file is filled with new documents that you added. This way we can ensure that future Pull Requests are reviewed by the right people. - When creating a document, it must be registered in
/sidebars.js
, otherwise, it will not appear in the side navigation bar.
More information about document creation on Docusaurus's docs.
Whenever a Pull Request is created on the repository, a CI job will appear and deploy a Preview on Netlify so that reviewers can easily check the changes made the way the end users will.
To access the preview, head to the very bottom of your pull request where you will see the list of deployments. Once the job is finished, you should see as active the "Preview Netlify" deployment.
Then simply press the "View deployment" button to in your fresh Netlify preview.
Here is a description of how a contribution should be made to the developer portal.
- The contributor creates a fork/branch where the changes are made.
- a Pull Request is created from this branch to
master
. the preview is generated and the reviewers can directly check the preview website. - After the Pull Request is merged into master, CI/CD will deploy the contents to the IC. The changes made will appear on the webpage under the version in the dropdown named "Current".
- Optional: When a repo maintainer tags a commit on master as $TAG, then CI/CD deploys the contents to the IC. The webpage will default to the new "$TAG" version, visible in the versions dropdown, and allow users to view the contents pinned at that tag.