Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Markdown compatibility #58

Closed
eecs441staff opened this issue Jul 21, 2020 · 2 comments · Fixed by #59
Closed

GitHub Markdown compatibility #58

eecs441staff opened this issue Jul 21, 2020 · 2 comments · Fixed by #59
Labels
enhancement New feature or request

Comments

@eecs441staff
Copy link

eecs441staff commented Jul 21, 2020

Primer-spec doesn’t recognize ‘\’ as line-break marker, as GitHub Markdown does, requiring use of double spaces instead.

@eecs441staff eecs441staff added the enhancement New feature or request label Jul 21, 2020
@seshrs
Copy link
Member

seshrs commented Jul 22, 2020

Thanks for reporting @eecs441staff! I dug a bit deeper, and I have some good news, some bad news and a potential alternative.

Good news: It's very easy to enable GitHub Flavored MarkDown (GFM) for your site! Simply add a markdown: GFM option to your _config.yml so that it looks something like this:

remote_theme: eecs485staff/primer-spec
plugins:
    - jekyll-remote-theme

# The default MarkDown processor for Jekyll is actually 'kramdown'. Change to GFM if you prefer.
markdown: GFM

Bad news: If you make the change above, you will not be able to preview your site locally. It looks like Jekyll 3.8 has some bugs with the GFM parser dependency. It's fixed in Jekyll 4, but GitHub Pages hasn't upgraded their version of Jekyll yet. 😢


Alternative: I know this isn't a great alternative, but another way to force a line-break is to add two spaces at the end of the line. For example:

This is on line 1
and this is a continuation of that line. But if you add two spaces -->  
then this line gets broken!

Edit: Oops, looks like you knew this already.


I will update the Advanced Usage docs to explain how to use GFM on a Primer Spec site.

@eecs441staff
Copy link
Author

@seshrs the following:

remote_theme: eecs485staff/primer-spec
plugins:
    - jekyll-remote-theme
markdown: GFM

did it for me: \ now works as line-break when viewed on GitHub Pages.

Both Chrome and Safari immediately download my .md files, so I never had local preview anyway. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants