0

Jekyll, pygments, I want to show the detail info about some code snippet: file name, related links, just as this:

{% highlight [language] [linenos] ["title"] [links] %}
.... code snippet ....
{% endhighlight %}

How can I achieve this? The ruby script is the last thing I want to do, for GitHub do not support it?

kenmux
  • 151
  • 1
  • 10
  • 1
    You can add those details outside the highlighted code block, [using the HTML element `
    ` for example](http://stackoverflow.com/questions/25881134/showing-file-name-in-jekyll-with-pygments-code-highlight).
    – approxiblue Aug 24 '15 at 05:36
  • No native support till now? When I try the solution from the link you give, the style is not the same as the code snippet displayed: the color, and extra indent... Also, please edit the answer below, let me close this, thanks! – kenmux Aug 24 '15 at 06:25
  • I also tried octopress before, and it achieved this feature, is there any magic? – kenmux Aug 24 '15 at 06:29
  • You were probably using the plugin [Codeblock](http://octopress.org/docs/plugins/codeblock/). I don't know if we can do the same with pygments, docs are scarce. I'm not sure which answer you're referring to. – approxiblue Aug 24 '15 at 06:37

0 Answers0