How to blog code at wordpress.com [closed]

2019-01-29 20:04发布

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?

7条回答
Animai°情兽
2楼-- · 2019-01-29 20:35

See here: http://en.support.wordpress.com/code/posting-source-code/

Wrap your code in these tags: [sourcecode language='css'] .. [/sourcecode]

(or shorter [code lang='css'] .. [/code] )

Note that Visual Editor doesn't interpret the tags, you need to click Preview to see how it works.

Available language codes:

  • 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

Hope that helps.

查看更多
登录 后发表回答