blogdown

.Rprofile not sourced

走远了吗. 提交于 2020-07-05 07:47:16
问题 I am trying to set some global options for blogdown package in ~/.Rprofile script but they are not being sourced. Here's how the .Rprofile script looks like: options(blogdown.ext = ".Rmd", blogdown.author = "Maryam Khezrzadeh") I have also tried setting the options at the project level by creating an .Rprofile script in my project's working directory. but that doesn't get sourced either. I have restarted the R session from within RStudio and have also restarted RStudio and finally restarted

Relative image paths for Twitter cards in blogdown

好久不见. 提交于 2020-05-23 12:44:04
问题 I'm trying to set up a template for generating Twitter Cards in blogdown . It put the following in layouts/partials/twitter-card.html : <meta name="twitter:site" content="@myname"> <meta name="twitter:creator" content="@myname"> {{ if .IsPage }} <meta name="twitter:description" content="{{ .Summary }}" /> <meta name="twitter:title" content="{{ .Title }}" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:image" content="{{ .Params.image }}" /> {{ else }} <meta

How to prevent blogdown from rerendering all posts?

≡放荡痞女 提交于 2020-03-18 10:55:42
问题 Background: I am featuring a blog built on @YihuiXie's R package blogdown . Problem: When I render_site() , all source files (*.Rmd) are rendered - even the unchanged source files are re-reendered. This complete re-rendering is time consuming and unnecessary (I think). Question/ Desired Solution: How can I prevent blogdown from re-rendering the unchanged source files? I want blogdown to render only new or changed source files. What I have already tried: I've read the blogdown book; Yihui

How to add dropdown menu on tab / tabset [rmarkdown / bootstrap]

故事扮演 提交于 2020-03-17 09:33:21
问题 Documentation for Bootswatch suggests I can use a dropdown menu from a tab in a tabset: How can I achieve this with Rmarkdown? I've tried: # SECTION 1 {.tabset .tabset-fade} ## Section 1.1 ## Section 1.2 {????something here?????} ### Section 1.2.1 <<<<<<<<< want this to appear under the dropdown menu 回答1: This is now available within the development version of rmarkdown , which you can install this via devtools::install_github("rstudio/rmarkdown") . To add a dropdown menu, you must add

Create a table of contents (toc) in a post with blogdown package

谁都会走 提交于 2020-02-25 05:47:46
问题 I know the short answer, add the following in the metadata toc: TRUE But when I create a post with the blogdown package that have a table of content, I have problems with the url (redirection) behind the table options. The links for the table of content are of the following form: http://home-website/#tree-terminology Instead to be: http://home-website/post_name/#tree-terminology How can reference the name of the post correctly in the url to generate the proper url in the table of content? In

Create a table of contents (toc) in a post with blogdown package

心已入冬 提交于 2020-02-25 05:47:45
问题 I know the short answer, add the following in the metadata toc: TRUE But when I create a post with the blogdown package that have a table of content, I have problems with the url (redirection) behind the table options. The links for the table of content are of the following form: http://home-website/#tree-terminology Instead to be: http://home-website/post_name/#tree-terminology How can reference the name of the post correctly in the url to generate the proper url in the table of content? In

Cannot use Markdown shortcodes in Blogdown's Rmd files

情到浓时终转凉″ 提交于 2020-01-25 01:11:12
问题 I am using Blogdown. In my post.Rmd file I need to use a shortcode: This is me calling a **shortcode**: `r blogdown::shortcode("mysc", .content = "Find **more** about this shortcode in [here](https://www.wikipedia.com).")` As you can see, .content is Markdown, not plain text. Shortcode mysc.html is: <p class="sc"> {{ if .Inner }} {{ .Inner }} {{ end }} </p> As you can see, I am using blogdown::shortcode because it is not possible to use shortcode syntax in Rmd files. Problem However the

Unable to create new site using (hugo) Academic theme

拜拜、爱过 提交于 2020-01-21 05:38:04
问题 I am new to blogdown and working my way through the fabulous resource to guide me. Unfortunately, I am unable to use the academic theme in hugo. To create a new site I have: Created a new (empty) project in a brand new working directory. Installed blogdown and hugo, as recommended Tried to create a new site by running the following: blogdown::new_site(theme = "gcushen/hugo-academic") Unfortunately, I then encounter the following errors: Error: Unable to find theme Directory: C:\Users

Control index.xml for Atom/RSS (hugo / blogdown generates feed with relative links)

牧云@^-^@ 提交于 2020-01-10 04:00:27
问题 Which parameters in config.toml or which files in /layouts control the generation of index.xml ? When I validate my Atom feed, I get a number of errors, pretty much all of them due to links not being complete links. https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Ftaraskaduk.com%2Findex.xml Example: <title>My first shiny app: calculating your hourly rate as a consultant</title> <link>/post/2018-01-shiny-rate/shiny_rate/</link> <pubDate>Sat, 13 Jan 2018 00:00:00 +0000</pubDate> My

Bad rendering of the local index.html from public folder using HUGO

孤街醉人 提交于 2020-01-06 11:44:40
问题 The bounty expires in 4 days . Answers to this question are eligible for a +50 reputation bounty. Dev P wants to draw more attention to this question. I am creating a web using RStudio and HUGO, by means of the Blogdown package. When serving the site locally in RStudio, it seems to be rendered properly. All the files are created within the folder /public . However, when I open the file index.html from the /public folder, I get this appearance. I am employing the theme Mainroad with this base