React: Docs look weird on small widths

Created on 3 Jan 2017  路  7Comments  路  Source: facebook/react

Note the accidental top bar:

screen shot 2017-01-03 at 15 23 29

Is this a misplaced tag? Also can see this when any doc page is loading.

Most helpful comment

Just sent a PR with the same changes :)

All 7 comments

I would like to work on this. This is my first contribution to react, so help is welcome. :)

@karthikchintapalli

Cool! You can follow these instructions to get docs running locally:
https://github.com/facebook/react/blob/master/docs/README.md

Then you'll need to diagnose where the issue is coming from.

@gaearon Thank you! Will get back in case of more questions.

@gaearon Ok, I think I get the issue. In the markdown, The first few words of the content, "Create React App" are a link. So, when the html file is generated, the <meta property="og:description" content="" /> tag's content property has <a> tags within it. But, it's only supposed to take a string. This is happening to all blog posts with a link in the first few lines, because they get included in the description.

screen shot 2017-01-04 at 12 18 39 pm

@gaearon This is a fix I can think of. In docs/_layouts/default.html -

{% if page.excerpt %}
{% assign type = 'article' %}
{% assign sectionTitle = 'React Blog' %}
{% assign description = page.excerpt | remove: '<p>' | remove: '</p>' %}

To

{% if page.excerpt %}
{% assign type = 'article' %}
{% assign sectionTitle = 'React Blog' %}
{% assign description = page.excerpt | strip_html %}

This makes sense! Wanna send a PR?

Just sent a PR with the same changes :)

Was this page helpful?
0 / 5 - 0 ratings