Linux 软件免费装

WPygments

开发者 capynet
更新时间 2014年3月27日 11:28
PHP版本: 3.3 及以上
WordPress版本: 3.8.1
版权: GPLv2 or later
版权网址: 版权信息

标签

syntax highlight

下载

1.0 1.1 1.1.1 1.1.2 1.1.3 1.1.4

详情介绍:

Installation: To use this plugin you need pygments in your server: sudo apt-get install python-setuptools easy_install Pygments That's all. Now you can download the plugin and install it in your Wordpress. Usage Once you get installed the plugin the usage is straightforward. just enclose your code between tokens named with the corresponding lang: [javascript]....[/javascript] [php]....[/php] See "Languages and filetypes supported" section to know available languages. Parameters Tokens support a few parameters (all optionals): [php style="manni" linenumbers="table"]....[/php] style="manni" defines code styling. Currently are 22 available styles. Default styling is default wich is very nice, but maybe you like other styles. see "Color styles" section. If you set "linenumbers" to inline or table, the line numbers will be added as independent table column or as part of the line. Examples [javascript] //comment line var foo = "foo"; var bar = function(){ var baz; } [/javascript] Outputs highlighted js with default style, and no line numbers. [javascript style="monokai" linenumbers="inline"] //comment line var foo = "foo"; var bar = function(){ var baz; } [/javascript] Outputs highlighted js with monokai style with line numbers (as part of the line). [javascript style="monokai" linenumbers="table"] //comment line var foo = "foo"; var bar = function(){ var baz; } [/javascript] Outputs highlighted js with monokai style with line numbers (as new column). Color styles These are supported color styles: Languages and filetypes supported Pygments not only highlights languages. also highlights filetypes like .conf Nginx configuration file, Apache (filenames .htaccess, apache.conf, apache2.conf), etc. NOTE: to use see "Usage" section important sdsd; General Javascript PHP Ruby CSS and CSS compilers HTML and HTML template systems SQL Python, jinja & Django Java && family C, C++, Objetive-c, C Sharp XML

安装:

To use this plugin you need pygments in your server: sudo apt-get install python-setuptools easy_install Pygments That's all. Now you can download the plugin and install it in your Wordpress.
  1. Upload the plugin to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
Once you get installed the plugin the usage is straightforward. just enclose your code between tokens named with the corresponding lang: [javascript]....[/javascript] [php]....[/php]

屏幕截图:

  • Example highlighted code
  • Another example highlighted code

常见问题:

A question that someone might have

An answer to that question.

更新日志:

1.1.3 1.1.2 1.1.1 1.1 1.0