-
Notifications
You must be signed in to change notification settings - Fork 334
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
blogdown - github - netlify works for md, but not for rmd #169
Comments
blogdown uses pandoc to convert rmd to html, i think you should commit those .html files knitted from rmd files to your repo, instead of pure rmd source file. This is referred in the blogdown docs 1.5 rmarkdown vs markdown:
And if you use rstudio, you can try |
Yes, as @tcgriffith said, commit everything you see under |
I met a similar problem. I tried the following two ways:
and push the results in the Github repo, and let Netlify to deploy it. What I get:
Did I do something wrong? Thank you very much! Update: If I manually rename I use |
rmarkdown to markdown is used when you do not have r chunks in your post. so if you have those, you should stick to html you should also preview the site locally before pushing it to deploy. |
Thanks for your answer! Unfortunately, I am a windows user. I saw from the blowdown manual, the preview function is beta in windows. I am one of this. When I preview it, R will die after 2-3 seconds. (I don't know why) So I have to make a lot of commits and deployment to preview it on netlify. Good to know that it should not have R chunks. I will try rmd again tomorrow. |
Do you preview in rstudio? If so, preview in a separate R GUI.
…On 5 Nov 2017 15:18, "Yi Li" ***@***.***> wrote:
Thanks for your answer! Unfortunately, I am a windows user. I saw from the
blowdown manual, the preview function is beta in windows. I am one of this.
When I preview it, R will die after 2-3 seconds. (I don't know why) So I
have to make a lot of commits and deployment to preview it on netlify. Good
to know that it should not have R chunks. I will try rmd again tomorrow.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#169 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABlKJRHROGwJmBsErrEUqyrMkqKRZtzIks5szUU5gaJpZM4OlHR9>
.
|
I have no problem previewing my site in windows10. maybe you should fire up a new issue and provide more info about your problem. you can use cmd or powershell to run hugo |
Thanks @byzheng ! I will try that. Thanks TC! Good to know it works on your windows 10. I will double check this tomorrow to make sure I configured in the right way. |
@liyi-1989 Could you try this? https://bookdown.org/yihui/blogdown/livereload.html install.packages(c("processx", "later"))
options(blogdown.generator.server = TRUE) |
@yihui This helps. It works now. Thanks! |
Thanks, @yihui. I'm confirming that install.packages(c("processx", "later"))
options(blogdown.generator.server = TRUE) resolves the issue of RStudio crashing. Even when I'm serving the site from the same .Rproj ( via
|
> (blogdown:::Rscript(c("-e", shQuote("httpuv::startDaemonizedServer('127.0.0.1', p <- servr:::random_port(), list(call = function(req) list(status = 200L, body = 'Hello world!', headers = list('Content-Type' = 'text/plain')))); readLines(paste0('http://127.0.0.1:', p), warn = F)"))))
[1] "300383456"
[1] "Hello world!"
[1] 0 |
@DataStrategist See #312. |
@DataStrategist Did you see my reply above #169 (comment)? |
@yihui I've looked at both your comments here. In terms of am I committing EVERYTHING, the answer is yes... except where the I have also tried to the options under Live-Reload... but to no avail. I've also tried to |
@DataStrategist Weird. There should be a |
Another thing is, I recommend you to try "Serve site" (https://bookdown.org/yihui/blogdown/workflow.html), and make sure things work at least locally before pushing to Github. Pushing blindly to Github + waiting for Netlify to build the site may not be fun (and I won't be surprised if you Grrrrr :). |
Yeah, it's all working now! So the culprit was the I do check the serve site... it was working locally because the libraries were all there :) It just wasn't pushing online... Anyway I will stop GRRRR ing now and will start singing your praises and actually finish that blog post! |
Oh, actually I had looked at your Very glad that your problem was solved! |
Solution suggested in rstudio/blogdown#169 discussing a similar issue.
I am also having an issue with For my personal website (repo here), I am using the Hugo Apero theme by Alison Hill, and am struggling with rendering The only lead that I am yet to try myself is this one but I am not able to figure out how to get that folder into my directory. I'd greatly appreciate any help with this, as I intend to use |
@rikudoukarthik I don't see your Also: https://bookdown.org/yihui/blogdown/a-quick-example.html#when-in-doubt-run-blogdowncheck_site |
I had
Thanks. I tried
When I had Also, is it necessary to run that command for all |
@rikudoukarthik This
This has been fixed a few months ago in the theme: hugo-apero/hugo-apero#78 You might be using an older version of the theme. |
@yihui Did you mean that I have to enter the series name as points like so:
I was mostly using Alison's code as reference, and she has done the same as me here, as a scalar. Please let me know if I have misunderstood. I tried the above as well, but to no avail.
I now updated the Apero theme but it still gave an error (a different one this time, see below), so I also updated Hugo from 0.91.0 to 0.101.0, after which the
|
It seems you are not using the latest version of blogdown. Please update your R packages, restart R, and serve the site again. You should see |
Thank you so much @yihui! My bad for not noticing that earlier. I appreciate you taking time out for such a basic issue. I love your packages and will keep exploring! |
First of all: thanks and congrats, blogdown is a fantastic beast that made a guy like me thinking about hosting a website and move slowly into the 21st century.
I worked myself through the blogdown book/documentation with glimpses to some online tutorials, I managed to deploy a first stab (using the bootstrap v4 theme) via netlify (http://rqkoelle.netlify.com).
Adding new pages as md (e.g. about-me) and more blog posts as md files do allow to run the hugo build on netlify.
However, if i use Rmd to make use of r in a blog this pipeline fails. In fact, the build is successfully completed, but the Rmd files are not converted into payload.
While the files sit nicely in the post/ folder: https://github.com/rainer-rq-koelle/rq-netlify-blog/tree/master/content/post nothing ends up in the public folder that serves the site.
I understand that the build command obviously only uses hugo on netlify and not the magic of blogdown I can use locally.
Is there a way to achieve this via the netlify deploy as well?
Or can i do something like blogdown::build_post() to just create the desired rmd to html conversion which can then be pushed to github?
My understanding from the first push of the local build_site() is that netlify seems to tolerate the html files created from the rmd in the public folder.
I would just like to avoid having to push loads of files when doing a local build to ensure the rmd to html conversion on a single (or little number of) files.
Thanks.
The text was updated successfully, but these errors were encountered: