survivejs / site

survivejs.com
https://survivejs.com/
Other
68 stars 22 forks source link

Do not wrap aligned images in paragraphs in Markdown #110

Closed sapegin closed 6 years ago

sapegin commented 6 years ago

Example — book covers on landings:

<p>
  <figure><img src="/8f86c1d07d5536454690030cd1a10b53.png" alt="SurviveJS - Webpack" 
    class="front-cover" width="255" height="329" />
  <figcaption>SurviveJS - Webpack</figcaption></figure>
</p>
...

This creates undesired whitespace.

sapegin commented 6 years ago

We could probably extract book covers into React.

bebraw commented 6 years ago

The wrapping comes from the Markdown parser likely. Here's how to do it: https://github.com/GraphQLFinland/site/blob/master/components/Markdown.js . That solution needs to grow to fit the needs of this site, though.

sapegin commented 6 years ago

I mean it doesn't make much sense to put cover into Markdown on landings if we override how they look anyway.

bebraw commented 6 years ago

That's true. They can live outside of Markdown for sure.