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

Update to Jekyll 4.x (kramdown) or move away? #71

Open
aureliojargas opened this issue Oct 5, 2020 · 1 comment
Open

Update to Jekyll 4.x (kramdown) or move away? #71

aureliojargas opened this issue Oct 5, 2020 · 1 comment

Comments

@aureliojargas
Copy link
Owner

aureliojargas commented Oct 5, 2020

I use redcarpet as the Markdown processor in my website:

aurelio.net/_config.yml

Lines 16 to 19 in 2e4396d

markdown: redcarpet
redcarpet:
extensions: ["fenced_code_blocks", "autolink"]
# extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "strikethrough", "superscript"]

Unfortunatelly, it is not supported anymore in Jekyll 4.x, so I would have to migrate to kramdown instead.

But kramdown has some drawbacks:

  • URL autolinks are not supported and I use that extensively (it works fine in GitHub and in redcarpet). Having to expicitly add <> around every URL will be a pain.

  • My image plugin stopped working. Maybe it's just a matter of adjusting regexes (see the ending /> in the new code).

    -<p class="image"><img src="img/moneylog.jpg" alt=""></p>
    +<p><img src="img/moneylog.jpg" alt="" /></p>
    
    -<p class="figure"><img src="/wp/wp-content/uploads/2012/05/ringtones-itunes.png" alt="Toques já adicionados ao iTunes"><span>Toques já adicionados ao iTunes</span></p>
    +<p><img src="/wp/wp-content/uploads/2012/05/ringtones-itunes.png" alt="Toques já adicionados ao iTunes" /></p>
  • It's good that some entities are converted to real chars (&quot;pronto&quot;“pronto”). But note that those are not plain quotes, but fancy quotes (" vs ).

  • It's good that automatic ids are made, but they are not sanitized as ASCII-only: <h2 id="compre-as-peças">Compre as peças</h2>

Note that I will also have to upgrade my local Ruby version, since macOS ship with an ancient one. brew install ruby solves it.

None of those is a deal breaker. It's just annoying to have this extra work because Jekyll keeps changing it's defaults and supported tools. It makes me wish for a different, stable tool. Also, the ruby/bundle setup always gets me puzzled. A python tool would be more familiar.

Also note that a year passed since 4.0.0 release (Aug 2019), but GitHub Pages still uses 3.x. Update in Oct 2022: three years have passed and it's still 3.x.

See also:

  • redcarpet must be pinned to 3.3.4: 8cb5d7b

References:

aureliojargas added a commit that referenced this issue Oct 5, 2020
This was the last version they are correctly using &amp; to escape &
inside `<a href>` URLs.

    -<a href="https://example.com/?foo=1&amp;bar=2">Foo</a>
    +<a href="https://example.com/?foo=1&bar=2">Foo</a>

BTW, redcarpet is not supported anymore in Jekyll 4.x. For the future,
I'll have to decide what to do. See issue #71.

Since I've updated some gems versions, the generated HTML code changed
a little on the syntax highlight for code blocks (due to new rouge
version).

As far as I saw, it did not brake anything noticeable.
@aureliojargas
Copy link
Owner Author

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

No branches or pull requests

1 participant