blogdown

Resize a plot generated in R in a web page generated by blogdown to different screen size

99封情书 提交于 2020-01-06 05:15:55
问题 Antecedent 1 : A static hugo page generated by the blogdown R package. Antecedent 2: A blog post created from a rmarkdown document with R plots. Question: Some way to resize a plot produced by a chunk of R code in a rmarkdown post when I open the page from a mobile phone? For example, all the content of this post is resize when I open from my mobile except the plot. How can achieve something like that? Thank in advance! 回答1: The easiest way to resize images according to the available screen

R Blogdown: insert images side by side using knitr

徘徊边缘 提交于 2020-01-05 09:14:23
问题 I am working on a personal website using blogdown. I know about the handy addin for inserting an image - it works well, but for only one image. Is there a way, using knitr::include_graphics , to insert multiple images side-by-side? I'm aware of using something like this: ![image text](path/to/image.png) ![other image text](path/to/image2.png) But this cannot adjust the size of each image, which is an important formatting option for me. Note: While poking around for a solution before I post

Is there a way to embed a bookdown document as a blogdown post?

怎甘沉沦 提交于 2019-12-24 06:38:10
问题 I have created a tutorial using Bookdown (which I think is a great format for it), and am currently in the process of creating a website using Blogdown (hugo-academic theme). I would like to be able to add this tutorial to a tutorials page as a Bookdown post, but I don't know if that's possible. I'm new to Blogdown, so I haven't been able to find any solutions to this. If it's not possible, is there a way of changing the post link to a hyperlink that takes the user to a published Bookdown

Blogdown doesnt render properly on netlify (theme tranquilpeak)

北城以北 提交于 2019-12-23 03:57:10
问题 The tranquilpeak website doesnt render properly on netlify even though it looks fine locally. screen shots are below. My repo is located here. Any help would be greatly appreciated. It took me multiple trials and errors to get my site to work fine locally. The previous attempts lead to the same result as you can see on the netlify picture. Successful local attempt: a) create an empty folder b) setwd(folder) c) new_site(theme = "kakawait/hugo-tranquilpeak-theme") d) create a project in the

How to add feature or thumbnail image for post in .Rmd file

五迷三道 提交于 2019-12-22 14:39:15
问题 I'm currently trying to setup a hugo blog with blogdown and can't find a way to add feature or thumbnail images to posts from within .Rmd files, which would like this with the tranquilpeak theme: As far as I understand, it is easy to do in .md files by just adding some syntax like this: +++ featuredImage = "img/foobar.jpg" +++ I found this in the minos theme and in a discourse post. But how can I do this inside a .Rmd file? 回答1: It does not matter whether you use .md or .Rmd: if the theme

In R 3.5 blogdown:::serve_site() cannot render .Rmd file

空扰寡人 提交于 2019-12-22 08:26:33
问题 After I updated R to 3.5, I found I couldn't render .Rmd file. I tried to reinstall the relevant packages, but it seemed it didn't solve the problem. More specifically, the error message is: blogdown:::serve_site() Rendering content/post/mypost.Rmd Fatal error: cannot open file 'C:/Users/John': No such file or directory Error in render_page(f) : Failed to render 'content/post/mypost.Rmd' My blogdown.Rproj is under the folder C:\Users\John Smith\Documents\GitHub\blogdown . I am not sure why

How to host multiple Github repos using the same custom domain on Netlify?

五迷三道 提交于 2019-12-20 10:24:20
问题 I am currently hosting my personal website (created using blogdown and Hugo) using Netlify at wjakethompson.com. This is deployed through a Github repository. I now have a bookdown project in a separate repository that I would also like to host on Netlify, while leveraging the custom domain that I have set up for my personal website. Currently, this bookdown project is being hosted on the Netlify subdomin (i.e., wjakethompson-dissertation.netlify.com). However, I would prefer to use my custom

Customize the “about” widget in hugo academic theme

六眼飞鱼酱① 提交于 2019-12-20 02:40:21
问题 I am using the hugo-academic theme via RStudio/blogdown to build my webpage. The example page is here: https://themes.gohugo.io/theme/academic/ I would like to add a second list of non-academic Interests below the academic ones. Is this possible? In the configuration section of about.md there is a section for this list # List your academic interests. [interests] interests = [ "Artificial Intelligence", "Computational Linguistics", "Information Retrieval" ] but i am not sure how it is passed

Why does blogdown keep rebuilding RMarkdown files?

限于喜欢 提交于 2019-12-12 18:56:31
问题 I have a github pages website that has a blog that I update with blogdown. Everything works fine, I like blogdown a lot, but every time I use build_site() it re-builds .Rmd files that should not (at least to my understanding) be built again, given that I haven't changed anything in those files. This is not ideal, because sometimes things change (like tables I've scraped from the web) and I have to re-write the whole post again. Has anybody experienced anything similar? What's the solution?

Include image preview in blogdown (.Rmd yaml header)

不羁的心 提交于 2019-12-12 09:56:09
问题 I have tried a couple of approaches but none worked so far. I want to include an image preview for a blog post written in R markdown (.Rmd) on my main blog page where a number of posts and projects are generally shown. I can make it work in plain markdown (.md) using below code taken from the Hugo academic-theme here +++ # Optional image to display on homepage (relative to `static/img/` folder). image_preview = "bubbles.jpg" +++ The result would look as shown here (see section Projects ).