mirror of
https://gh.wpcy.net/https://github.com/TGMPA/TGM-Plugin-Activation.git
synced 2026-07-14 10:56:39 +08:00
Jekyll 3.0 forces switching from Pygments to Rouge for code highlighting. Using the Rouge native linenr feature screws up the layout of our code samples - see screenshots below. This PR fixes that by: * turning off the Rouge line nr feature. * using Liquid to add empty linenr spans at the beginning of each line * using CSS with :before to add the actual line numbers This PR also includes some additional HTML source code compression, getting rid of extraneous new lines caused by Liquid parsing (outside of `<pre>` tags). Both the linenrs as well as the blank line removal can be turned on/off via a configuration feature in `_config.yml`. Additionally, the syntax highlight styling has been synced with the GH native syntax highlight styles. ##### How it used to display  ##### Display after switching to Rouge 
24 lines
No EOL
330 B
HTML
24 lines
No EOL
330 B
HTML
---
|
|
layout: compress
|
|
---
|
|
<!doctype html>
|
|
<html lang="en">
|
|
{% include header.html %}
|
|
|
|
{% include tweet-button.html %}
|
|
|
|
<h2>{{ page.title }}</h2>
|
|
|
|
{{ content }}
|
|
|
|
|
|
<section class="post-nav">
|
|
<p class="post-next">
|
|
<a href="{{ '/faq/' | prepend: site.tgmpa.url }}">FAQ Index</a>
|
|
</p>
|
|
</section>
|
|
|
|
|
|
{% include footer.html %}
|
|
|
|
</html> |