Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glaucocustodio/pygment-it
A WordPress plugin for syntax highlighting using Pygments
https://github.com/glaucocustodio/pygment-it
pygments syntax-highlighting wordpress-plugin
Last synced: 20 days ago
JSON representation
A WordPress plugin for syntax highlighting using Pygments
- Host: GitHub
- URL: https://github.com/glaucocustodio/pygment-it
- Owner: glaucocustodio
- License: mit
- Created: 2014-03-18T17:07:41.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-09-27T15:06:33.000Z (over 10 years ago)
- Last Synced: 2023-03-26T02:24:00.963Z (almost 2 years ago)
- Topics: pygments, syntax-highlighting, wordpress-plugin
- Language: CSS
- Homepage:
- Size: 293 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Pygment It
==========A WordPress plugin for syntax highlighting using Pygments, though Pygments is not required to be installed.
By default, Pygment It will auto discover if Pygments is installed (through `command -v pygmentize`). If not, it will use http://pygments.appspot.com to highlight code (but without support for: highlighted lines, line numbers and line number to start).
Check out in WordPress Plugin Directory. Did you like it? Rate and star it!
Note: this plugin is an improved version
this.## Features
* Syntax-highlighted code cached as post metadata
* Admin panel to choose theme, default language and Pygments usage (local, external API or auto discover)
* Multiple themes available (github, monokai, railscasts, mustang, among others..)
* Support for `hl_lines` (highlighted lines), `linenos` (line numbers) and `linenostart` (line number to start) when using a local installation of Pygments## Installation
1. Clone this repo or upload its content to `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress## Usage
Through `code` shortcode.
##### Using default language set in admin:
[code]
# code here
[/code]##### Choosing language (all supported languages can be found here):
[code language="ruby"]
# Ruby language syntax highlighting
[/code]
##### Highlighting lines 2 and 3:
[code language="ruby" hl_lines="2 3"]
class PagesController < ApplicationController
def index
end
end
[/code]
##### Displaying lines, starting with 20:
[code linenos="table" linenostart="20"]
# code here
[/code]
## License
This projected is licensed under the terms of the MIT license.