Code Monkey home page Code Monkey logo

Comments (8)

ShichenXie avatar ShichenXie commented on July 28, 2024 1

BTW, It works after I delete those auto-created .md files manually.

from blogdown.

yihui avatar yihui commented on July 28, 2024

Please follow the issue guide when you open an issue. In particular, please provide a reproducible example instead of only saying something doesn't work, otherwise it's hard for us to help you. Thanks!

from blogdown.

ShichenXie avatar ShichenXie commented on July 28, 2024

Please create a rmarkdown file with the following codes, and put it in the content folder.
Thanks.

---
output: html_document
---

:::: {style="display: flex;"}

::: {}
Here is the **first** Div.

```{r}
str(iris)
```
:::

::: {}
And this block will be put on the right:

```{r}
plot(iris[, -5])
```
:::

::::

from blogdown.

yihui avatar yihui commented on July 28, 2024

There are many possible reasons why it doesn't work. Please provide a full example (ideally, a Github repo that I can clone).

from blogdown.

ShichenXie avatar ShichenXie commented on July 28, 2024

Please see the Github repo blogdown_multicolrmd. The first post doesn't worked as it should be. Thanks.

from blogdown.

yihui avatar yihui commented on July 28, 2024

Okay, that's much better.

The answer is that .Rmd is rendered to .md by default because of this option: https://github.com/ShichenXie/blogdown_multicolrmd/blob/main/.Rprofile#L19 However, Hugo's Markdown renderer (Goldmark) doesn't support fenced Divs (:::). If you use fenced Divs, you have to use Pandoc to render them, in which case you have to render .Rmd to .html. To do that, you need to change the option to options(blogdown.method = 'html'). Remember to restart R.

from blogdown.

ShichenXie avatar ShichenXie commented on July 28, 2024

Great! It works, thanks.

from blogdown.

yihui avatar yihui commented on July 28, 2024

Glad to know it works now!

BTW, It works after I delete those auto-created .md files manually.

This problem can be identified by blogdown::check_site().

from blogdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.