---------------------------------------------------------------------- This is the API documentation for the gdtest_code_include library. ---------------------------------------------------------------------- ## Classes Main classes provided by the package Widget(name: str) A configurable widget. Parameters ---------- name The widget name. ## Functions Utility functions run_widget(name: str, color: str = 'blue', size: int = 10) -> str Create, configure, and run a widget in one call. Parameters ---------- name The widget name. color Widget color. size Widget size. Returns ------- str The widget result string. ---------------------------------------------------------------------- This is the User Guide documentation for the package. ---------------------------------------------------------------------- ## Tutorials ### Code Includes This guide demonstrates the `include` shortcode, which lets you embed source files directly into your documentation pages. ## Basic Python Include The simplest usage includes an entire file with automatic language detection. The shortcode infers the language from the file extension. {{< include gdtest_code_include/examples/demo.py >}} ## Including a YAML File The `include` shortcode works with any text file type. Here we include a YAML configuration file, and the language is detected automatically from the `.yaml` extension. {{< include gdtest_code_include/examples/config.yaml >}} ## Selecting a Line Range You can include only specific lines from a file using the `lines` parameter. This is useful for highlighting a particular section without showing the entire file. {{< include gdtest_code_include/examples/demo.py lines="1-3" >}} ## Overriding the Language Sometimes a file extension doesn't match the highlighting you want. Use the `lang` parameter to override the auto-detected language. Here we display a Python file with R syntax highlighting instead. {{< include gdtest_code_include/examples/demo.py lang="r" >}}