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

blogdown 0.7 fails to place HTML from Rmd in public #312

Closed
ConorIA opened this issue Jul 9, 2018 · 11 comments
Closed

blogdown 0.7 fails to place HTML from Rmd in public #312

ConorIA opened this issue Jul 9, 2018 · 11 comments
Milestone

Comments

@ConorIA
Copy link

ConorIA commented Jul 9, 2018

I was concerned that the posts that are written in Rmd are missing from my website (site: https://conr.ca; code: https://gitlab.com/ConorIA/conr_ca).* I use the rocker/tidyverse Docker image as base and install blogdown from CRAN before running blogdown::build_site().

I can reproduce the issue on my laptop with blogdown 0.7, as well as the current git commit. In the tree output below, my Rmd files all have a _files folder, but none of them have an index.html file. The other pages, those that do have a corresponding .html file, were all vanilla markdown.

On my server (with blogdown 0.6, this issue is not present; all files are present in /public.)

cd public/post && tree                                                                                       academic @ master|…7
.
├── 2017-09-19_bookmarklet
│   └── index.html
├── 2018-01-11_revisiting_december_temps_files
│   └── figure-html
│       ├── unnamed-chunk-3-1.png
│       ├── unnamed-chunk-5-1.png
│       └── unnamed-chunk-6-1.png
├── 2018-01-14_winter_polar_events_in_to_files
│   └── figure-html
│       └── unnamed-chunk-11-1.png
├── 2018-02-14_playing_with_bases
│   └── index.html
├── 2018-05-09-choosing-stations-in-peru-pt-1_files
├── 2018-05-22-choosing-stations-in-peru-pt-2_files
│   └── figure-html
│       └── unnamed-chunk-27-1.png
├── index.html
├── index.xml
├── installing-r-on-android-via-termux
│   └── index.html
└── page
    └── 1
        └── index.html

EDIT: Might be related to #305. I haven't set the global option for draft. Is it on by default?
It would appear not. Rscript -e "options(blogdown.draft.output = FALSE); blogdown::build_site()" gave the same result.

* Note: not missing anymore as I've rolled back to bookdown 0.6

@yihui yihui added this to the v0.8 milestone Jul 9, 2018
@yihui yihui added the bug label Jul 9, 2018
@yihui yihui closed this as completed in 8bf476d Jul 9, 2018
@yihui
Copy link
Member

yihui commented Jul 9, 2018

@ConorIA Ah. That was due to a careless omission of the ! operator. Should be fixed now. Thanks for the report! You can install the development version via

devtools::install_github('rstudio/blogdown')

@mwaldstein FYI, the implementation for #305 was buggy. You need to use the current dev version of blogdown.

@ConorIA
Copy link
Author

ConorIA commented Jul 10, 2018

Thanks, @yihui!

@DataStrategist
Copy link

DataStrategist commented Jul 12, 2018

I think the new dev version of blogdown is still a bit buggy in terms of this...

This is my problem. I have a .Rmd. If I Knit it by hitting the knit button in Rstudio, the resulting file is perfect. However, if I try to commit that change alone, the post is not displayed at all in netlify.

In order to get it to display on netlify, I first have to blogdown::build_site() (which is what you say in your book), but that function converts this:
image

into this:
image

Is there some other step that I should do other than blogdown:::build_site() In order to get the file to render properly?

By the way, serve site DOES display the file correctly, but doesn't rewrite the html version in content/post/ so doesn't really help in this case.

(.md files look fine on netlify)

@yihui
Copy link
Member

yihui commented Jul 12, 2018

@DataStrategist Please always show me the source (either a Github repo or just plain-text code here in the Github issue) when you run into problems. I cannot magically read the source text behind screenshots: https://yihui.name/en/2018/01/screenshots-vs-text/

Anyway, from your Github profile, thsi might be what you were talking about: DataStrategist/amitkohli.com@e48a6b5 No need to GRRRRR :) You still have to listen to me: don't use the Knit button -- it just won't work: https://bookdown.org/yihui/blogdown/workflow.html

This particular issue reported by @ConorIA has been fixed. I don't think your new issue is still relevant to his. Let's move to #169 (comment).

@DataStrategist
Copy link

DataStrategist commented Jul 12, 2018

Sorry for not putting my github repo... won't happen again. How embarassing that you read my commit message!!! LOL! It's just since I'm committing html, it's tough to see the changes so I'm actually working for work, and then on and off committing things here and feel like I"m going crazy doing the same thing three times!! :D Sorry, I'll try to not grrrrrrrrrrr.

I know the knit won't work... I was more just checking that the code was fine locally.

Moving to #169.

@yihui
Copy link
Member

yihui commented Jul 12, 2018

No worries. I'm sure we can figure it out.

@GuangchuangYu
Copy link

GuangchuangYu commented Oct 24, 2018

hi yihui, the issue seems still exists.

here is the repo and the output folder.

and the hugo version:

Hugo Static Site Generator v0.49.2/extended linux/amd64 BuildDate: unknown

I have tested with both CRAN (0.8) and github versions.

@ConorIA
Copy link
Author

ConorIA commented Oct 24, 2018

@GuangchuangYu, excuse me if I'm misreading something in your repo, but are you building with your Makefile? The line options(blogdown.draft.output = TRUE) will prevent the RMD files from rendering.

@yihui
Copy link
Member

yihui commented Oct 24, 2018

Right. Don't do this: GuangchuangYu/software@8bd164c

@GuangchuangYu
Copy link

screenshot_2018-10-29_09-06-46

There is no effect without the option. Any idea?

@GuangchuangYu
Copy link

just come across with digitalcraftsman/hugo-material-docs#84, and downgrade hugo to v 0.31 and everything works fine. 😿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants