rstudio / blogdown

Create Blogs and Websites with R Markdown
https://pkgs.rstudio.com/blogdown/
1.73k stars 335 forks source link

Deploy on Amazon EC2 #133

Closed Toniiiio closed 7 years ago

Toniiiio commented 7 years ago

Hi, I try to get blogdown running on EC2:

The preview works:

blogdown::serve_site()

But deploy not:

blogdown::build_site()

I get an empty page: http://ec2-13-59-94-130.us-east-2.compute.amazonaws.com/shiny/rstudio/sample-apps/blogdown/ If i look at Index.Rmd it is indeed empty. I can edit it and add text and then it shows the text.

I looked into here: https://proquestionasker.github.io/blog/Making_Site/#page-templates-and-fixing-blank-pages But it didnt help.

I feel like i am missing sthg? Thanks for your help!

Code used:

devtools::install_github("rstudio/blogdown")
library(blogdown)
install_hugo()
# create folder via putty
# give rights to rstudio via ' sudo chmod -R 777 blogdown' 
setwd("/home/rstudio/ShinyApps/sample-apps/blogdown")
new_site()
blogdown::serve_site() 
blogdown::build_site()

Details:


> blogdown::serve_site() 
Started building sites ...
Built site for language en:
0 draft content
0 future content
0 expired content
4 regular pages created
16 other pages created
0 non-page files copied
0 paginator pages created
3 tags created
1 categories created
total in 13 ms
Serving the directory /home/rstudio/ShinyApps/sample-apps/blogdown at http://127.0.0.1:4321

> blogdown::build_site()
Started building sites ...
Built site for language en:
0 draft content
0 future content
0 expired content
4 regular pages created
16 other pages created
0 non-page files copied
0 paginator pages created
3 tags created
1 categories created
total in 13 ms
yihui commented 7 years ago

It is simply a static website, so EC2 seems to be an overkill. S3 would be a more natural choice. Actually even S3 is an overkill. There are simpler options: https://bookdown.org/yihui/blogdown/deployment.html

vfulco commented 6 years ago

At risk of a github faux pas, wondering if anyone has tips, tricks on this? Regrettably in mainland China even with a fully registered company and government website license (ICP), they will not allow websites to be served from S3. Inexplicable so looking for other answers. Thinking about dokku which would then allow me to add microservices on same server. TIA.