Cross-Referencing

Great Docs provides a linking system called GDLS (Great Docs Linking System) that automatically creates clickable navigation between your API reference pages. GDLS operates at three levels, each adding a different kind of connectivity to your documentation.

The first level is the %seealso directive, which adds structured “See Also” sections that link related items together. The second level is inline interlinks, which let you create Markdown-style links to API symbols anywhere in your prose. The third level is code autolinks, which automatically turn inline code references like `MyClass` into clickable links when they match a documented symbol.

All three mechanisms resolve against the same objects.json inventory that Great Docs generates during the build. To preview which symbols are available for linking before you build, run:

great-docs scan

The %seealso Directive

The %seealso directive adds a “See Also” section to a reference page. Place it anywhere in a docstring with a comma-separated list of related names:

def encode(data: bytes, encoding: str = "utf-8") -> str:
    """Encode bytes to a string.

    %seealso decode, transcode
    """
    ...

Great Docs strips the directive from the rendered output and generates a “See Also” section with clickable links at the bottom of the page.

Names can reference any exported symbol, including class methods using dotted notation:

class Validator:
    def check(self, data):
        """Run all validation checks.

        %seealso Validator.reset, Report
        """
        ...

Adding Descriptions

You can add a short description after each name, separated by a colon. When descriptions are present, the See Also section renders as a list with each link followed by its description. Without descriptions, the links appear as a compact comma-separated line.

def load(path: str) -> dict:
    """Load data from a file.

    %seealso save : Write data back to a file, validate : Check data integrity
    """
    ...

You can mix entries with and without descriptions freely:

def transform(data: dict) -> dict:
    """Transform data before processing.

    %seealso validate : Check data integrity first, load, save
    """
    ...

NumPy-style See Also Sections

If your docstrings use the NumPy docstring format, you can write a standard See Also section instead of (or in addition to) the %seealso directive. Great Docs recognizes this format, preserves the descriptions, and merges it with any %seealso entries on the same page. Duplicate references are deduplicated automatically.

def connect(host: str, port: int = 5432):
    """Open a connection to the server.

    Parameters
    ----------
    host
        The server hostname.
    port
        The port number.

    See Also
    --------
    disconnect : Close an open connection.
    send : Transmit data over the connection.
    """
    ...

Best Practices for Linking

Cross-references make documentation much more navigable, but a few guidelines help keep them useful rather than distracting.

Use %seealso to connect items that serve complementary roles. If encode() and decode() are a natural pair, linking them together helps readers discover both. For larger groupings, a brief description after each name (using the colon syntax) gives context about why the link is relevant.

Use inline interlinks when you mention another symbol in the middle of a prose explanation. This keeps reading flow natural while still giving readers a path to the referenced page. The shortened form (with ~) is usually the best choice because fully qualified paths can be long and interrupt the sentence visually.

Code autolinks require no effort on your part, since they happen automatically. But be aware that common words like Config or Data might match a symbol unexpectedly. If you notice unwanted links in the rendered output, add {.gd-no-link} to the specific code span.

Next Steps