Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get syntax highlighting to work #44

Open
paniash opened this issue Aug 8, 2020 · 0 comments
Open

Unable to get syntax highlighting to work #44

paniash opened this issue Aug 8, 2020 · 0 comments

Comments

@paniash
Copy link

paniash commented Aug 8, 2020

I followed the method mentioned in the pull request for syntax highlighting using hightlight.js, however I'm unable to get it to work.

layouts/partials/foot_custom.html:

<script src="//yihui.name/js/math-code.js"></script>
<script async src="//mathjax.rstudio.com/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>

<script async src="//yihui.name/js/center-img.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/languages/r.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/languages/python.min.js"></script>

<script>
hljs.configure({languages: []});
hljs.initHighlightingOnLoad();
</script>

layouts/partials/head_custom.html:

<link href="https;//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/styles/gruvbox-dark.min.css" rel="stylesheet">

static/css/fonts.css:

/* code */
pre {
  border: 1px solid #3A3E41;
  /* box-shadow: 5px 5px 5px #000; */
  background: #f8f8f8;
  padding: 1em;
  overflow-x: auto;
}
code { background: #181A1B; }
pre code { background: none; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant