question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems with visibility of .Rmd files after header

See original GitHub issue

I tried to publish a post as .Rmd file with a YAML front matter. Everything works fine until a header appears (e.g. ## My Title). Header and all the text thereafter appears with an extreme light gray, so that one even almost can’t read the text.

But there is no problem with the exact same file using .Rmarkdown file ending instead of a.Rmd ending. .Rmarkdown is rendered by Blackfriday whereas .Rmd is rendered by Pandoc. There are slight differences, but there shouldn’t be any different with standard Markdown. I tested .Rmd- files with other Hugo themes and had no problems.

I tried it also with a fresh installation out of the box so that I could prevent an issue of some changes I already had made to the template. What could be the problem?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
petzi53commented, Sep 21, 2017

Frankly, I am not an expert in CSS but I believe the problem has to do with static/mermaid/mermaid.css. If you delete the following code line opacity: 0.2; or set opacity: 1; header in .Rmd files will work again.

/** Section styling */
.section {
  stroke: none;
  opacity: 0.2;
}

The same code segment can be found inmermaid.forest.css and mermaid.dark.csstoo. I do not know if there are some side effects but the sample page mermaid.md seems to work well.

If one does not want to do this change one still has the option to use html-codes for headers in .Rmd files, but then one will lose some features of Pandoc like implicit_header_references.

PS.: I noticed the same problem in the learn-theme where this theme is a partial porting.

0reactions
byzhengcommented, Sep 28, 2017

I still have the same problem. I think it is related with the loading order of theme.css and mermaid.css. The new changes in theme.css is overwrote by mermaid.css. It seems need to this line from script.html into header.html. Not sure this change will cause any side effects to others

“<link href=”{{“mermaid/mermaid.css” | relURL}}" type=“text/css” rel=“stylesheet”/>"

Read more comments on GitHub >

github_iconTop Results From Across the Web

Icon hyperlinks no longer visible in R markdown using YAML ...
When the header.html file is opened in Chrome, the hyperlink icons are visible and valid. Why would the hyperlink icons no longer be...
Read more >
15 Common Problems with rmarkdown (and some solutions)
If you want to practice on fixing broken rmarkdown documents, check out some pathologically broken examples on github at njtierney/rmd-errors.
Read more >
Document does not knit - R Markdown - RStudio Community
Hello everybody I have a problem with my RMD file. I am writing a document that I would love having in both HTML...
Read more >
3.1 HTML document | R Markdown: The Definitive Guide
Note that HTML fragments are not complete HTML documents. They do not contain the standard header content that HTML documents do (they only...
Read more >
Internal links in rmarkdown don't work - Stack Overflow
I had a section header like ### 1.1.1 My Section Title that needs to be #my-section-title in the link. After some searching, I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found