github / github/pages-gem

Markdown parser and settings appear to be outdated locally

Offen
#699 1 Kommentar 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Ruby
Sterne
1.9k
Forks
360
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Before submitting an issue, please be sure to

- [x] Read [the contributing instructions](https://github.com/github/pages-gem/blob/master/docs/CONTRIBUTING.md#contributing-to-the-github-pages-gem)
- [x] Update to the latest Gem version (run `bundle update github-pages`)

### This issue affects

- [ ] The site generated by GitHub Pages
- [x] 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](https://github.com/github/pages-gem/blob/master/docs/SUPPORT.md).*

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

`index.md`

```md

# Heading

More...

```

### What did you expect to happen?

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

```md

Heading


More…

```

### 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.

```md

# Heading

More...

```

### Additional information

* Link to the source repo (if applicable): https://github.com/nickmccurdy/eslint-config-modern/tree/2699a9c01e68535a3a087759cb11e5f82905db88/docs

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:

```yml
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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Reproduktion von index.md und vergleiche die lokale Ausgabe mit der erwarteten Ausgabe von GitHub Pages. Prüfe, wie das Gem den Markdown-Parser und die Einstellungen von Jekyll konfiguriert, und verwende dabei die CommonMarkGhPages-Workaround-Lösung als Ziel. Als abgeschlossen gilt die Aufgabe, wenn das lokale Rendering mit dem gezeigten HTML übereinstimmt, einschließlich Markdown innerhalb von HTML und typografischer Auslassungspunkte.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
jekyll, ruby
Bereich
build-system, tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.