I'd like to serve javascript scripts and have them run such that people can go to my *.github.io page and see the visualizations there.
Is this possible? If so, how might I embed the javascript into the markdown?
From the Markdown Syntax Overview:
For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.
I'm sure there's a better way to include scripts in your project, but if you really want to embed them in your markdown, there shouldn't be anything stopping you from doing the following:
# This is a title
> this is a blockquote
<script>
// this is a script that renders a chart
var chart = d3.select('body').append('svg')
// ...etc...
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With