chanzuckerberg / napari-hub

Discover, install, and share napari plugins
MIT License
51 stars 18 forks source link

Plugin hub page description fails to include markdown titles #1320

Closed marcel-goldschen-ohm closed 3 months ago

marcel-goldschen-ohm commented 4 months ago

Description

Compare napari hub page (https://www.napari-hub.org/plugins/napari-cosmos-ts) with pypi (https://pypi.org/project/napari-cosmos-ts/) or GitHub (https://github.com/marcel-goldschen-ohm/napari-cosmos-ts) pages. The "Description" in the napari hub page pulls in the README.md from GitHub/pypi, but it ignores all of the section titles (e.g., napari-cosmos-ts, Install, Update, Run, User Guide). Is there a way to get the napari hub description to see those titles too, as without them the description is a bit confusing.

Expected Results

I expected the README.md file to generate a napari hub description including the section titles.

codemonkey800 commented 3 months ago

hey @marcel-goldschen-ohm, thank you for reporting this in. This is intentional because our Markdown component explicitly hides the headers for the plugin description:

https://github.com/chanzuckerberg/napari-hub/blob/036c1945b9f389836fe715bdec1ecf35ffd856a0/frontend/src/components/Markdown/Markdown.tsx#L82-L84

https://github.com/chanzuckerberg/napari-hub/blob/036c1945b9f389836fe715bdec1ecf35ffd856a0/frontend/src/components/PluginPage/PluginTabs.tsx#L108-L110

This only applies to H1 headers, so you could get your headers to show up by updating your README.md to use H2 ## instead of #

marcel-goldschen-ohm commented 3 months ago

Thanks @codemonkey800 , I'll switch to H2 headers.