Closed silasprincipe closed 2 years ago
Unfortunately, we don't resolve markdown syntax in this field.
Maybe we can improve this without much trouble 🤔
I think the current workaround is to use HTML content directly using htmltools
menu:
- text: "Species models"
- text: !expr htmltools::em("Echinometra lucunter")
href: eclu.html
or use JS + CSS to tweak the menu by modifying the DOM
tweak.html
<script>
// Using JQuery available within distill website
$(function() {
// tweak specific menu item
// workaround for https://github.com/rstudio/distill/issues/474
// - use any correct selector here
item = $('div.nav-dropdown div.nav-dropdown-content a[href*="eclu.html"]')
item.html("<em>"+item.text()+"</em>")
})
</script>
in _site.yml
output:
distill::distill_article:
includes:
after_body: tweak.html
Sorry for the inconvenience on that, I'll look at how improve this somehow to make more easy to use HTML directly. 🤔
Thanks @cderv! I can confirm that the solution with htmltools
works just fine and it's not incovenient at all! Maybe just adding this information about this possibility in the docs/distill website is more than enough.
Thanks again for the help!
Hi!
I need to italicize some text of my menu. Is it possible to add some kind of markup in the YAML file to make text as italic?
Here is how my _yaml file looks like:
But this is what I'm getting for now:
I appreciate any help you can give! Thanks again for creating distill.