jekyll markdown bullet point issue - jekyll

I am editing my markdown in some online editor dillinger.io. Then copying the content into jekyll _posts. However, the jekyll is rendering on the browser differently that what I am seeing in above mentioned editor/github preview of the file.
The major problem I am facing is with the bullet points. I am not able to display bullet points with "*" or "-" markdown syntax. To display it using jekyll I need to use tag in markdown file. I have googled for long hours and used below configuration in _config.yml file to get the better output.
markdown: kramdown
kramdown:
input: GFM
But still it is not the one I am expecting. Below are the screenshots
Online editor and github preview are same as shown in the following URL -
But Jekyll is rendering as follows -
With the mentioned change in _config.yml file. It is better but still it does not display bullet points properly -
Some of the stackoverflow posts is saying that it is the issue with the default Jekyll markdown rendering engine.
Can you please suggest me what change do I need to make to get the same output as I see in github preview as mentioned in the following URL? -

The kramdown GFM parser only supports some Github Flavored Markdown options (see documentation)
In Jekyll you need two new lines before your list :
The list
- item 1
- item 2

Related

In Github when creating github.io profile what the difference of .md .html .rmd files?

I'm trying to create a github.io profile.
May I know the difference between of .md .html .rmd files?
For example, I see the same file name with different filetypes like
Readme.md vs Readme.html XXX.rmd vs XXX.html
github.io (aka Github pages) can create a website from either
html with optional css
Markdown files (.md and .rmd)
A combination of the above
It uses a set of tools called Jekyll and kramdown to translate markdown files into html to be displayed as part of the website.
Markdown files are a file format generally used for producing documentation in github on similar websites, and has a mopre streamlined syntax for that purpose than html. You can try it out at https://stackedit.io
The use of markdown for Github Pages is however completely optional and you may use only html if you wish. You can follow the guide at https://jmcglone.com/guides/github-pages show you how to make a github pages site with html. Stop when you get to the section Using Jekyll with GitHub Pages if you don't wish to incorporate any markdown.

How to change markdown style for github pages

If I wanted to use a specific github page theme, such as cayman, but wanted my markdown to look and be styled differently, say to be styled like the architect theme markdown, how would I do so? Essentially, is there a way for me to change the jekyll / kramdown markdown styling easily? Thanks.
In the Docu - Default Values you see the item markdown : kramdown inside _config.yml. Here you can change markdown renderer.
Some info can be found on the bottom of that page

How do I get HTML rendered as markdown via GitHub Pages?

I have a rather nasty, huge HTML document that I converted to markdown.
When I do the usual layout and view the .md file in GitHub via preview tab, it looks fine. However, when I serve it and view it on my actual site, it renders all the HTML tags.
I have tried using different markdown interpreters like redcarpet versus kramdown, to no avail.
How do I get a good markdown rendering of HTML similar to the GitHub behavior?
Link to repo (notice the clean GitHub Flaovred markdown)
This is not a markdown but a html document.
Rename it to test.html
Remove html and body tags
give it a :
---
layout: page
title: Test
permalink: /test2/
---
I've made a pull request that works to you repo.
Note: before pasting word html to the web you can clean it.

how to write a table of contents with jekyll and redcarpet

using jekyll 2.0.3,
I initially configured _config.yml with
markdown: kramdown
and I was able to add a table of contents as follows, in my example.md:
---
layout: page
title: Sample
---
{:toc}
## section 1
## section 2
however, I switched to redcarpet, see _config.yml:
markdown: redcarpet
redcarpet:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "strikethrough", "superscript", "with_toc_data"]
and now {:toc:} does not work.
The documentation of redcarpet v2.2.2 (used by jekyll 2.0.3):
https://github.com/vmg/redcarpet/blob/v2.2.2/README.markdown#and-its-like-really-simple-to-use
mentions :with_toc_data, but I don't where/how to use this.
how can i display the table of contents using redcarpet?
The problem here is that :with_toc_data is an option for an instance of the redcarpet renderer, and not a configuration extension.
Unfortunately, Jekyll doesn't seem to expose this renderer option, so I don't think you'll be able to use it. The docs say:
no renderer options aside from smart can be specified in Jekyll.
But you can use a table of contents jekyll plugin instead. A quick search returns a number of available options, and one is linked from the official Jekyll site.
Maybe this should work. Mention this in the _config.yml file.
markdown: redcarpet
redcarpet:
extensions: [with_toc_data]
I'm using markdown on my blog along with JQuery and a js file. This is how it looks like.
Here is the detailed guide on how to do it - Jekyll TOC

Jekyll on Github Pages: any way to add footnotes in Markdown?

I've recently switched over to using Jekyll on Github Pages for my various blogs, and love that I can just push Markdown to Github and they handle the processing. I'd like to continue using it this way (rather than running Jekyll locally and just pushing the pre-generated site to Github), since the Github UI makes it easy to add and tweak posts if I'm not at my own machine.
There's just one thing I haven't been able to figure out: I can't get Markdown footnotes working. I'm using this style:
I bet you'd like more information about this sentence [^1].
[^1]: Well lucky for you, I've included more information in footnote form.
I did find one post (somewhere) that suggested enabling a footnotes extension for the redcarpet markdown processor, but this doesn't do it either:
markdown: redcarpet
redcarpet:
extensions: ["footnotes"]
Is there any way to use Markdown footnotes without pre-generating the static site before pushing it to Github?
I use kramdown for markdown parsing and it handles footnotes nicely.
Change this line in your _config.yml file:
markdown: redcarpet
to:
markdown: kramdown
As of Jekyll 3.0.0, kramdown is the default Markdown processor, so the example in OP's question now works out of the box. The pattern is:
Some text[^1].
Some other text[^2].
The identifier in the square brackets does not have to be numeric[^my_footnote].
[^1]: Some footnote.
[^2]: Other footnote.
[^my_footnote]: This also works fine.
Update 3rd Jan. 2020:
GitHub has its own markdown processor GFM, which is an extension of CommonMark. Both kramdown and GFM can be used to render GitHub Flavored Markdown.
Footnotes are not yet supported by GitHub Flavored Markdown, which means the above examples do not render correctly in the GitHub code repository.
Kramdown is still the default Markdown renderer for Jekyll. With kramdown, the above examples render correctly on sites based on GitHub Pages.
Redcarpet
When you want to use redcarpet there seems to be no convenient solution right now.
Although Redcarpet 3 supports footnotes with the syntax you've used, it is not included into Jekyll, because Redcarpet 3 removes Ruby 1.8 compatibility (source).
Solution 1: Use forked Redcarpet 2
See this solution by Jerod Santo:
Add a file called Gemfile to the root of your Jekyll folder with this content:
source "https://rubygems.org"
gem "jekyll"
gem "redcarpet", github: "triplecanopy/redcarpet"
or alternatively djui/redcarpet
Theny adjust your _config.yml to
markdown: redcarpet
redcarpet:
extensions: [footnotes]
Solution 2: Fork Jekyll and include Redcarpet 3
I don't know what's the easiest way to do this. Comments are welcome.
Maruku
Seems to support footnotes (source, source).
I found that plugin for jekyll Github orangejulius/jekyll-footnotes. May it solve the issue.
Also I read just today an blog post that Github improves the footnotes.