Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knit2wp function does not pick up categories and publish options #512

Closed
rpodcast opened this issue Apr 4, 2013 · 7 comments
Closed

knit2wp function does not pick up categories and publish options #512

rpodcast opened this issue Apr 4, 2013 · 7 comments
Milestone

Comments

@rpodcast
Copy link

rpodcast commented Apr 4, 2013

I wanted to use the new knit2wp function to create a post in the drafts section of my Wordpress site at r-podcast.org which is a self-hosted blog. While the function successfully made a post, it automatically posted it instead of putting it in draft form and was uncategorized, see post here. The R markdown file was simply the RStudio R markdown default template (with modifications to put the images in my Dropbox according to Yihui's demo here and here's the code I used to compile:

library(RWordPress)
library(knitr)
knit2wp(input='test_wp.Rmd', title = 'Test from knitr to wordpress',
    categories = c('Articles'), publish=FALSE)

Contents of the file can be seen in this gist in case it helps to debug.

@yihui
Copy link
Owner

yihui commented Apr 6, 2013

Sorry I have no idea on why categories does not work. I just tested it and I can reproduce the problem. I think this might be a problem of RWordPress.

For publish=FALSE, it is not an argument of knit2wp(). I can add it if you want.

@yihui yihui closed this as completed in 7aaa589 Apr 7, 2013
@rpodcast
Copy link
Author

rpodcast commented Apr 9, 2013

Thanks, Yihui! For my purposes, having the publish argument added would be sufficient enough, as I can easily assign the category in Wordpress itself when it's ready to be published.

@yihui
Copy link
Owner

yihui commented Apr 9, 2013

Great. The publish argument has been added. Thanks!

@joedemby
Copy link

Hi Yihui, Great work on knitr and related packages. I have found them indispensable. I know this query has been closed but I just wanted to let you know I have found a weird solution. Categories works if you set more than one category :) One category does nothing but adding an additional arbitrary category seems to make it work perfectly.

@yihui
Copy link
Owner

yihui commented Jan 18, 2018

@joedemby Thanks for sharing your solution! That sounds like a bug of the RWordPress package.

Anyway, perhaps you have heard about it -- I spent a whole year last year working on a new package specifically for building websites with R Markdown: https://github.com/rstudio/blogdown

@joedemby
Copy link

No problem. Just found it by accident. Thanks for the referral of blowdown. I shall look at it right away. :)

@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants