问题描述
几天前在wordpress上有了一个新博客( http://ghads.wordpress.com )和我想要现在或之后发布一些代码片段.无论如何,无需支付额外的插件就可以使它看起来像代码?
got a new blog at wordpress few days ago (http://ghads.wordpress.com) and I want to post some code snippets now or then. Is there anyway to make it look like code without paying for extra plugins?
推荐答案
请参阅此处: http://en.support.wordpress.com/code/posting-source-code/
将您的代码包装在以下标记中:[sourcecode language ='css'] .. [/sourcecode]
Wrap your code in these tags: [sourcecode language='css'] .. [/sourcecode]
(或更短的[code lang ='css'] .. [/code])
(or shorter [code lang='css'] .. [/code] )
请注意,Visual Editor不会解释标记,您需要单击预览以查看其工作原理.
Note that Visual Editor doesn't interpret the tags, you need to click Preview to see how it works.
可用的语言代码:
- actionscript3
- 重击
- clojure
- 冷熔
- cpp
- csharp
- css
- delphi
- erlang
- fsharp
- 差异
- groovy
- html
- javascript
- java
- javafx
- matlab(仅关键字)
- objc
- perl
- php
- 文本
- powershell
- python
- r
- 红宝石
- 斯卡拉
- sql
- vb
- xml
- actionscript3
- bash
- clojure
- coldfusion
- cpp
- csharp
- css
- delphi
- erlang
- fsharp
- diff
- groovy
- html
- javascript
- java
- javafx
- matlab (keywords only)
- objc
- perl
- php
- text
- powershell
- python
- r
- ruby
- scala
- sql
- vb
- xml
希望有帮助.
这篇关于如何在wordpress.com上编写代码博客的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!