Live code examples
Published
Updated
Cmd-C + Cmd-V
Code examples in the fortrabbit docs fill in the app, environment and region selected in the docs, for readers logged in to the dashboard. Commands can then be copied as they are, and links lead straight to the right dashboard page.
Example
| Not parsed | Parsed | Description |
|---|---|---|
{{app-name}} | {{app-name}} | Selected app name |
{{region}} | {{region}} | Region of selected app |
{{app-env-name}} | {{app-env-name}} | Selected environment name |
{{app-env-id}} | {{app-env-id}} | Selected environment id |
Logged in to the dashboard, choose an environment with the select next to the article, and the parsed column shows its values. Without a login, the placeholders stay in double curly braces.
- You are not logged in when 'not parsed' and 'parsed' look the same to you
- You are logged in when 'not parsed' and 'parsed' look different to you
Deep links
Deep links let logged-in users jump to the dashboard directly from docs. Here's an example:
- Logged in users see a link
- Unknown users see a message to login to see the link
Cookie
A functional cookie holds the login state of the dashboard and the list of environments. Clearing the cookies resets the selection.