kramdown

Retain HTML Entities When Parsing Markdown

試著忘記壹切 提交于 2019-12-06 14:29:48
I have exhausted my research and tried many methods to no effect and am hoping I'm overlooking some kind of simple solution: I am using a Jekyll site to produce HTML files for e-mail and need to use HTML entities for special characters (such as em-dashes and smart quotes) in order to avoid improper symbol interpretation (the content-type/charset is at times stripped out of the e-mail head due to complexities I won't get into here.) My problem is that parsing my Markdown appears to convert all of my written HTML entities into the special characters when output as HTML, and I am unable to escape

Defining footnote location with Kramdown/Jekyll

僤鯓⒐⒋嵵緔 提交于 2019-12-06 11:36:22
问题 I have a Jekyll blog that runs on kramdown 1.10, and I have tried to change the location of my footnote list to no avail. This is intended to go on a github-pages site, but doesn't work locally either. According to this issue, there is a way to add a footnote location elsewhere in your documents using Kramdown by defining a custom identifier that maps to a DOM object in your post. Particularly I have added this to my _config.yml kramdown: footnote_location: 'my_footnotes' and tried all of

Is it possible to generate a table of contents using kramdown in a page other than a post? If so, how?

穿精又带淫゛_ 提交于 2019-12-06 05:23:17
问题 The index page on my Jekyll site is meant to be exactly like a post with only one extra bit of code for navigating the other posts. I'm not really using it to generate a blog per se, but a bunch of press pages. Now within each post I am using kramdown to generate a table of contents like so: * This line is a placeholder to generate the table of contents {:toc} That works fine for all the posts, but when I try to use it on anything but a post, it doesn't generate. The output is simply empty.

Defining footnote location with Kramdown/Jekyll

巧了我就是萌 提交于 2019-12-04 15:17:59
I have a Jekyll blog that runs on kramdown 1.10, and I have tried to change the location of my footnote list to no avail. This is intended to go on a github-pages site, but doesn't work locally either. According to this issue , there is a way to add a footnote location elsewhere in your documents using Kramdown by defining a custom identifier that maps to a DOM object in your post. Particularly I have added this to my _config.yml kramdown: footnote_location: 'my_footnotes' and tried all of these variations atthe desired location in my layout: <ol id="my_footnotes" class="my_footnotes"></ol>

Is it possible to generate a table of contents using kramdown in a page other than a post? If so, how?

百般思念 提交于 2019-12-04 11:19:37
The index page on my Jekyll site is meant to be exactly like a post with only one extra bit of code for navigating the other posts. I'm not really using it to generate a blog per se, but a bunch of press pages. Now within each post I am using kramdown to generate a table of contents like so: * This line is a placeholder to generate the table of contents {:toc} That works fine for all the posts, but when I try to use it on anything but a post, it doesn't generate. The output is simply empty. It doesn't show the raw kramdown above or anything, it just disappears and nothing (especially not a TOC

Support for adding lazy load for images in Markdown

北城以北 提交于 2019-12-04 08:00:05
I'm using kramdown parser to convert markdown to html. I want to use lazy load for images without modifying original markdown syntax. I can achieve this by editing link.rb file in kramdown gems. But I don't want to follow this way. Because if anyone updating kramdown I'll lose these edits. Is there anyother way to do this without modifying original image syntax? Original Image Syntax: ![](some image link) Current Output (without above edit): <img src="some image link" alt=""/> Expected Output: <img data-src="some image link" alt=""/> You can mutate the resulting HTML using Nokogiri , this is

Table of contents using Jekyll and Kramdown

心已入冬 提交于 2019-12-03 12:16:12
I'm trying to use Kramdown's auto "Table of Contents" generator on a page (not a post) on my Jekyll site. _includes/toc.html <nav> <h4>Table of Contents</h4> {:toc} </nav> my_cool_stuff/my_cool_page.md --- layout: page --- {% include toc.html %} # The title of my page ## The Subtitle of my page The HTML is generated literally and I'm not getting a list of headers. <nav> <h4 class="toc_title">On This Page</h4> {:toc} </nav> What am I setting up wrong? {:toc} is kramdown tag for automatic Table of content generation . In your case, you need two more things to make it work : Allow kramdown to

How to prevent jekyll code running within markdown code blocks

老子叫甜甜 提交于 2019-12-02 10:33:16
问题 I was trying to add the following codes in a markdown code block on a Jekyll blog. However, the code within braces {% %} cannot be displayed. {% for post in site.categories.[page.category] %} {% if year != nyear %} <p>{{ year }}</p> {% endif %} Anybody know how to prevent the codes within {% %} running? (I'm using markdown: kramdown in my _config.yml file). 回答1: You can use the raw tag. {% raw %} {% for post in site.categories.[page.category] %} {% if year != nyear %} <p>{{ year }}</p> {%

Jekyll doesn't render Markdown when adding HTML

被刻印的时光 ゝ 提交于 2019-12-02 01:56:51
问题 I have this markdown code in a Markdown file. It has inline HTML. --- layout: page title: About This Website permalink: /about/ --- This website is built with <i class="fa fa-heart" style="color: #EEAAAA"></i>, [Jekyll](https://jekyllrb.com/), [LESS](http://lesscss.org/), [Gulp](http://gulpjs.com/), and a series of other [NPM builders](http://gulpjs.com/plugins/). It is hosted on [Github Pages](https://pages.github.com/). But when I wrap the stuff below the front matter with a <div> , the

Jekyll Syntax Highlighting Not Working - Classes Are Not Being Added

别说谁变了你拦得住时间么 提交于 2019-12-01 08:06:31
I cannot get syntax highlighting to work on my Jekyll-powered blog. The development files can be found here: https://github.com/StevenXL/stevenxl.github.io . As you can see, in my _config.yml file, I have the following: markdown: kramdown kramdown: syntax_highlighter: rouge In my css/custom.css file, I am importing the CSS file to highlight the syntax with an @import command. The actual CSS file for highlighting lives in css/monokai.css . I am not sure what I am doing wrong. This seems to work fine on my local preview when I run jekyll serve but not when I push the development files to GitHub