Skip to content

Commit

Permalink
Update configuration.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Oct 2, 2024
1 parent 681ea42 commit 6b0eb1c
Showing 1 changed file with 0 additions and 165 deletions.
165 changes: 0 additions & 165 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2177,168 +2177,3 @@ See :ref:`runtime_debugging` for details.
To activate it, set it to ``True``::
needs_debug_measurement = True
Removed options
---------------
The following options are no longer supported in the latest versions of **Sphinx-Needs**.
.. _needs_template:
needs_template
~~~~~~~~~~~~~~
*removed: 0.3.0*
The layout of needs can be fully customized by using `jinja <http://jinja.pocoo.org/>`__.
If nothing is set, the following default template is used:
.. code-block:: jinja
.. _{{id}}:
{% if hide == false -%}
.. role:: needs_tag
.. role:: needs_status
.. role:: needs_type
.. role:: needs_id
.. role:: needs_title
.. rst-class:: need
.. rst-class:: need_{{type_name}}
.. dropdown::
:class: need
:needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}`
{%- if status and status|upper != "NONE" %}
| status: :needs_status:`{{status}}`
{%- endif -%}
{%- if tags %}
| tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`
{%- endif %}
| links incoming: :need_incoming:`{{id}}`
| links outgoing: :need_outgoing:`{{id}}`
{{content|indent(8) }}
{% endif -%}
Available jinja variables are:
* type
* type_name
* type_prefix
* status
* tags
* id
* links
* title
* content
* hide
.. warning::
You must add a reference like `.. _{{id}}:` to the template. Otherwise linking will not work!
.. _needs_template_collapse:
needs_template_collapse
~~~~~~~~~~~~~~~~~~~~~~~
*removed: 0.3.0*
Defines a template used for a need with active option **collapse**.
Default value:
.. code-block:: jinja
.. _{{id}}:
{% if hide == false -%}
.. role:: needs_tag
.. role:: needs_status
.. role:: needs_type
.. role:: needs_id
.. role:: needs_title
.. rst-class:: need
.. rst-class:: need_{{type_name}}
.. dropdown::
:class: need
:needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}`
:needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}`
{%- if status and status|upper != "NONE" %}
| status: :needs_status:`{{status}}`
{%- endif -%}
{%- if tags %}
| tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`
{%- endif %}
| links incoming: :need_incoming:`{{id}}`
| links outgoing: :need_outgoing:`{{id}}`
{{content|indent(4) }}
{% endif -%}
For more details please see :ref:`needs_template`.
.. _needs_hide_options:
needs_hide_options
~~~~~~~~~~~~~~~~~~
.. versionadded:: 0.3.0
*removed: 0.5.0*
.. note::
To remove options from output in **Sphinx-Needs** version >= ``0.5.0`` you must provide your own layout, which
does not include these options. See :ref:``layouts_styles`` for more information.
Can be used to hide specific options from general output in rendered document::
needs_hide_options = ['tags', 'global_option']
Works with local set options, extra options and global options.
Default value: ``['hidden']``
The ``hidden`` option is a globally available option, which is always hidden and
can be used to easily execute :ref:`dynamic_functions`.
Combined with :ref:`dynamic_functions` and :ref:`needs_global_options` this configuration can be used to perform
complex calculations in the background and hide any output.
.. _needs_collapse_details:
needs_collapse_details
~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 0.2.0
*removed: 0.5.0*
.. note::
Starting with version 0.5.0 the used :ref:`layout <layouts>` decides what the default behavior is.
To customize this behavior, you have to create your own :ref:`layout <layouts>`.
If true, need options like status, tags or links are collapsed and shown only after a click on the arrow close to the need title.
.. code-block:: python
# conf.py
needs_collapse_details = False
Default value: True
Can be overwritten for each single need by setting :ref:`need_collapse`.

0 comments on commit 6b0eb1c

Please sign in to comment.