Sourcecode in Wordpress mit Syntaxhighlighter plus
Für Sourcecode in Wordpress gibt es auf den offiziellen wordpress plugin Seiten eine überschaubare Anzahl passender Plugins.
Ich habe mich für Syntaxhighlighter plus entschieden, da das auch mit der von debian 4 momentan unterstützten Wordpress-Version 2.0 zusammenarbeitet, und bin hochzufrieden damit.
Die Installation war problemlos, aber das Layout sah anfänglich etwas zerschossen aus, da sich das CSS des Highlighters nicht so recht mit dem style.css des default-Worpress Themes vertragen hat. Ein paar kleine Änderungen an letzterer Datei schaffen Abhilfe:
/* fixes the ugly margin around embeded code */
html>body .entry div.dp-highlighter li {
margin: 0;
}
/* removes the useless left-hand margin around highlighted code */
.entry div.dp-highlighter {
margin-left:0;
}
/* removes the useless right-hand margin from sourcecode lines */
.entry div.dp-highlighter .alt {
margin-right:0;
}
This entry was posted on Saturday, January 19th, 2008 at 16:16. Posted in: ubuntu, wordpress. You can follow any responses to this entry through the RSS 2.0feed. You can leave a response, or trackback from your own site.
