reconhub / learn

RECON learn: a free, open platform for training material on epidemics analysis
https://reconlearn.org
Other
35 stars 30 forks source link

css style for code highlight missing #21

Closed thibautjombart closed 5 years ago

thibautjombart commented 6 years ago

The css file for code highlighting is present in static/css/recon.css but I am not sure how this is now supposed to be used / called in the .Rmd files. It would either:

  1. be applied automatically to all syntax highlighting in all practicals
  2. be applied manually to individual Rmds, e.g. in the yaml header via css: path/to/recon.css

My preference goes to 1 (older behaviour) but if only 2 is possible, then it'd be nice to have a working example e.g. on content/post/practical-ebola-response.md (I can apply changes to other documents)

stephlocke commented 6 years ago

Are any of these default styles acceptable? https://help.farbox.com/pygments.html

These can trialled locally by using the pygmentsStyle config value in config.toml

thibautjombart commented 6 years ago

Note to self, tracking down the issue:

  1. highlightjs was missing, been added
  2. css now custom for highlightjs
  3. conflicts with theme style: .post-full-content pre code

Looks like neutralising the class doesn't work; would need to tweak the hugo theme itself = not cool for keeping updates.

Current status 53e5eaf9cd1b51c0ff89b58d8f79baabf5b306cb

thibautjombart commented 6 years ago

@stephlocke yes, definitely! It tried nudging highlighjs and fiddling with css yesterday to bump into what I think are theme specific issues, so any out of the box solution will be good. I like monokai and native most.