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

Posts have a display problem #8

Open
ghost opened this issue Dec 12, 2017 · 7 comments
Open

Posts have a display problem #8

ghost opened this issue Dec 12, 2017 · 7 comments

Comments

@ghost
Copy link

ghost commented Dec 12, 2017

The posts are not displaying properly, with the class "class="highlight">".

For example : https://melangue.github.io/dactl/posts/yaml-frontmatter

@Grant3W
Copy link

Grant3W commented Jul 10, 2018

Getting the same issue here. Anyone managed to solve this?

@mrbvrz
Copy link

mrbvrz commented Aug 9, 2018

yeeaa... me too.. same issue. anyone can help?

@humbertowoody
Copy link

I think nobody has been able to fix this. Maybe I can dive in and try to fix it :)
Some guidance would be amazing tho, @melangue. Thanks in advance!

@humbertowoody
Copy link

Simple update, I have found that the error is actually a problem happening just during the GitHub Pages compilation process. In order to avoid this kind of error, you have to add a language specification on the code block. If you have any code block, just add the language after the final "`".

Hope this helps!

@kayoungk
Copy link

kayoungk commented Dec 4, 2018

Simple update, I have found that the error is actually a problem happening just during the GitHub Pages compilation process. In order to avoid this kind of error, you have to add a language specification on the code block. If you have any code block, just add the language after the final "`".

Hope this helps!

Hi! I have tried "python" and "py", ~~~python and ~~~py the problem still exists.

@humbertowoody
Copy link

humbertowoody commented Dec 6, 2018

Hi! Hmmm... What about using another language? I mean, right now I can't test if it's the issue, but there should be no difference between using Python and/or Javascript (or any other language) for rendering matters, but my site is using JS snippets and it seems to be working! How about specifying another language? Also, check if using something like javascript, js, text, txt or php it works, if not, let me know so I can dig into the code, I really want this issue to get fixed.

@humbertowoody
Copy link

So, for anyone interested, this isn't an issue with the template per sé, in fact, it is an issue with Rogue syntax highlighter and the HTML minification gem. I can't seem to find a way to fix this, but have found a workaround, instead of using ~~~python or any other normal markdown combination, use:

{% highlight c++ %}
int main() { return 0; }
{% endhighlight %}

This way, the line numbers get disabled. I can't tell exactly what is going on, but at least you can get your site working with this little hack. Probably this problem is a fault of outdated ruby plugins on Github Pages. Also, this issue is quite famous, you can read more about it here:

Hope this helps! @kayoungk :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants