v3.ocaml.org-rescript icon indicating copy to clipboard operation
v3.ocaml.org-rescript copied to clipboard

Investigate MarkdownPage.Body component

Open rdavison opened this issue 4 years ago • 1 comments

The MarkdownPage.Body component seems to behave opposite to what I was expecting. The Storybook documents an example usage of the component here: https://github.com/ocaml/v3.ocaml.org/blob/0cfbd11730fc718efd56b673ae59e64a63f618fb/pages/storybook.res#L841-L861

It tests whether the component renders Markdown content or HTML content. As you can see in the screenshot below from the storybook page, it renders HTML content, but leaves the Markdown content untouched:

Screen Shot 2021-09-07 at 12 49 54 PM

Is this the correct behavior? Should we consider renaming this component?

rdavison avatar Sep 07 '21 16:09 rdavison

Should we consider renaming this component?

Markdown rendering has always happened at an earlier phase in page generation (either during getStaticProps or as part of a pre-build step), so the component should probably have been named "PrerenderedPage.Body."

ghost avatar Sep 07 '21 17:09 ghost