Skip to content

Prototype a listing plugin to use where we display structured data and files in our docs #41

@choldgraf

Description

@choldgraf

We have a number of places where we use something like a listing plugin, ie, we take structured data and render it in a few standard ways. I think it'd be a helpful way to prototype and dogfood if we tried making a "listing plugin" that we re-use in these use-cases.

Implementation

It feels like there are roughly three major steps. I wonder if we could make each of these extensible in a lightweight way:

  • Load: Load data into a structured array of entries with standardized key/value pairs. E.g., load from YAML, load from glob + YAML metadata parsing. Future: load from function calls (e.g. github issues downloads)
  • Transform: Modify the structured array in various ways. For example, add a new column using the values of other columns for each entry, to be parsed as MyST.
  • Render: Convert a structured array into a structured output of MyST AST entries. For example, a list of cards with list entries populating the title/body/etc based on user configuration, a table output that just mirrors one or more columns from the structured array, or a simpler "list" style output for a more minimal style.

Ideally, we could implement the logic in three separable modules, with an easy/simple way to extend each one either by future improvements to this plugin, or by a plugin author that wanted to use the functionality of this plugin to create a new one (e.g. register a new type of Load function, and then just re-use the rest of the listing logic).

I don't think this would be too hard to implement here, but if it got really beefy or complex it might be worth having in a separate repo.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions