zhaohuabing / hugo-theme-cleanwhite

A clean, elegant blog theme for hugo
Apache License 2.0
730 stars 340 forks source link

bash代码块中显示异常 #79

Closed hzde0128 closed 4 years ago

hzde0128 commented 4 years ago

代码块cat > <<EOF显示在一行中,另外bash脚本解释器那块也显示不对, image

image 预期是这样子的: image

image

gainskills commented 4 years ago

can you share your md file? At least share the md content related to the bash code.

hzde0128 commented 4 years ago

eg:

cat > /usr/lib/systemd/system/logstash.service <<EOF
[Unit]
Description=logstash

[Service]
Type=simple
User=logstash
Group=logstash
EnvironmentFile=-/etc/default/logstash
EnvironmentFile=-/etc/sysconfig/logstash
ExecStart=/usr/local/logstash/bin/logstash "--path.settings" "/usr/local/logstash/config"
Restart=always
WorkingDirectory=/
Nice=19
LimitNOFILE=16384

[Install]
WantedBy=multi-user.target
EOF

btw: the theme has blackblock when using bash image

hzde0128 commented 4 years ago

I use ```bash, when using ``` instead, it's ok

gainskills commented 4 years ago

Checked my way to high light bash code. (I know ``_language_ was mentioned in markdown official document), but I highlight the code by ~~~bash` can you try it once?

image

Another thing is, please pay attention to the indent

hzde0128 commented 4 years ago

Checked my way to high light bash code. (I know ``_language_ was mentioned in markdown official document), but I highlight the code by ~~~bash`

can you try it once?

image

Another thing is, please pay attention to the indent

I tried ~~~bash,but it didn't work,here is my markdown file: ELKStack671-deploy.zip

gainskills commented 4 years ago

It works on my end. image

Please do some investigation from your side.

hzde0128 commented 4 years ago

hugo version's problem? my hugo version is v0.65.1:

hugo version
Hugo Static Site Generator v0.65.1-6BE6684CC linux/amd64 BuildDate: 2020-02-20T14:02:42Z

image

image

hzde0128 commented 4 years ago

when i use ``` instead of ```bash,it work fine.

image

image

zhaohuabing commented 4 years ago

CSS之间有些冲突,已经把highlight的css去掉了。使用Hugo自带的代码高亮就可以,如果缺省的深色主题不喜欢,可以在config.toml中更改主题。