Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github Jekyll site builds locally but ignores header tags online

this is a very curious Jekyll github issue that i can't figure out.

I have a repo here where i'm developing tutorials

https://github.com/NEONInc/NEON-DataSkills-Lesson-Development

If you go to it online, you'll notice that while there markdown posts in the _posts directory have headers as follows

#Header One
##Header Two

They do not render online. Instead notice that even the landing page:

http://neoninc.github.io/NEON-DataSkills-Lesson-Development/

Renders the top heading as

##Welcome to the NEON #WorkWithData Portal!

instead of

Welcome to the NEON #WorkWithData Portal!

Here is the most curious part - it renders FINE locally when i do "jekyll" build. I have tried

  1. Replacing all style sheets and template layout files
  2. rechecking the config file.
  3. recloning the repo from a different account on a different computer to see if the build rendered the heading tags using ## rather than using heading styles. It still rendered fine locally.

One other quirk - if you go to a lesson - for instance

http://neoninc.github.io/NEON-DataSkills-Lesson-Development/R/EML

notice that the line spacing in the code blocks is wide -The line spacing locally is LESS and looks much better. So someone the css is being partially ignored?

I am not sure what else to try to get things to render properly- or to render consistently between github online and a local build. Especially given I can not replicate the issue locally. Any guidance as to what else I can try to fix this render issue?

NOTE: This same repo skin is used in other repos and renders online JUST FINE. so this issue is specific to this particular repo.

Example: http://neoninc.github.io/NEONDS-Template-Repository/

Many thanks for ANY ideas. Leah

like image 341
Leah Wasser Avatar asked Feb 05 '16 02:02

Leah Wasser


People also ask

What makes Jekyll a static website?

Jekyll is a static site generator. It takes text written in your favorite markup language and uses layouts to create a static website. You can tweak the site's look and feel, URLs, the data displayed on the page, and more.

How does GitHub Pages work with Jekyll?

Your site is automatically generated by GitHub Pages when you push your source files. Note that GitHub Pages works equally well for regular HTML content, simply because Jekyll treats files without front matter as static assets. So if you only need to push generated HTML, you're good to go without any further setup.

How do I override Jekyll theme?

However, you can override any of the theme defaults with your own site content. To replace layouts or includes in your theme, make a copy in your _layouts or _includes directory of the specific file you wish to modify, or create the file from scratch giving it the same name as the file you wish to override.


1 Answers

Thank you for the feedback. I wanted to post a solution to this issue after talking with GitHub. Github is migrating to Jekyll 3.0 as pointed out in the comments! (thank you!)

https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0

This migration is impacting markdown - moving to a more strict version of Kramdown which does not render headers as

#Header One Will render as a paragraph rather than a header

instead if requires a space after the #

# Header One Renders as a header (h1) tag

In short, Kramdown used to accept #header syntax but no longer. I am noticing my repos where I have been using #Header syntax render incorrectly one by one. I don't have clarification on why it's impacting some and not all. I also am unclear as to why things render fine locally. The solution in short is - add a space after your # AND if your repos look fine now, be prepared for them to not render properly in the future.

I hope this helps others dealing with migration issues! I am also having to adjust some of my code block styles for various reasons.

like image 133
Leah Wasser Avatar answered Oct 13 '22 20:10

Leah Wasser