Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Netlify deploy and real site deploy generate different HTML when converting code examples in Markdown #454

Open
platinumazure opened this issue Feb 9, 2018 · 4 comments
Labels
infrastructure Relates to the tools used to develop the website

Comments

@platinumazure
Copy link
Member

platinumazure commented Feb 9, 2018

For a code block in Markdown, we get two different HTML patterns on Netlify vs the real site.

Netlify:

<p class="incorrect icon">(snip)</p>
<div class="language-js highlighter-rouge">
    <pre class="highlight">
        /* code */
    </pre>
</div>
<div class="language-js highlighter-rouge">
    <pre class="highlight">
        /* code */
    </pre>
</div>

Real site:

<p class="incorrect icon">(snip)</p>
<div class="language-js highlighter-rouge">
    <div>
        <pre class="highlight">
            /* code */
        </pre>
    </div>
</div>
<div class="language-js highlighter-rouge">
    <div>
        <pre class="highlight">
            /* code */
        </pre>
    </div>
</div>

Note the extra <div> between the div.language-js and the pre.highlight.

This is causing the following CSS rules to work on Netlify but fail on the real site:

p.incorrect + div > pre, p.incorrect + div + div > pre, p.incorrect + div + div + div > pre {
}

p.correct + div > pre, p.correct + div + div > pre, p.correct + div + div + div > pre {
}
@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Feb 9, 2018
@j-f1
Copy link
Contributor

j-f1 commented Feb 9, 2018

Why not use Netlify for hosting the production site, too?

@platinumazure
Copy link
Member Author

@j-f1 Well, Netlify was originally just a proof-of-concept. I don't think we had any serious plans to use Netlify even for site previews, although I have used it as such in some of my recent pull requests here. I'm not opposed to using Netlify for production at this point.

I think what's really going on is, whatever we use in production is now generating different HTML, but the CSS rule was designed for the previous HTML (which is the same as what we now see on Netlify).

@j-f1
Copy link
Contributor

j-f1 commented Feb 9, 2018

The code block highlighting works on eslint.netlify.com.

My personal experience with Netlify has been that it’s kinda like the advanced version of GitHub Pages — if you want a basic Jekyll site with a *.github.io domain, then GitHub Pages is good, but Netlify is better for more complicated stuff.

@kaicataldo
Copy link
Member

Is this still an issue? Are we using Netlify? It looks like eslint.netlify.com is still being hosted.

@kaicataldo kaicataldo added infrastructure Relates to the tools used to develop the website and removed triage An ESLint team member will look at this issue soon labels Jun 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
infrastructure Relates to the tools used to develop the website
Projects
None yet
Development

No branches or pull requests

3 participants