How to Create Horizontal Line in Markdown (Using Hexo Framework)

How to Create Horizontal Line in Markdown (Using Hexo Framework)

I'm using the hexo framework and tried adding "---" or "***" in my .md file to get a horizontal line to show up, but it's not working.

Also tried enabling gfm markdown in my _config.yml file:

marked: gfm: true pedantic: false sanitize: false tables: true breaks: true smartLists: true smartypants: true modifyAnchors: '' autolink: true

Any clues? Or is there a way to embed HTML tags to posts?

3

3 Answers

--- on a line by itself works for me.

I'm using the Icarus theme, which displays the separator as a dashed line:

As @Waylan commented, your CSS rules are probably preventing your horizonal line to display.

I've also found that preceding the --- line with a <br> line prevents the horizontal line from displaying.

tripledash --- has to precede and follow with empty lines to take effect like so


---

thus results in solid line in Markdown

I know this is old, but for anyone else that runs into this problem what worked for me was to use three underscores instead of three dashes.

___ vs. ---

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

James H. Sterling
Author

James H. Sterling

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.