The Wayback Machine - https://web.archive.org/web/20201129200152/https://github.com/github/pages-gem/issues/699
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

Markdown parser and settings appear to be outdated locally #699

Open
nickmccurdy opened this issue Jul 21, 2020 · 1 comment
Open

Markdown parser and settings appear to be outdated locally #699

nickmccurdy opened this issue Jul 21, 2020 · 1 comment

Comments

@nickmccurdy
Copy link

@nickmccurdy nickmccurdy commented Jul 21, 2020

Before submitting an issue, please be sure to

This issue affects

  • The site generated by GitHub Pages
  • Building sites locally

The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting seeking support in other forums.

What did you do (e.g., steps to reproduce)

index.md

<section>

# Heading

More...

</section>

What did you expect to happen?

Jekyll should use the same markdown parser and settings locally as GitHub Pages.

<section>
  <h1 id="heading">Heading</h1>
  <p>More…</p>
</section>

What happened instead?

Jekyll seems to incorrectly use its own default Kramdown parser instead of GFM CommonMark, and as a result cannot handle Markdown in HTML or smart ellipses.

<section>

# Heading

More...

</section>

Additional information

As a workaround, I guessed at what GitHub's Jekyll config was and ended up using this, which works the same with this example both locally and on GitHub Pages:

markdown: CommonMarkGhPages
commonmark:
  options: ["SMART"]

However, I think the gem should replicate this functionality automatically to keep local testing consistent with GitHub. I'm also not sure if I'm missing other options that may differ in both environments.

@0xdevalias
Copy link

@0xdevalias 0xdevalias commented Jul 22, 2020

Looking at the GFM spec and the commonmarker options (assuming they are up to date), it looks like there may be a few other things to be enabled too.

A few that seem likely..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.