Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to re-use part of documentation in file. #7

Open
marsfan opened this issue Aug 14, 2020 · 0 comments
Open

Add ability to re-use part of documentation in file. #7

marsfan opened this issue Aug 14, 2020 · 0 comments
Labels
backend Code and configuration for thedocumentation backend enhancement New feature or request help wanted Extra attention is needed

Comments

@marsfan
Copy link
Owner

marsfan commented Aug 14, 2020

Doing this will allow for us to define a complextype at only one point in a RST file, and then reference it every time it is used throughout the XSD file. This will greatly reduce the size of documentation files and reduce mistakes.

Example:

Currently we have this in docs/FS2019/XML/light.rst:

.. element:: turnLightLeft

      Definition of left turn signal paramters.

      :attrib intensity: Brightness of the light source
      :attrib node: i3d node reference to the light source.

   .. element:: turnLightRight

      Defintion of right turn signal parameters.

      :attrib intensity: Brightness of the light source
      :attrib node: i3d node reference to the light source.

With re-useable chunks of text, we could simplify this in a way like this:

.. element:: turnLightLeft

      Definition of left turn signal paramters.

      .. useChunk:: lightAttribs

   .. element:: turnLightRight

      Defintion of right turn signal parameters.

      .. useChunk:: lightAttribs

   .. defineChunk:: lightAttribs
      
      :attrib intensity: Brightness of the light source
      :attrib node: i3d node reference to the light source.

The .. defineChunk directive would not add anything to the page, but would essentially be a way to define a variable that is used every time .. useChunk:: is used with the same string following it.

I have no clue how to implement this though, so for now, copy-paste it is.

@marsfan marsfan added enhancement New feature or request help wanted Extra attention is needed backend Code and configuration for thedocumentation backend labels Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Code and configuration for thedocumentation backend enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant