ruby - How do I put HTML, JS and CSS in a Github page .md file? -


i'm writing post github-hosted site. i'm writing my-first-post.md.

i have javascript in script tags, css in style tags, , html in divs , spans.

when paste code in .md , run jekyll serve thru ruby, page raw html.

what doing wrong?

"html publishing format; markdown writing format." --daringfireball

markdown supposed simple.

you shouldn't putting javascript markdown unless have reason doing , don't think every markdown converter process javascript.

ideally, markdown should confined this list , maybe simple html.

any css or javascript should included part of theme.

edit, explaining jekyll filestructure:

so jekyll site should have file structure looks this. in broad terms, css , javascript should in default.html file located in _layouts folder. you'll notice file appears regular html file, more or less. blog post--which markdown after has been converted html--will insert layout @ {{ content }} tag.

also, css , javascript doesn't have in default.html. can in external files link default.html


Comments