All Projects → S1SYPHOS → kirby-highlight

S1SYPHOS / kirby-highlight

Licence: MIT license
Themeable server-side syntax highlighting for Kirby

Programming Languages

CSS
56736 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to kirby-highlight

field-engineer
A Kirby field for complex field structures.
Stars: ✭ 49 (+250%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
laravel-mix-kirby
Laravel Mix helper for Kirby
Stars: ✭ 23 (+64.29%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
kirby-minify-html
Enable minify HTML output for Kirby 3
Stars: ✭ 27 (+92.86%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
kirby-podcast
A KirbyCMS-Podcast-Plugin
Stars: ✭ 22 (+57.14%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
retour-for-kirby
Kirby 3 plugin to manage redirects and track 404s right from the Panel
Stars: ✭ 96 (+585.71%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
kirby-membership
Simple Membership plugin for Kirby CMS
Stars: ✭ 27 (+92.86%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
core
🌈 light, fast, and easy to use, dependencies free javascript syntax highlighter, with automatic language detection
Stars: ✭ 40 (+185.71%)
Mutual labels:  syntax-highlighting, highlighting, highlightjs
kirby-boiler-field
Boilerplate for Kirby form fields
Stars: ✭ 15 (+7.14%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
kirbyup
🆙 Zero-config bundler for Kirby Panel plugins
Stars: ✭ 33 (+135.71%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
kirby3-many-to-many-field
This plugin allows you to create many-to-many relationships between pages in Kirby and synchronizes them on both sides.
Stars: ✭ 38 (+171.43%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
search-for-kirby
Kirby 3 plugin for adding a search index (sqlite or Algolia).
Stars: ✭ 42 (+200%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
kirby-blade
Enable Laravel Blade Template Engine for Kirby 3
Stars: ✭ 20 (+42.86%)
Mutual labels:  kirby, kirby-cms, kirby-plugin
kirby-highlighter
🌐 Server-side syntax highlighting for the Kirby code block & KirbyText
Stars: ✭ 18 (+28.57%)
Mutual labels:  kirby, highlighting, kirby-plugin
sublime-coconut
Coconut syntax highlighting for Sublime Text and VSCode.
Stars: ✭ 18 (+28.57%)
Mutual labels:  syntax-highlighting, highlighting
highlightjs-badge
Addon component to highlightjs that lets you copy code snippets to the clipboard and displays the active syntax
Stars: ✭ 44 (+214.29%)
Mutual labels:  syntax-highlighting, highlightjs
CodeView
Android Library to make it easy to create an Code editor or IDE that support any languages and themes, with auto complete, auto indenting, snippets and more features
Stars: ✭ 254 (+1714.29%)
Mutual labels:  syntax-highlighting, highlighting
network tech
Cisco config syntax and snippets for Sublime Text
Stars: ✭ 82 (+485.71%)
Mutual labels:  syntax-highlighting, highlighting
rdocsyntax
Syntax highlighting for R HTML documentation
Stars: ✭ 20 (+42.86%)
Mutual labels:  syntax-highlighting, highlighting
6502-npp-syntax
Notepad++ Syntax Highlighting for 6502 Assembly (and NESASM)
Stars: ✭ 21 (+50%)
Mutual labels:  syntax-highlighting, highlighting
KodeEditor
A simple code editor with syntax highlighting and pinch to zoom
Stars: ✭ 60 (+328.57%)
Mutual labels:  syntax-highlighting, highlighting

Kirby Highlight

Release License Issues

This plugin highlights your code snippets server-side - without external dependencies.

  • Code highlighting for everyone - no javascript needed
  • Comprehensive: supports 176 languages
  • Customisable: 79 different styles included

screenshot of the kirby-highlight plugin

Table of contents

Getting started

Use one of the following methods to install & use kirby-highlight:

Git submodule

If you know your way around Git, you can download this plugin as a submodule:

git submodule add https://github.com/S1SYPHOS/kirby-highlight.git site/plugins/kirby-highlight

Composer

composer require S1SYPHOS/kirby-highlight:dev-composer

Clone or download

  1. Clone or download this repository.
  2. Unzip / Move the folder to site/plugins.

Activate the plugin

Activate the plugin with the following line in your config.php:

c::set('plugin.kirby-highlight', true);

Now proper classes are added to your code snippets, making them 'themeable'. In order to do so, head over to the styling section. If you want to activate kirby-highlight only on specific domains, read about multi-environment setups.

Configuration

Change kirby-highlight options to suit your needs:

Option Type Default Description
plugin.kirby-highlight.class String 'hljs' Sets class of surrounding pre container.
plugin.kirby-highlight.languages Array ['html', 'php'] Defines languages to be auto-detected (currently 176 languages are supported).
plugin.kirby-highlight.escaping Boolean false Enables character escaping (converting < to &lt;, > to &gt;, ..), see htmlspecialchars() docs.

Styling

All highlight.js styles are fully compatible with kirby-highlight. Just include it using the css() helper:

<?php echo css('assets/plugins/kirby-highlight/css/zenburn.css') ?>

Troubleshooting

If in doubt, check the correct spelling of the language in question - doing otherwise breaks kirbytext() (see #2).

Credits / License

kirby-highlight is based on Geert Bergman's highlight.php library (a PHP port of highlight.js). It is licensed under the MIT License, but using Kirby in production requires you to buy a license. Are you ready for the next step?

Special Thanks

I'd like to thank everybody that's making great software - you people are awesome. Also I'm always thankful for feedback and bug reports :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].