mirror of
https://github.com/arsenetar/PrismHighlight.git
synced 2024-12-03 15:19:01 +00:00
Update README.md
Add language to code blocks for highlighting
This commit is contained in:
parent
dbe913f2e8
commit
03dbc1f963
10
README.md
10
README.md
@ -5,21 +5,21 @@ PrismHighlight
|
|||||||
Installation
|
Installation
|
||||||
-------------
|
-------------
|
||||||
To install the extension clone the source into your extensions directory:
|
To install the extension clone the source into your extensions directory:
|
||||||
~~~
|
~~~bash
|
||||||
cd /path/to/wiki/extensions
|
cd /path/to/wiki/extensions
|
||||||
git clone https://github.com/arsenetar/PrismHighlight.git
|
git clone https://github.com/arsenetar/PrismHighlight.git
|
||||||
~~~
|
~~~
|
||||||
Alternatively you may download the source via [zip](https://github.com/arsenetar/PrismHighlight/archive/master.zip).
|
Alternatively you may download the source via [zip](https://github.com/arsenetar/PrismHighlight/archive/master.zip).
|
||||||
|
|
||||||
To activate the extension open your `LocalSettings.php` file and add the following:
|
To activate the extension open your `LocalSettings.php` file and add the following:
|
||||||
~~~
|
~~~php
|
||||||
require_once("$IP/extensions/PrismHighlight/PrismHighlight.php");
|
require_once("$IP/extensions/PrismHighlight/PrismHighlight.php");
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
--------------
|
--------------
|
||||||
The following are the configuration options for the `Localsettings.php` file ( defaults shown ):
|
The following are the configuration options for the `Localsettings.php` file ( defaults shown ):
|
||||||
~~~
|
~~~php
|
||||||
/**
|
/**
|
||||||
* Theme to use
|
* Theme to use
|
||||||
* options: dark, funky, okaidia, tomoorrow, twilight, false ( default )
|
* options: dark, funky, okaidia, tomoorrow, twilight, false ( default )
|
||||||
@ -61,7 +61,7 @@ $wgPrismHighlightLanguages = array(
|
|||||||
Use
|
Use
|
||||||
----
|
----
|
||||||
To use the syntax highlighter in wiki markup create the following:
|
To use the syntax highlighter in wiki markup create the following:
|
||||||
~~~
|
~~~html
|
||||||
<source>
|
<source>
|
||||||
//[...]
|
//[...]
|
||||||
</source>
|
</source>
|
||||||
@ -76,7 +76,7 @@ Now the following parameters may be passed to the `<source>` tag:
|
|||||||
- `line-numbers` - used as a flag to specify line numbers should be used
|
- `line-numbers` - used as a flag to specify line numbers should be used
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
~~~
|
~~~html
|
||||||
<source lang=php data-start=29 line-numbers>
|
<source lang=php data-start=29 line-numbers>
|
||||||
foreach( $args as $key => $value ){
|
foreach( $args as $key => $value ){
|
||||||
switch ($key) {
|
switch ($key) {
|
||||||
|
Loading…
Reference in New Issue
Block a user