为知笔记发布到博客园格式问题解决

为知的Markdown笔记发布到博客园后格式发生问题,需要在我的博客->管理->设置->页面定制CSS代码中输入为知笔记自身的CSS

image-20200623131615426

解决目录和代码高亮的CSS格式如下


css代码
.hljs {
display: block; padding: 0.5em;
background: #F0F0F0;
}
.hljs,
.hljs-subst,
.hljs-tag .hljs-title,
.lisp .hljs-title,
.clojure .hljs-built_in,
.nginx .hljs-title {
color: black;
}
.hljs-string,
.hljs-title,
.hljs-constant,
.hljs-parent,
.hljs-tag .hljs-value,
.hljs-rules .hljs-value,
.hljs-rules .hljs-value .hljs-number,
.hljs-preprocessor,
.hljs-pragma,
.haml .hljs-symbol,
.ruby .hljs-symbol,
.ruby .hljs-symbol .hljs-string,
.hljs-aggregate,
.hljs-template_tag,
.django .hljs-variable,
.smalltalk .hljs-class,
.hljs-addition,
.hljs-flow,
.hljs-stream,
.bash .hljs-variable,
.apache .hljs-tag,
.apache .hljs-cbracket,
.tex .hljs-command,
.tex .hljs-special,
.erlang_repl .hljs-function_or_atom,
.asciidoc .hljs-header,
.markdown .hljs-header,
.coffeescript .hljs-attribute {
color: #800;
}
.smartquote,
.hljs-comment,
.hljs-annotation,
.hljs-template_comment,
.diff .hljs-header,
.hljs-chunk,
.asciidoc .hljs-blockquote,
.markdown .hljs-blockquote {
color: #888;
}
.hljs-number,
.hljs-date,
.hljs-regexp,
.hljs-literal,
.hljs-hexcolor,
.smalltalk .hljs-symbol,
.smalltalk .hljs-char,
.go .hljs-constant,
.hljs-change,
.lasso .hljs-variable,
.makefile .hljs-variable,
.asciidoc .hljs-bullet,
.markdown .hljs-bullet,
.asciidoc .hljs-link_url,
.markdown .hljs-link_url {
color: #080;
}
.hljs-label,
.hljs-javadoc,
.ruby .hljs-string,
.hljs-decorator,
.hljs-filter .hljs-argument,
.hljs-localvars,
.hljs-array,
.hljs-attr_selector,
.hljs-important,
.hljs-pseudo,
.hljs-pi,
.haml .hljs-bullet,
.hljs-doctype,
.hljs-deletion,
.hljs-envvar,
.hljs-shebang,
.apache .hljs-sqbracket,
.nginx .hljs-built_in,
.tex .hljs-formula,
.erlang_repl .hljs-reserved,
.hljs-prompt,
.asciidoc .hljs-link_label,
.markdown .hljs-link_label,
.vhdl .hljs-attribute,
.clojure .hljs-attribute,
.asciidoc .hljs-attribute,
.lasso .hljs-attribute,
.coffeescript .hljs-property,
.hljs-phony {
color: #88F
}
.hljs-keyword,
.hljs-id,
.hljs-title,
.hljs-built_in,
.hljs-aggregate,
.css .hljs-tag,
.hljs-javadoctag,
.hljs-phpdoc,
.hljs-yardoctag,
.smalltalk .hljs-class,
.hljs-winutils,
.bash .hljs-variable,
.apache .hljs-tag,
.go .hljs-typename,
.tex .hljs-command,
.asciidoc .hljs-strong,
.markdown .hljs-strong,
.hljs-request,
.hljs-status {
font-weight: bold;
}
.asciidoc .hljs-emphasis,
.markdown .hljs-emphasis {
font-style: italic;
}
.nginx .hljs-built_in {
font-weight: normal;
}
.coffeescript .javascript,
.javascript .xml,
.lasso .markup,
.tex .hljs-formula,
.xml .javascript,
.xml .vbscript,
.xml .css,
.xml .hljs-cdata {
opacity: 0.5;
}
pre {
font-size: 13px;
}
pre, code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
word-wrap: break-word;
}
.pln {
color: #48484C; }
.str {
color: #DD1144; }
.kwd {
color: #1E347B; }
.com {
color: #93A1A1; }
.typ {
color: teal; }
.lit {
color: #195F91; }
.pun {
color: #93A1A1; }
.opn {
color: #93A1A1; }
.clo {
color: #93A1A1; }
.tag {
color: #008; }
.atn {
color: teal; }
.atv {
color: #DD1144; }
.dec {
color: teal; }
.var {
color: teal; }
.fun {
color: #DC322F; }
/* Put a border around prettyprinted code snippets. /
pre.prettyprint {
background-color: #F7F7F9;
padding: 0px;
border: 1px solid #E1E1E8;
tab-size: 4; }
pre.prettyprint.linenums {
overflow: auto;
-webkit-overflow-scrolling: touch;
}
/
Specify class=linenums on a pre to get line numbering /
pre.prettyprint.linenums ol.linenums {
box-shadow: 40px 0 0 #FBFBFC inset, 41px 0 0 #ECECF0 inset;
color: #1E347B;
padding: 10px 10px 10px 40px !important;
margin-top: 0;
margin-bottom: 0;
}
pre.prettyprint.linenums ol.linenums li {
color: #BEBEC5;
line-height: 18px;
padding-left: 12px !important;
}
pre.prettyprint.linenums ol.linenums li.L0,
pre.prettyprint.linenums ol.linenums li.L1,
pre.prettyprint.linenums ol.linenums li.L2,
pre.prettyprint.linenums ol.linenums li.L3,
pre.prettyprint.linenums ol.linenums li.L4,
pre.prettyprint.linenums ol.linenums li.L5,
pre.prettyprint.linenums ol.linenums li.L6,
pre.prettyprint.linenums ol.linenums li.L7,
pre.prettyprint.linenums ol.linenums li.L8,
pre.prettyprint.linenums ol.linenums li.L9 {
list-style-type: decimal !important;
}
/
目录 */
.wiz_toc_layer {
background: #F9F9F5;
padding: 20px 25px;
word-break: break-word;
}

.wiz_toc {
text-decoration: none;
display: inline-block;
line-height: 27px;
}
.wiz_toc:hover{
text-decoration: underline;
}
.wiz_toc.h1 {
margin-left: 0;
}
.wiz_toc.h2 {
margin-left: 20px;
}
.wiz_toc.h3 {
margin-left: 40px;
}
.wiz_toc.h4 {
margin-left: 60px;
}
.wiz_toc.h5 {
margin-left: 80px;
}
.wiz_toc.h6 {
margin-left: 100px;
}

猜你喜欢

转载自www.cnblogs.com/yyjjtt/p/13181613.html
今日推荐