Reference one markdown file from another markdown file
The Developer portal documentation sections act as a mirror of your docs repo in Milliways / Helsegitlab. This means you can refer to your other files as you would in a regular file system / git repo.
In order to refer to another file in your docs repo use one of the following methods:
Absolute URL
An absolute URL can be used to refer strictly to another document, this will include your entire URL including the domain and therefore will not work accross different environments. If you need your links to work in both production and test, use relative / absolute-relative URLs instead.
example of an absolute URL to this document:
https://utviklerportal.nhn.no/informasjonstjenester/plattform/utviklerportal/dokumentasjon/docs/developers/how-to-reference-other-filesmd
Absolute-relative URL
An absolute-relative URL will start from the domain root (www.utviklerportal.nhn.no/). This way of writing URLs will ensure your links are environment-agnostic, reducing the risk of faulty links and need for maintenance between different environments.
Example of an absolute-relative URL to this document:
/informasjonstjenester/plattform/utviklerportal/dokumentasjon/docs/developers/how-to-reference-other-filesmd
Please note that this will not work in readme.md files that are rendered when you click on the folder, ie docs folder. In that case, use relative URL as described below.
Relative URL
When working with markdown files inside a docs repo that is mirrored in the Developer portal you will also have the option of using relative URLs. A relative URL will start from the current document's location. Relative URLs are completely independent and will work on every environment as long as the document / file structure remains the same accross environments.
example of a relative URL to another document in the same directory as this one:
./readme.md
example of a relative URL to a document in a sibling directory:
../editors/readme.md