github pages fails to convert .md in table to .html - github

Markdown tables are rendered in a lopsided fashion, and I've used html coding in a markdown (.md) file to get something that looks reasonable to me. That seems to cause a problem when my .md files are converted to .html github pages (jekyll).
It seems that any links (e.g. somefile.md) in the html-coded table are not converted to the .html extension; in other words, the link in the github pages page is to somefile.md instead of somefile.html. Following a link then yields a really ugly .md file.
This is an awkward description (github pages page = inane). I've created a version of my README.md file here that includes both the markdown-coded table, and the html-coded table. If you'll follow that link, the issue will be obvious I think.
I would like to have a table that looks rational (not lopsided), and have my links converted properly by github pages. Is this possible?

Related

Github Jekyll theme hacker style does not apply to sublinks

I created a GitHub page with a hacker theme.
Then, I created another .md file (other than the index.md) and linked it to the index file.
The referenced .md (named as testlink.md) does not have the same style, unfortunately.
Here is the code: https://github.com/YesimSem/thecuriousanimal/tree/gh-pages
How may I ensure that all the .md files have that same style?
Thank you,
Updated Answer
Your link needs to be changed from .md to .html. Please see this pull request on your repository for the fix. The testlink.md is being rendered correctly but your link is going to the original Markdown file. It should be going to the HTML rendering of the Markdown file. See this URL for the correct page https://yesimsem.github.io/thecuriousanimal/testlink.html
Original Answer
You need to add Jekyll Front Matter to your new page (i.e. testlink.md) and specify the a Jekyll layout. In your situation, your new page needs the same layout as the index.md from the GitHub Jekyll Hacker theme. See the layout specified at the top of index.md.

Why are headings automatically creating links in GitHub readme.md markdown pages?

Hello: I have created readme.md files for my repositories and GitHub pages. But when I create headings that are formatted h2/## or h3/###, etc. in-page anchor links are automatically created. I have tried different ways to format the headings -- such as ##, , --- -- but I get the same result. It occurs with each heading. This occurs in readme.md files that are in the repository and those that are converted to GitHub pages. I've tested it in chrome browser and edge browser and it's the same behavior.
# sample will create the heading and an unwanted in-page link
## sample will create the heading and an unwanted in-page link
Here's a page with the behavior: https://burrittresearch.com/
My goal is to be able to format headings in markdown without having these links automatically created.
Thank you!
Those are part of the anchorjs default CSS rules from GitHub pages
<h2 id="skills">Skills
<a class="anchorjs-link"
href="#skills"
aria-label="Anchor"
data-anchorjs-icon=""
style="font: 1em / 1 anchorjs-icons; padding-left: 0.375em;">
</a>
</h2>
If you static page (like this one) include its own set of CSS file/rules (like those ones), you could add, to make sure they are not visible:
.anchorjs-link {
display: none !Important;
}
GitHub documents their markup processing in github/Markup. Note that Markdown is converted to HTML in step one, which does not add any anchors to headers. However, in step 4, which is separate from the Markdown parsing, all headers in the document have anchors added. This is done to all content, regardless of whether is comes from Markdown, ReStructured Text, textile, asscidoc, etc., and is not specific to Markdown.
Note that the above only applies to content supplied by users which is displayed on github.com. It is their site, which they control, so we don't get to change/override that behavior.
However, it is different with GitHub pages. By default, GitHub Pages uses Jekyll to convert Markdown files into HTML. Jekyll includes a number of options to control how Markdown is processed, including the auto_ids option. Turn that option off (set it to false), and Jekyll will no longer add IDs to every header. However, that is a Kramdown option, but, as I understand if, GitHub Pages uses the GitHub Flavored Markdown variant of Commonmark, which doesn't have any such options. For that matter, the GFM spec doesn't indicate that headers would be assigned IDs either (so I'm not sure where those IDs are coming from). You might try configuring Jekyll to use Kramdown with the auto_ids option turned off. Configuration options "can either be specified in a _config.yml or _config.toml file placed in your site’s root directory."
As an alternative, you could install Jekyll (or any other static site generator) locally and build the site before uploading to GitHub Pages. Simply include an empty file named .nojekyll in the site root and GitHub will not run your files through Jekyll. In this way, you get complete control over the content and formatting of the pages.

Using Jekyll for Website without Blog

I'd like to use Jekyll for my website, but I can't figure out how to set it up. All of the documentation I've seen shows how to use Jekyll to set up a blog. I just want to write Markdown and have Jekyll convert it to a website.
I understand that this question is a bit vague and the terminology may not be perfectly accurate. I'm new to creating a website and I don't want to learn HTML.
(Disclosure: My website will be for a project on GitHub.)
There's four types of document that you can find in a Jekyll site :
Static files like js, css or even html page. They don't have a front matter, are simply copied at generation time and can be found in the site.static_files hash,
posts they are located in _posts folder, have a front matter and can be found in the site.posts hash by liquid,
pages they can be anywhere in your folder structure, have a front matter and can be found in the site.pages hash by liquid,
collections that are more elaborated pieces of datas with a front matter and can be found in site.collections hash by liquid.
You can choose to use any of them. If you don't want to use posts, just remove or empty the _posts folder and just use pages.
If all you want to do is write markdown and have that generate a single page for a project, consider using the GH-pages automatic generator.
In step 3 you write the content for your page in Github-flavoured Markdown and then select a layout to publish it in.

Can I use a Markdown file in a GitHub page?

Since the GitHub wiki does not support directories, I want to put my md files into GitHub pages. However when I open them I found they are not interpreted at all. GitHub just gives me the raw file. See http://greenlaw110.github.com/Rythm/en/index.md. Any idea?
The documentation isn't particularly clear on this, but given that the Markdown rendering is done by Jekyll, I believe you need what they call "YAML front matter" for it to compile the page. So try putting this at the top of your file:
---
title: Document Center
---
That should be enough to trigger Jekyll. (And then you can get fancy and start using layouts, etc.)
Another reason (found by experience) why you might get a raw index.md file, is if you happen to also have a similarly-named index.html file. This blocks GH Pages.
Deleting index.html produces (on the site) a new index.html with parsed markdown. The original index.md is then no longer accessible.

non-working relative **unicode** links in markdown in github

I forked repo and translate it to my native language.
There is no problem with original table of contents in english readme file — there are working relative links from table of contents to headings in file itself.
My translation file with equal structure has no such linked headings.
.
I notices that english links work as well, in opposite to unicode links:
What is problem? Why table of content in my readme file is not working?