mystmd
mystmd copied to clipboard
Inconsistent treatment of `downloads` across themes
downloads were recently added to myst-frontmatter as a way to specify specific files / urls you want available as downloads from your MyST site. From a frontmatter validation point of view, these can be defined in project config or page frontmatter.
However, the two MyST site themes have different behavior:
article-theme centers the "project" around a single article; this theme only picks up downloads from the project config in myst.yml. (See here: https://github.com/executablebooks/myst-theme/blob/main/themes/article/app/components/Downloads.tsx#L22 - downloads come from project)
book-theme treats each article equally, so central project downloads are ignored, in favor of downloads defined in page frontmatter. (See here: https://github.com/executablebooks/myst-theme/blob/main/packages/frontmatter/src/FrontmatterBlock.tsx#L209 - downloads come from frontmatter)
Expected behavior
If I provide downloads in either place, they show up in either theme!
I had some conversations with @choldgraf on this, the project downloads are now shown in the book-theme unless you override them on the page. The article-theme needs to be updated I think still!
isn't it perfectly reasonable for different themes to have different behaviour? they are intended to build different things not to be interchangeable on a given set of content.
I can see why adding the central downloads to the book-theme makes sense, and that behaviour seems ok, but what would be the intended changes/behaviour on article-theme it incorporate page downloads?