{"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"markdoc-variables","__idx":0},"children":["Markdoc variables"]},{"$$mdtype":"Tag","name":"ConfigOptionRequirements","attributes":{"products":["Revel","Reef","Realm"],"plans":["Pro","Enterprise","Enterprise+"]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Markdoc variables allow you to access dynamic data in your Markdoc content."," ","This reference documents the available variables and their usage."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"available-variables","__idx":1},"children":["Available variables"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Variable"},"children":["Variable"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$rbac.teams"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array of RBAC teams the user belongs to"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$user.email"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User's email address"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$user.authCookie"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User's authentication cookie"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$user.{claim}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Other user claims from the Identity Provider (IdP)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$remoteAddr.ipAddress"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User's IP address"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$idpAccessToken"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User's access token"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$lang"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Current page locale ID from the config or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["default_locale"]}," if i18n is not configured"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$frontmatter.{property}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Access properties defined in the page's front matter"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$env.{name}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Access environment variables"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"usage-examples","__idx":2},"children":["Usage examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"display-the-user-email","__idx":3},"children":["Display the user email"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use variables within your Markdoc content:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"md","header":{"controls":{"copy":{}}},"source":"Welcome, {% default($user.email, \"Redocker\") %}!\n","lang":"md"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Result:"]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Welcome, ",null,"!"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"dump-the-rbac-details","__idx":4},"children":["Dump the RBAC details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dump the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$rbac"]}," contents to troubleshoot RBAC issues:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"md","header":{"controls":{"copy":{}}},"source":"{% $rbac %}\n","lang":"md"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Result:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["{\n  \"teams\": [\n    \"anonymous\"\n  ]\n}"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"data-structure-examples","__idx":5},"children":["Data structure examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"rbac","__idx":6},"children":["$rbac"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"teams\": [\n    \"sample\",\n    \"authenticated\"\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"user","__idx":7},"children":["$user"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The structure of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$user"]}," depends on your Identity Provider (IdP)."," ","Here's an example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"at_hash\": \"0194_mIut36l1RvlemrfUA\",\n  \"aud\": [\"41e74d64-6b6b-44b5-8779-28df7aa3cce6\"],\n  \"auth_time\": 1747025292,\n  \"email\": \"smile@example.com\",\n  \"exp\": 1747032494,\n  \"firstName\": \"Smile\",\n  \"https://redocly.com/auth/aud\": [\n    \"redocly\"\n  ],\n  \"https://redocly.com/sso/teams\": [\n    \"sample\",\n    \"authenticated\"\n  ],\n  \"iat\": 1747025293,\n  \"id\": \"usr_00h4e3haae4mtb50gtn497n93d\",\n  \"iss\": \"https://auth.cloud.redocly.com/oidc\",\n  \"jti\": \"74a7518b-e05e-417f-9931-94b523237212\",\n  \"lastName\": \"Example\",\n  \"loginSource\": \"sso\",\n  \"providerId\": \"idp_01h4dygdnk9veyr4wzkkf9824m\",\n  \"rat\": 1747025291,\n  \"sessionId\": \"a6bbb5cb-4fc5-40e1-901a-9d104264f708\",\n  \"sid\": \"a6bbb5cb-4fc5-40e1-901a-9d104264f708\",\n  \"sub\": \"idp_01h4dygdnk9veyr4wzkkf9978m__smile@example.com\",\n  \"idpId\": \"oidc\",\n  \"teams\": [\n    \"sample\",\n    \"authenticated\"\n  ],\n  \"name\": \"smile@example.com\",\n  \"authCookie\": \"[auth cookie value]\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"remoteaddr","__idx":8},"children":["$remoteAddr"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{ \n\"hostname\": \"example.com\",\n\"port\": 3535,\n\"ipAddress\": \"192.0.2.1\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"idpaccesstoken","__idx":9},"children":["$idpAccessToken"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"md","header":{"controls":{"copy":{}}},"source":"\"ory_at_CcByTgsW7q......\"\n","lang":"md"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"lang","__idx":10},"children":["$lang"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"md","header":{"controls":{"copy":{}}},"source":"\"default_locale\"\n","lang":"md"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"frontmatter","__idx":11},"children":["$frontmatter"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Access properties defined in the front matter of the current page:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"md","data-title":"example.md","header":{"title":"example.md","controls":{"copy":{}}},"source":"---\ntitle: Getting Started\ndescription: Learn how to use our product\nauthor: Redocly Team\n---\n\n# {% $frontmatter.title %}\n\nBy {% $frontmatter.author %}\n","lang":"md"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"env","__idx":12},"children":["$env"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Access ",{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/realm/reunite/project/env-variables"},"children":["environment variables"]}," that have been exposed to the Markdoc renderer."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Usage example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{% $env.PUBLIC_REDOCLY_BRANCH_NAME %}"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"resources","__idx":13},"children":["Resources"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/realm/content/markdoc-tags"},"children":["Markdoc tags"]}]}," - See the full list of supported Markdoc tags"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"https://redocly.com/learn/markdoc"},"children":["Markdoc overview for technical writers"]}]}," - Learn how to use Markdoc in your documentation"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"Link","attributes":{"href":"/docs/realm/customization"},"children":["Extend with code"]}]}," - Discover customizable components and customization options for your project"]}]}]},"frontmatter":{"products":["Revel","Reef","Realm"],"plans":["Pro","Enterprise","Enterprise+"]},"tagList":["configOptionRequirements","table"],"title":"Markdoc variables","lastModified":"2026-10-01T23:00:57.000Z"}