惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
T
Tailwind CSS Blog
Hugging Face - Blog
Hugging Face - Blog
Blog — PlanetScale
Blog — PlanetScale
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
Y
Y Combinator Blog
U
Unit 42
I
InfoQ
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
B
Blog RSS Feed
Vercel News
Vercel News
F
Fortinet All Blogs
Know Your Adversary
Know Your Adversary
T
Troy Hunt's Blog
博客园 - 【当耐特】
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
A
About on SuperTechFans
Jina AI
Jina AI
小众软件
小众软件
T
Threatpost
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
Scott Helme
Scott Helme
B
Blog
腾讯CDC
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
S
Schneier on Security
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
K
Kaspersky official blog
G
Google Developers Blog
T
Tor Project blog
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
Latest news
Latest news
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
罗磊的独立博客

博客园 - ☆磊☆

Win10 x64 + CUDA 10.0 + cuDNN v7.5 + TensorFlow GPU 1.13 安装指南 工作十一年总结 - ☆磊☆ - 博客园 Anaconda3 指南 Win Linux 双系统安装指南 OBS 录制视频 自己留存 - ☆磊☆ React Starter Kit 中文文档 - ☆磊☆ .NET Framework 系统版本支持表 Hyper-V和其他虚拟机共存 【转】 Docker入门03——Container Docker入门02——Dockerfile详解 Docker入门01——Image GORM 中文文档 - ☆磊☆ - 博客园 将以前的文章开始慢慢转到这里发表 环境变量 在 Linux 中安装 VMware Tools .gitignore 失效问题解决 Eclipse Aptana GAE Django HelloWorld 示例 TFS 迁移到 Git NLog 2.0.0.2000 使用实例
WordPress中使用Markdown和Syntax Highlighter
☆磊☆ · 2014-06-10 · via 博客园 - ☆磊☆

下载安装插件

  1. 在wordpress插件中安装WP Code Prettify
  2. PHP Markdown Extra 下载Extra,并上传安装到wordpress。
  3. Code Prettify themes 下载喜欢的样式,放到\wp-content\plugins\wp-code-prettify\css目录中。

修改样式

我使用的是Twenty Twelve样式

  1. 编辑style.css文件
    .entry-content pre, .comment-content pre 的样式内容剪切
    .entry-content pre code, .comment-content pre code中。
  2. 设置WP Code Prettify
    修改自定义样式代码如下:
.entry-content pre code { margin:5px; padding:10px; max-height:300px; overflow:auto; font-size:14px; border:1px solid #ccc;}

使用

代码部分必须使用如下方式添加

~~~.prettyprint
your code
~~~

或者如下

```{.prettyprint .lang-cs}
your code
```

修改PHP Markdown Extra插件支持html5

打开编辑页面搜索align

align="right"
align="center"
align="left"

对应修改为

style="text-align: right;"
style="text-align: center;"
style="text-align: left;"

posted @ 2014-06-10 16:57  ☆磊☆  阅读(3431)  评论()    收藏  举报