Documentation Components

This documentation uses gatsby with MDX. For MDX there are custom components / plugins added which differ from regular MDX setups. To see how they are used have a look at the source of this page.

Code Tabs

Sibling code blocks are automatically merged into a block with tabs to switch between them. To prevent two adjacent code blocks from merging, separate them with the <Break/> component.

Example of two code blocks merged:

Copied
import sentry_sdk
sentry_sdk.init("https://examplePublicKey@o0.ingest.sentry.io/0");

A second example with three code blocks that have file names set:

hello.py
Copied
#!/usr/bin/env python
print "Hello World"

Another code block with different languages for comparison:

hello.html
Copied
<h1>Hello World</h1>

Two JavaScript variants where one has an explicit title override:

Copied
Sentry.init();

Code without title:

Copied
nolang all alone

No language combined with Python:

Copied
no lang

Three code blocks, where the second forced a break from the first (<Break/>):

Copied
print "I am block 1"
Copied
print "I am block 2"

Example usage in a nested structure:

  1. Creation of the SDK (sometimes this is hidden from the user):

    Copied
    Sentry.init({dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'});
Copied
echo "Some code outside"

If two blocks share the same language and get merged, they get enumerated:

Copied
I am block 1
You can edit this page on GitHub.