Created
July 30, 2014 04:35
-
-
Save tonyfast/2142f1ae8e6f5e9e8357 to your computer and use it in GitHub Desktop.
Work Around to Using YAML Front Matter in Javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| foo: bar | |
| --- | |
| <div id="frontmatter" style-"display:none;">{{page['foo']}}</div> | |
| <script> | |
| // In Jquery | |
| jsvar = $(".fields").text(); | |
| // In d3 | |
| jsvar = d3.select(".fields").text(); | |
| </script> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment