ScyllaDB University Live | Free Virtual Training Event
Learn more
ScyllaDB Documentation Logo Documentation
  • Server
  • Cloud
  • Tools
    • ScyllaDB Manager
    • ScyllaDB Monitoring Stack
    • ScyllaDB Operator
  • Drivers
    • CQL Drivers
    • DynamoDB Drivers
  • Resources
    • ScyllaDB University
    • Community Forum
    • Tutorials
Download
ScyllaDB Docs ScyllaDB Sphinx Theme Examples Includes

Includes¶

An include directive allows you to include the entire contents of one restructured text file directly into another. This is the easiest way to control content re-use.

When given an absolute path, the directive takes it as relative to the root of the source directory. It is ScyllaDB practice to place global include files in the rst_include directory.

For example, here are some very commonly used include statements:

.. include:: /rst_include/scylla-commands-stop-index.rst
.. include:: /rst_include/scylla-commands-start-index.rst
.. include:: /rst_include/scylla-commands-restart-index.rst

Literal include¶

If the file you want to include is not restructuredText, you can use the Literal Include directive. This adds the page cited as a code-block.

For example:

.. literalinclude:: ../conf.py
   :lines: 1-10

Gets the conf.py file from the parent directory and displays the first 10 lines.

# -*- coding: utf-8 -*-
import os
import sys
import warnings
from datetime import date

from sphinx_scylladb_theme.utils import multiversion_regex_builder

sys.path.insert(0, os.path.abspath(".."))

Was this page helpful?

PREVIOUS
Images
NEXT
Labels
  • Create an issue
  • Edit this page

On this page

  • Includes
    • Literal include
ScyllaDB Sphinx Theme
  • 1.8
    • 1.8
    • 1.7
    • 1.6
    • 1.5
    • 1.4
    • 1.3
    • 1.2
    • 1.1
  • Getting started
    • Toolchain
    • Installation
    • Quickstart
  • Configuration
    • Template options
    • Page options
    • Multiversion options
    • Markdown support
    • Redirects support
    • AI chatbot support (beta)
    • Search support
    • Dependabot support
  • Commands
  • Deployment
    • Production deployment
    • Pull requests previews
    • Centralized publication
  • Examples
    • Admonitions
    • Alert
    • Collapse
    • Code blocks
    • Diagrams
    • Glossary
    • Headings
    • Hero box
    • Icons
    • Images
    • Includes
    • Labels
    • Links
    • Lists
    • Mascots
    • Panel box
    • Substitutions
    • Tables
    • Tabs
    • Text
    • TOC
    • Tooltips
    • Topic box
    • Versions
  • Upgrade guides
    • Upgrading from 1.7 to 1.8
    • Upgrading from 1.6 to 1.7
    • Upgrading from 1.5 to 1.6
    • Upgrading from 1.4 to 1.5
    • Upgrading from 1.3 to 1.4
    • Upgrading from 1.2 to 1.3
    • Upgrading from 1.1 to 1.2
    • Upgrading from 1.0 to 1.1
    • Upgrading from 0.x to 1.0
    • Changelog
  • Contribute
    • Contribute to the documentation
    • Contribute to the theme
    • Source Code
Docs Tutorials University Contact Us About Us
© 2025 ScyllaDB | Terms of Service | Privacy Policy | ScyllaDB, and ScyllaDB Cloud, are registered trademarks of ScyllaDB, Inc.
Last updated on 09 May 2025.
Powered by Sphinx 7.4.7 & ScyllaDB Theme 1.8.6
Ask AI