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

GHP bad rendering on CONTRIBUTE & HOWTO (fa_IR locale) #5559

Closed
davorpa opened this issue Sep 27, 2021 · 5 comments · Fixed by #5810
Closed

GHP bad rendering on CONTRIBUTE & HOWTO (fa_IR locale) #5559

davorpa opened this issue Sep 27, 2021 · 5 comments · Fixed by #5810
Assignees
Labels
🐛 BUG Confirmed bugs, normally at GitHub Pages 👥 discussion This Repo is guided by its community! Let's talk! PR requested Issues that can be addressed with a new PR

Comments

@davorpa
Copy link
Member

davorpa commented Sep 27, 2021

Problem

It seems that Github Pages engine doesn't deal fine rendering links for this RTL resources:

It works well in other markdown files like books, courses... for the same locale.

Solution

Maybe due to some issue with the div tag:

این متن را در زبان‌های دیگر بخوانید: [English](HOWTO.md), [Français](HOWTO-fr.md), [Español](HOWTO-es.md), [简体中文](HOWTO-zh.md), [हिन्दी](HOWTO-hi.md), [繁體中文](HOWTO-zh-TW.md), [Português (BR)](HOWTO.pt_BR.md)
<div dir="rtl">
به Free-Programming-Books خوش آمدید! ما به مشارکت‌کنندگان جدید خوش‌آمد می‌گوییم. حتی آنهایی که اولین پول‌ریکوئست خود را در گیت‌هاب می‌گذارند. اگر شما هم یکی از آنهایید، منابع زیر می‌توانند به شما کمک کنند.

Need some experiments to deal with this tag, and maybe apply on listings too.

@davorpa davorpa added the PR requested Issues that can be addressed with a new PR label Sep 28, 2021
@davorpa davorpa self-assigned this Oct 1, 2021
@davorpa davorpa added the help wanted Needs help solving a blocked / stucked item label Oct 1, 2021
@charlottetan
Copy link
Contributor

Spent some time looking into this, it looks like Github's markdown and the <div dir="rtl"> aren't playing well together. To fix it, all of the markdown syntax will need to be changed to regular HTML tags instead of markdown, which include not just the links but also the headings 😧

Tests/examples - Only a couple of links and headings changed:
Code: https://github.com/charlottetan/free-programming-books/commits/master/CONTRIBUTING-fa_IR.md
Github page: https://charlottetan.github.io/free-programming-books/CONTRIBUTING-fa_IR.html

Screenshot with highlighting to show what got changed:
image

Somewhat related issue filed on Github's markup repo, although the issue here is with github pages' code, not markup since the .md files are rendered fine in Github itself: github/markup#332

@davorpa davorpa added 👥 discussion This Repo is guided by its community! Let's talk! and removed PR requested Issues that can be addressed with a new PR labels Oct 3, 2021
@davorpa davorpa removed their assignment Oct 3, 2021
@davorpa
Copy link
Member Author

davorpa commented Oct 3, 2021

To fix it, all of the markdown syntax will need to be changed to regular HTML tags instead of markdown, which include not just the links but also the headings

It is an option. 💡 The other may be to configure the Jekyll theme well using some gem

@charlottetan
Copy link
Contributor

Thanks for the idea! Didn't realise there was that option, submitted a PR that fixes this issue

@davorpa davorpa added PR requested Issues that can be addressed with a new PR and removed help wanted Needs help solving a blocked / stucked item labels Oct 3, 2021
@davorpa davorpa self-assigned this Oct 3, 2021
@davorpa
Copy link
Member Author

davorpa commented Oct 3, 2021

As I comment in #5810 (comment) it's a bit weird why use directly GFM is a bit different of kramdown with input: GFM (default). Maybe, to investigate about it and report to Jekyll project @jekyll.

From default config docs: https://jekyllrb.com/docs/configuration/default/

# Markdown Processors
kramdown:
  auto_ids          : true
  entity_output     : as_char
  toc_levels        : [1, 2, 3, 4, 5, 6]
  smart_quotes      : lsquo,rsquo,ldquo,rdquo
  input             : GFM
  hard_wrap         : false
  footnote_nr       : 1
  show_warnings     : false

@charlottetan
Copy link
Contributor

(Responded in #5810 (comment))

@davorpa davorpa added the 🐛 BUG Confirmed bugs, normally at GitHub Pages label Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 BUG Confirmed bugs, normally at GitHub Pages 👥 discussion This Repo is guided by its community! Let's talk! PR requested Issues that can be addressed with a new PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants