-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Replace backticks within HTML blocks with HTML tags #5435
Conversation
This seems to make things more difficult to read. Why is the code block broken up between multiple I don't think I understand the problem being fixed here. |
I'm not in favour of using multiple Pro-Tip: Don't forget to preview your changes to /cc @jekyll/documentation |
Also, I'd suggest the title to be edited to : |
@ashmaroli Thank you; that is the part I was missing. Could we use the |
@pathawks, you're welcome. :) |
Thanks for your feedback on the PR everyone :) |
We no longer use {% highlight %} in Jekyll's site source, it was optioned and voted to start using triple backticks, this was done not too long ago, so unless you absolutely need highlight, you should properly space out your backticks and use those. |
@envygeeks, this is one such instance where I think we absolutely need to use |
@alexmalik, I tested your branch locally. This is the problem with using The best solution would hence be to manually code the blocks in HTML.
|
Looks like it's just a problem with CSS, not with the tag itself. |
@pathawks, like I mentioned above, the markup differs too: <figure class="highlight">
<pre>
<code class="language-ruby" data-lang="ruby">
<span></span>
</code>
</pre>
</figure> while <div class="language-ruby highlighter-rouge">
<pre class="highlight">
<code>
<span></span>
</code>
</pre>
</div> |
@ashmaroli Kramdown has a mechanism for parsing Markdown inside of HTML. If you wrap it with something like a <div markdown="1">
triple backtick code bloc
</div> Still doesn't fix the CSS that will likely need to be adjusted for |
niceee.. 👍 |
the use of this attribute allows kramdown to parse markdown within HTML elements. More info can be found here: http://kramdown.gettalong.org/syntax.html#html-blocks Thanks: - @alexmalik (https://github.com/alexmalik) for starting the pull request at jekyll#5435 which highlighted the issue and led to this. - Michael Rose (https://github.com/mmistakes) for bringing this attribute to my attention.
the use of this attribute allows kramdown to parse markdown within HTML elements. More info can be found here: http://kramdown.gettalong.org/syntax.html#html-blocks Thanks: - @alexmalik for starting the pull request at jekyll#5435 which highlighted the issue and led to this. - Michael Rose (@mmistakes) for bringing this attribute to my attention.
It looks like GFM doesnt work like kramdown in this regard too.. Confused? @alexmalik : you're welcome to |
@alexmalik, the reason we decided to use |
@ashmaroli it looks ok to me, the slightly darker background of the code blocks is removed, improving the uniformity. Is this ok? |
@alexmalik, the page at jekyllrb looks 👍 the page on your branch..the page on mine.. |
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.
now its proper 👍
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.
Thank you so much for working on this.
My only concern is that I would like to see Markdown style links ([]()
) used instead of HTML links (<a href="">
)
Everything else looks good to me 👍
##### Use the `github-pages` gem | ||
|
||
Our friends at GitHub have provided the | ||
<a href="https://github.com/github/pages-gem">github-pages</a> |
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.
Can we make this a Markdown style link?
[github-pages](https://github.com/github/pages-gem)
|
||
If you like to install <code>pages-gem</code> on Windows you can find instructions by Jens Willmer on <a href="http://jwillmer.de/blog/tutorial/how-to-install-jekyll-and-pages-gem-on-windows-10-x46#github-pages-and-plugins">how to install github-pages gem on Windows (x64)</a>. | ||
</p> | ||
If you like to install `pages-gem` on Windows you can find instructions by Jens Willmer on <a href="http://jwillmer.de/blog/tutorial/how-to-install-jekyll-and-pages-gem-on-windows-10-x46#github-pages-and-plugins">how to install github-pages gem on Windows (x64)</a>. |
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.
Can we use a Markdown style link here as well?
hey @alexmalik sorry for not merging this sooner, could you rebase this please now that the docs have moved to |
I'll 👍 after a rebase! |
Prior to the change backticks were used in an attempt to create a code block. The problem is that inside block level HTML tags Markdown is not supported. I have replaced the backticks with a combination of HTML tags in order to approximately simulate the appearance of a code block. The docs suggest possible use of span tags in place of the surrounding div tags as a solution to getting the Markdown to render. I tried this but no success. This change improves the readers understanding of the information, because the reader doesn't have to make sense of raw markdown.
uses Kramdown with the markdown="1" attribute, as suggested by @mmistakes. This allows rendering of code blocks which are nested inside HTML tags.
as suggested by @ashmaroli
an empty div is necessary in order for the code blocks to render correctly when not displayed on the jekyllrb site.
Rebased 1b3cf68 onto |
Thanks everyone for helping fix this rendering issue. @jekyllbot: merge +site |
Thanks for your help everyone 👍 |
Setting a :
was enough for me to fix this. |
Prior to the change backticks were used in an attempt to create a
code block. The problem is that inside block level HTML tags Markdown
is not supported. I have replaced the backticks with a combination of
HTML tags in order to approximately simulate the appearance of a code
block. The docs suggest possible use of span tags in place of the
surrounding div tags as a solution to getting the Markdown to render.
I tried this but no success.
This change improves the readers understanding of the information,
because the reader doesn't have to make sense of raw markdown.