Internal documentation only
This page has been marked as draft.
Links examples
This page demonstrates the types of links you can create.
Basic links Copied
Links within a project use the normal markdown syntax:
[Link to topic in project ](/web-console/about/ "tooltip defined by title attribute")
Resulting in a link to a topic in the project .
The rules for rendering a markdown link are given by the core-docs/core/themes/itrs/layouts/_default/_markup/render-link.html
file. Here we have used the standard Hugo example to extend the default Goldmark behavior.
Links to other projects Copied
When adding links to other docs projects in Hugo (i.e in a capacity planner app topic you might want to link to the main capacity planner docs) you need to adjust the url a bit to ensure it grabs the correct devdocs/uatdocs/docs environment.
[Obcerv Quickstart](__tcproject__/docs/geneos/current/processing/data-access-and-publishing/connect_geneos_to_obcerv/index.html)
Resulting in a link to geneos.
Links to files Copied
For large example files, you may want to have a download link rather than include a long code block in a topic.
For file types that a browser recognises such as json, txt or pdf a naive <a>
link will cause the browser to render that file internally instead of downloading.
To force a download from the CDN/AWS:
- Add a link using the
[script](https://docscdn.itrsgroup.com/project/resources/file)
format - Navigate to the file in AWS and set the folllowing metadata:
- Type: System defined
- Key: Content-Disposition
- Value: attachment
Note: Step 1 lists the direct docscdn formatting, this pulls from the prod environment only. To dynamically fetch from the correct environment instead use [script](__tcproject__/docscdn/project/resources/file)
however, this may cause problems in some browsers.
To force a download from a local file, add a tooltip beginning with Download. This behaviour is case sensitive.
The ```examplez.yaml``` [configuration file](/best-practice-examples/examplez.yaml "Download examplez") can be used to demo this feature.
This causes our custom render-link.html
to add the ‘download’ attribute to the output html link.
Links to external sites Copied
Our changes to /layouts/_default/_markup/render-link.html
mean that when a link explicitly includes the http(s)
protocol it is opened in a new tab.
[link to external site](https://github.com/ITRS-Group "tooltip defined by title attribute")
Resulting in a link to external site.