-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Improve the "Markdown Options" Docs #8681
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
Conversation
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentbacklink EOLTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the git@github.com:mkasberg/jekyll.git repository
If you see a bunch of garbageIf it relates to a ... well-formed patternSee if there's a pattern that would match it. If not, try writing one and adding it to the Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines. Note that patterns can't match multiline strings. binary-ish stringPlease add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
It seems the Markdown Options docs have become out of date, as noted in jekyll#8593. The docs most likely became out of date when Kramdown was updated to v2, as described in these release notes: https://jekyllrb.com/news/2020/08/05/jekyll-3-9-0-released/. Initially, I intended to fix the specific issue about `gfm_quirks` noted in jekyll#8593, but after digging a little deeper to figure out the correct way to use that option, it became apparent that other parts of the Markdown Options Jekyll docs were also outdated and the whole page needed to be updated to be more accurate and more useful for modern versions of Jekyll. So, with that in mind, here's an overview of the changes I'm proposing: * Adjust the page headings. `Kramdown` should be an `h2` and the Kramdown sub-headings should be `h3`. * Document modern config for the GFM parser via `input: GFM`. * Link to the CodeRay docs and provide an example of the correct `syntax_highlighter` config with `syntax_highlighter_opts`. * Link to the options supported by Kramdown and provide an example of their usage. * Remove the list of all the relatively advanced Kramdown options supported by Jekyll, directing users instead to the Kramdown docs. At a high level, this is a move away from attempting to document every supported Kramdown option on this page and a move toward linking to up-to-date documentation for the various gems we support. The old docs were outdated, and not as useful as the docs provided by individual gems because the Jekyll docs didn't provide thorough descriptions as the [Kramdown docs](https://kramdown.gettalong.org/options.html) do. I think my proposed change captures a good balance of showing example usage in Jekyll while still relying on the gems we depend on to provide thorough descriptions of the supported options.
24f5a4d
to
868c816
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
Mike Kasberg: Improve the "Markdown Options" Docs (#8681) Merge pull request 8681
I recently merged jekyll#8681 to improve the Jekyll docs for markdown options. While researching that, I noted that the `kramdown-parser-gfm` gem is required by default in Jekyll, but I didn't dig further as to why. After jekyll#8681 merged, I was curious about why `kramdown-parser-gfm` is required by default, and I followed up on digging into it. As it turns out, this GFM parser is required by default because Jekyll uses GFM by default. This is clear from the [default config docs](https://jekyllrb.com/docs/configuration/default/) and the code: https://github.com/jekyll/jekyll/blob/76517175e700d80706c9139989053f1c53d9b956/lib/jekyll/configuration.rb#L67-L72 Although this is outlined in the default configuration docs, other parts of the docs don't do a good job making it clear that GFM is actually the default behavior. My recent docs change in jekyll#8681 made this problem worse since I used a bunch of config in my examples that's actually just default config. In this PR, I'm addressing that problem by modifying my update to the Markdown Options docs to clearly note that GFM is the default parser. I'm also updating a tutorial that implied GFM isn't the default. I've searched this repo for "GFM" and I'm pretty confident I've found all the problematic docs.
I recently merged jekyll#8681 to improve the Jekyll docs for markdown options. While researching that, I noted that the `kramdown-parser-gfm` gem is required by default in Jekyll, but I didn't dig further as to why. After jekyll#8681 merged, I was curious about why `kramdown-parser-gfm` is required by default, and I followed up on digging into it. As it turns out, this GFM parser is required by default because Jekyll uses GFM by default. This is clear from the [default config docs](https://jekyllrb.com/docs/configuration/default/) and the code: https://github.com/jekyll/jekyll/blob/76517175e700d80706c9139989053f1c53d9b956/lib/jekyll/configuration.rb#L67-L72 Although this is outlined in the default configuration docs, other parts of the docs don't do a good job making it clear that GFM is actually the default behavior. My recent docs change in jekyll#8681 made this problem worse since I used a bunch of config in my examples that's actually just default config. In this PR, I'm addressing that problem by modifying my update to the Markdown Options docs to clearly note that GFM is the default parser. I'm also updating a tutorial that implied GFM isn't the default. I've searched this repo for "GFM" and I'm pretty confident I've found all the problematic docs.
I recently merged jekyll#8681 to improve the Jekyll docs for markdown options. While researching that, I noted that the `kramdown-parser-gfm` gem is required by default in Jekyll, but I didn't dig further as to why. After jekyll#8681 merged, I was curious about why `kramdown-parser-gfm` is required by default, and I followed up on digging into it. As it turns out, this GFM parser is required by default because Jekyll uses GFM by default. This is clear from the [default config docs](https://jekyllrb.com/docs/configuration/default/) and the code: https://github.com/jekyll/jekyll/blob/76517175e700d80706c9139989053f1c53d9b956/lib/jekyll/configuration.rb#L67-L72 Although this is outlined in the default configuration docs, other parts of the docs don't do a good job making it clear that GFM is actually the default behavior. My recent docs change in jekyll#8681 made this problem worse since I used a bunch of config in my examples that's actually just default config. In this PR, I'm addressing that problem by modifying my update to the Markdown Options docs to clearly note that GFM is the default parser. I'm also updating a tutorial that implied GFM isn't the default. I've searched this repo for "GFM" and I'm pretty confident I've found all the problematic docs.
This is a 🔦 documentation change.
Summary
It seems the Markdown Options docs have become out of date, as noted in
#8593. The docs most likely
became out of date when Kramdown was updated to v2, as described in
these release notes:
https://jekyllrb.com/news/2020/08/05/jekyll-3-9-0-released/.
Initially, I intended to fix the specific issue about
gfm_quirks
notedin #8593, but after digging a little deeper to figure out the correct
way to use that option, it became apparent that other parts of the
Markdown Options Jekyll docs were also outdated and the whole page
needed to be updated to be more accurate and more useful for modern
versions of Jekyll.
So, with that in mind, here's an overview of the changes I'm proposing:
Kramdown
should be anh2
and theKramdown sub-headings should be
h3
.input: GFM
.syntax_highlighter
config withsyntax_highlighter_opts
.their usage.
supported by Jekyll, directing users instead to the Kramdown docs.
At a high level, this is a move away from attempting to document every
supported Kramdown option on this page and a move toward linking to
up-to-date documentation for the various gems we support. The old docs
were outdated, and not as useful as the docs provided by individual gems
because the Jekyll docs didn't provide thorough descriptions as the
Kramdown docs do. I think
my proposed change captures a good balance of showing example usage in
Jekyll while still relying on the gems we depend on to provide thorough
descriptions of the supported options.
Context
Fixes #8593