diff --git a/docs/configuration/yaml.rst b/docs/configuration/yaml.rst index 297ed975..3c669656 100644 --- a/docs/configuration/yaml.rst +++ b/docs/configuration/yaml.rst @@ -166,7 +166,8 @@ Examples Based on the three types explained above, quite complex data structures are possible (whitespace made visible to help track indentation): -.. code-block:: yaml +.. code-block-ext:: yaml + :whitespace: general: some_setting: some_value @@ -204,7 +205,8 @@ just playing a trick on you due to the list's dashes ``-`` being on the same lev also just add two more spaces to your identation and write that part like this, which makes the structure a bit clearer (whitespace again made visible to help track indentation): -.. code-block:: yaml +.. code-block-ext:: yaml + :whitespace: general: some_setting: some_value diff --git a/docs/features/custom_controls.rst b/docs/features/custom_controls.rst index f9cf81fb..0b18b704 100644 --- a/docs/features/custom_controls.rst +++ b/docs/features/custom_controls.rst @@ -24,7 +24,7 @@ The following example defines a control for enabling the cooling fan with a vari feedback evaluation for the result of the M114 "Get Position" gcode inside a section named "Reporting" and finally a GCODE script including user input. -.. code-block:: yaml +.. code-block-ext:: yaml controls: - name: Fan @@ -167,7 +167,7 @@ Controls additional input fields. ``command``/``commands`` may contain placeholders to be replaced by the values obtained from the user for the defined input fields: - .. code-block:: yaml + .. code-block-ext:: yaml name: Enable Fan command: M106 S%(speed)s @@ -226,9 +226,7 @@ Examples Parameterized GCODE Script .......................... -.. code-block:: yaml - :caption: Control definition in ~/.octoprint/config.yaml - :name: code-features-custom_controls-example-gcode_script-config_yaml +.. code-block-ext:: yaml name: Dance script: custom/dance.gco @@ -241,9 +239,7 @@ Parameterized GCODE Script min: 1 step: 1 -.. code-block:: jinja - :caption: ~/.octoprint/scripts/gcode/custom/dance.gco - :name: code-features-custom_controls-example-gcode_script-dance_gco +.. code-block-ext:: jinja {% set center_x = printer_profile.volume.width / 2 %} {% set center_y = printer_profile.volume.depth / 2 %} diff --git a/docs/plugins/concepts.rst b/docs/plugins/concepts.rst index a5405e81..b573cebe 100644 --- a/docs/plugins/concepts.rst +++ b/docs/plugins/concepts.rst @@ -140,8 +140,6 @@ property instead, manually instantiate your implementation instance and then add .. onlineinclude:: https://raw.githubusercontent.com/OctoPrint/Plugin-Examples/master/custom_action_command.py :linenos: :tab-width: 4 - :caption: `custom_action_command.py `_ - :name: sec-plugin-concepts-hooks-example .. seealso:: diff --git a/docs/plugins/hooks.rst b/docs/plugins/hooks.rst index 2a72a0af..f93a1758 100644 --- a/docs/plugins/hooks.rst +++ b/docs/plugins/hooks.rst @@ -24,7 +24,6 @@ octoprint.comm.protocol.action .. onlineinclude:: https://raw.githubusercontent.com/OctoPrint/Plugin-Examples/master/custom_action_command.py :linenos: :tab-width: 4 - :caption: `custom_action_command.py `_ :param object comm_instance: The :class:`~octoprint.util.comm.MachineCom` instance which triggered the hook. :param str line: The complete line as received from the printer, format ``// action:`` @@ -68,7 +67,6 @@ octoprint.comm.protocol.gcode .. onlineinclude:: https://raw.githubusercontent.com/OctoPrint/Plugin-Examples/master/rewrite_m107.py :linenos: :tab-width: 4 - :caption: `rewrite_m107.py `_ :param object comm_instance: The :class:`~octoprint.util.comm.MachineCom` instance which triggered the hook. :param str cmd: The GCODE command for which the hook was triggered. This is the full command as taken either @@ -105,7 +103,6 @@ octoprint.comm.protocol.scripts .. onlineinclude:: https://raw.githubusercontent.com/OctoPrint/Plugin-Examples/master/message_on_connect.py :linenos: :tab-width: 4 - :caption: `message_on_connect.py `_ :param MachineCom comm_instance: The :class:`~octoprint.util.comm.MachineCom` instance which triggered the hook. :param str script_type: The type of the script for which the hook was called, currently only "gcode" is supported here.