-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This involves making them great. Some problems are the documentation shows examples that don't translate to markdown at all! Sometimes text transfers from them which makes it even worse. So figuring out how to generate great markdown files for these would be great. Once the basics are done this can go as far as we want on trying things out (ie auto screenshotting generated content examples to embed into LLMs.txt!?!)
API Reference pages are created in this function
def render_content(c):
"Renders content by type"
if isinstance(c, str): return render_md(c) # Strings are rendered as markdown
elif isinstance(c, EnumType): return enum_to_html_table(c) # Enums are rendered as tables
elif isinstance(c, FT): return c # FastHTML tags are rendered as themselves
elif isinstance(c, tuple): # Tuples are rendered as cards with source and output that can be flipped
extra_cls = c[2] if len(tuple(c)) == 3 else None
return create_flippable_card(c[0], c[1], extra_cls)
elif isinstance(c, Callable): # Callables are rendered as documentation via show_doc
return show_doc(c)
else: return cI suspect the right approach is to make a function like this for generating the markdown by having different types of things write different text, rather than trying to auto-convert after the fact.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request