DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:codeprettify

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
plugin:codeprettify [2017-01-19 13:34] – [Code Prettifier Plugin] update date s.saharaplugin:codeprettify [2018-05-28 20:41] – [Installation] Klap-in
Line 6: Line 6:
 email      : sahara.satoshi@gmail.com  email      : sahara.satoshi@gmail.com 
 type       : syntax type       : syntax
-lastupdate : 2017-01-19 +lastupdate : 2018-05-02 
-compatible : Hrun, 2015-08-10, 2016-06-26+compatible : Hrun, 2015-08-10, 2016-06-26, 2017-02-19
 depends    :  depends    : 
 conflicts  conflicts 
Line 23: Line 23:
 ===== Installation ===== ===== Installation =====
  
-Install the plugin through the [[plugin:extension|Extension Manager]] or [[plugin:plugin|Plugin Manager]] using the download URL above, which points to latest version of the plugin. Refer to [[:plugin_installation_instructions|plugin installation instructions]].+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:plugin_installation_instructions|plugin installation instructions]].
  
 Note: After updated to 2015-09-12 release, you can remove older "google-code-prettify" subfolder in this plugin directory.  Note: After updated to 2015-09-12 release, you can remove older "google-code-prettify" subfolder in this plugin directory. 
Line 41: Line 41:
   * To specify language hint for Prettify, you can use \\ 1) ''%%<Code:ext>%%'' (file extension, you must put it just after "Code:" keyword) or \\ 2) ''%%<Code lang-ext>%%'' option.   * To specify language hint for Prettify, you can use \\ 1) ''%%<Code:ext>%%'' (file extension, you must put it just after "Code:" keyword) or \\ 2) ''%%<Code lang-ext>%%'' option.
   * For example, use ''%%<Code:css>%%'' or ''%%<Code lang-css>%%'' to specify that the code is Cascading Style Sheets (CSS).   * For example, use ''%%<Code:css>%%'' or ''%%<Code lang-css>%%'' to specify that the code is Cascading Style Sheets (CSS).
-  * use ''linenums'' option to turn on line numbering. To specify start line number, you can add a colon and the number to the end of the option, eg. ''linenums:12''.+  * use ''linenums'' or ''nolinenums'' option to turn on/off line numbering. You can add a colon and the number to the end of the option, eg. ''linenums:12'' to specify start line number.
   * If you want to add title for code block, you can specify it after ''|'' that will be shown just above the code box.   * If you want to add title for code block, you can specify it after ''|'' that will be shown just above the code box.
  
Line 64: Line 64:
 ^ Config key        ^ Description  ^ ^ Config key        ^ Description  ^
 |''override''       |override DokuWiki built-in syntax %%<code>%% for [[:wiki:syntax#Code Blocks]].| |''override''       |override DokuWiki built-in syntax %%<code>%% for [[:wiki:syntax#Code Blocks]].|
 +|''linenums''       |enable line numbering implicitly. |
 |''url_loader''     |url of prettify loader (default blank)\\ :!: obsoleted since 2015-09-12 release| |''url_loader''     |url of prettify loader (default blank)\\ :!: obsoleted since 2015-09-12 release|
 |''url_prettify_handlers''  |Base URL for prettify.js and optional language handler scripts\\ ex: %%https://cdn.rawgit.com/google/code-prettify/master/src/%% \\ (default blank)\\ :!: available in 2015-09-12 release  | |''url_prettify_handlers''  |Base URL for prettify.js and optional language handler scripts\\ ex: %%https://cdn.rawgit.com/google/code-prettify/master/src/%% \\ (default blank)\\ :!: available in 2015-09-12 release  |
Line 104: Line 105:
  
 ===== Discussion ===== ===== Discussion =====
 +
 +Using current dokuwiki theme and prettifyer with <Code linenums> does print a linenumber only on every fifth.
 +line.
 +
 +To solve just add
 +''.prettyprint ol.linenums > li { list-style-type: decimal; }''
 +to lib/plugins/codeprettify/all.css
  
  
  
  
plugin/codeprettify.txt · Last modified: 2023-12-04 19:42 by 2607:f8d8:2:1:dda3:ffb:6ae1:ebca

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki