cylc / cylc-ui

Web app for monitoring and controlling Cylc workflows
https://cylc.github.io
GNU General Public License v3.0
37 stars 27 forks source link

info view: markup support #1897

Open oliver-sanders opened 3 months ago

oliver-sanders commented 3 months ago

Add markup support to metadata in the "Info View".

Users can write metadata for their tasks/workflows. This metadata is displayed in the "Info View". Presently the view displays any metadata as plain text (newlines preserved). It would be nice to enable metadata to be written in a markup language (e.g. markdown or reStructuredText) for better display. Note, Rose has a utility for documenting an app in reStrucutredText so it would be useful to support this as an option.

This would require some mechanism to define the markup language in the workflow. Ideas:

[meta]
    markup = markdown
    description = """
        Foo **bar** [baz](https://cylc.org)!
    """

Or:

[meta]
    description = """markdown
        Foo **bar** [baz](https://cylc.org)!
    """

Or:

[meta]
    description = """
        Assume markdown.
        Foo **bar** [baz](https://cylc.org)!
    """
    _cylc-rose = """rest
        Unless stated otherwise.

         ..code-block::

            [template variables]
            FOO="foo"
    """