tessel / t2-start

Tessel 2 start docs! Open for contributions.
http://tessel.io/start
35 stars 31 forks source link

Operating system tabs don't render properly in the Prereqs page #160

Closed Frijol closed 7 years ago

Frijol commented 7 years ago

The problem:

The page is http://tessel.github.io/t2-start/cmd.html

It looks like this:

screen shot 2017-03-22 at 12 57 28 pm

It should look and work the way it does on the Install page:

screen shot 2017-03-22 at 12 59 36 pm

To resolve this issue:

From the files in https://github.com/tessel/t2-start

Find out what's different between the tabs in cmd.md and install.md.

Use the tabs on install.md as a model to fix the tabs on cmd.md.

(Hint: clone this repo and then follow these instructions to render the pages locally)

yousifm commented 7 years ago

It seems to render correctly when viewed using jekyll on my local clone

rickMcGavin commented 7 years ago

@Frijol It definitely displays correctly on the local server. I tried pushing it to my own repo, and it displays incorrectly like in the repo here. I'm not seeing any difference between install.md and cmd.md that's causing the issue.

I believe I did find the problem though. I analyzed the network requests in chrome dev tools. The issue seems to be that the install.js script isn't running when the cmd.html file loads on gh-pages, but it does load the install.js script on the local jekyll server.

I believe this is further supported when you inspect the <dl> element locally, the nested tabs have been converted to <dd> elements. On gh-pages, they are <a> tags wrapped in a <p> tag as if the script never ran to convert them.

I cannot seem to figure out how to fix it so the install.js script runs when you load cmd.html on gh-pages though.

reuben453 commented 7 years ago

For some reason the install.js script does not get included on the page when the script tag is placed in cmd.html. I moved it to the markdown file (cmd.md) and it now gets included. I also changed the dl element to be formed using kramdown syntax rather than html and text.

I've opened a PR for these changes: #162 Let me know what you think.