S1SYPHOS / kirby-highlight

Themeable server-side syntax highlighting for Kirby
MIT License
14 stars 0 forks source link

Not working with kirby-2.5.12 #4

Open abhijitnandy opened 6 years ago

abhijitnandy commented 6 years ago

I've followed the steps as you've mentioned -

  1. Added kirby-pep and kirby-highlight plugins into /site/plugins/ directory

  2. Added zenburn.css by adding the following <?php echo css('assets/plugins/kirby-highlight/css/zenburn.css') ?> into

    site/snippets/header.php

  3. In site/config/config.php, I added the following:

    c::set(‘plugin.kirby-highlight’, true);
    c::set(‘plugin.kirby-highlight.languages’, [‘html’, ‘scss’, ‘php’, ‘css’, ‘javascript’]);
    c::set(‘plugin.kirby-pep’, true);
    c::set(‘plugin.kirby-pep.code_class’, ‘language-%s hljs’);

    into config.php

  4. Finally, in a blog article, I put this text:

```php \<\?php phpinfo(); ```

In my blog page, I get the output like this

&lt;div class="text"&gt;
&lt;p&gt;
&amp;lt;span class="php"&amp;gt;&amp;lt;span class="hljs-meta"&amp;gt;&amp;lt;?&amp;lt;/span&amp;gt;= $page-&amp;gt;children()-&amp;gt;visible() &amp;lt;span class="hljs-meta"&amp;gt;?&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/span&amp;gt; &lt;a href="http://kirby.localhost:1000/blog/kirby-highlight" class="article-more"&gt;read more&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;

I raised the issue in Kirby forum but those steps didn't help me either - Kirby Forum Link

S1SYPHOS commented 5 years ago

Does it work now, with help in the forum, or does your problem persist?

I released v0.6.0 just now, after upgrading you may drop kirby-pep plugin unless you're using it for something other than adding class hljs.