I already have a site created with blogdown and want to make it live. To try it out, I built the site using blogdown::build_site() . After managing to upload all the content from the public folder on Github. I see that the formatting of my site does not match what I have on the localhost when I run blogdown::serve_site(). The site I created is slightly complex since there are many subfolders created under each topic. I used the Hugo Book theme from this github page . The format of the site is the same as shown on the theme's github page.
I also checked the index.html file from the public folder and it looks like the image above. I am not sure how can I make my site to look like the second picture. I would appreciate any help and thank you in advance.
BTW, this has been cross-posted to Issue with site formatting with blogdown::build_site(). · Issue #743 · rstudio/blogdown · GitHub .
cderv
December 10, 2022, 1:58pm
2
See answer in the Github issue
opened 03:00PM - 09 Dec 22 UTC
closed 03:41PM - 12 Dec 22 UTC
question
I created a site with blogdown and tried to upload it to Github Pages. I first u… sed blogdown::build_site() to build my site and uploaded the the content from the newly created public folder and added them into Github. The issue is my site on Github does not match the same formatting as the original site I have in my localhost when I run blogdown::serve_site(). I used the Hugo book theme from this github [page](https://github.com/alex-shpak/hugo-book).
I already posted this issue in the R Studio Community forum, [here](https://community.rstudio.com/t/blogdown-site-formatting-issue-with-blogdown-build-site/154650) and Stack Overflow [here](https://stackoverflow.com/questions/74732959/blogdown-site-formatting-issue-with-blogdownbuild-site) and did not get a response yet. Both were sent one to two days ago.
![image](https://user-images.githubusercontent.com/45323076/206730609-9d661a92-a546-4e11-82ae-888b03fe8307.png)
**Check_site results:**
```
> blogdown::check_site()
― Running a series of automated checks for your blogdown website project...
---------------------------------------------------------------------------------------------------------------------------
○ A successful check looks like this.
● [TODO] A check that needs your attention looks like this.
| Let's check out your blogdown site!
---------------------------------------------------------------------------------------------------------------------------
― Checking config.yaml
| Checking "baseURL" setting for Hugo...
○ Found baseURL = "https://www.datainwonderland.com"; nothing to do here!
| Checking "ignoreFiles" setting for Hugo...
● [TODO] Set "ignoreFiles" to ["\\.Rmd$", "\\.Rmarkdown$", "_cache$"]
| Checking setting for Hugo's Markdown renderer...
○ All set! Found the "unsafe" setting for goldmark.
― Check complete: config.yaml
― Checking index.Rmd in the root directory
○ index.Rmd is correctly configured.
― Check complete: index.Rmd
― Checking .gitignore
● [TODO] .gitignore was not found. You may want to add this.
― Checking Hugo
| Checking Hugo version...
○ Found 5 versions of Hugo. You are using Hugo 0.108.0.
| Checking .Rprofile for Hugo version used by blogdown...
○ blogdown is using Hugo 0.108.0 to build site locally.
― Check complete: Hugo
― Checking netlify.toml...
● [TODO] netlify.toml was not found. Use blogdown::config_netlify() to create file.
― Checking content files
| Checking for validity of YAML metadata in posts...
○ All YAML metadata appears to be syntactically valid.
| Checking for previewed content that will not be published...
○ Found 0 files with future publish dates.
○ Found 0 files marked as drafts.
| Checking your R Markdown content...
○ All R Markdown files have been knitted.
○ All R Markdown output files are up to date with their source files.
| Checking for .html/.md files to clean up...
● [TODO] Found 2 duplicate output files:
content/docs/R/visualize/maps.html
content/docs/R/visualize/tables.html
To fix, run blogdown::clean_duplicates(preview = FALSE).
○ Found 0 incompatible .html files to clean up.
| Checking for the unnecessary 'content/' directory in theme...
○ Great! Your theme does not contain the content/ directory.
― Check complete: Content
```
```
> xfun::session_info('blogdown')
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Ventura 13.0.1, RStudio 2022.7.2.576
Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8
Package version:
base64enc_0.1.3 blogdown_1.15 bookdown_0.30 bslib_0.4.1 cachem_1.0.6 cli_3.4.1 digest_0.6.30
evaluate_0.18 fastmap_1.1.0 fs_1.5.2 glue_1.6.2 graphics_4.2.1 grDevices_4.2.1 highr_0.9
htmltools_0.5.3 httpuv_1.6.6 jquerylib_0.1.4 jsonlite_1.8.4 knitr_1.41 later_1.3.0 lifecycle_1.0.3
magrittr_2.0.3 memoise_2.0.1 methods_4.2.1 mime_0.12 promises_1.2.0.1 R6_2.5.1 rappdirs_0.3.3
Rcpp_1.0.9 rlang_1.0.6 rmarkdown_2.18 sass_0.4.4 servr_0.25 stats_4.2.1 stringi_1.7.8
stringr_1.5.0 tinytex_0.42 tools_4.2.1 utils_4.2.1 vctrs_0.5.1 xfun_0.35 yaml_2.3.6
Hugo version: 0.108.0
```
system
Closed
December 17, 2022, 1:58pm
3
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.