I am setting up a bookdown and struggling to render the book using bootstrap.
I can render without issues using gitbook but run into errors using bootstrap. For now, the book is pretty simple so I am unsure where the issue lies.
The error message from the Build window
output file: 04-project_02.knit.md
"C:/Program Files/RStudio/bin/quarto/bin/tools/pandoc" +RTS -K512m -RTS bookdownproj.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output bookdownproj.html --lua-filter "C:\Users\pierr\AppData\Local\R\win-library\4.2\bookdown\rmarkdown\lua\custom-environment.lua" --lua-filter "C:\Users\pierr\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "C:\Users\pierr\AppData\Local\R\win-library\4.2\rmarkdown\rmarkdown\lua\latex-div.lua" --metadata-file "C:\Users\pierr\AppData\Local\Temp\RtmpMFDSnn\file842c34876b8b" --wrap preserve --standalone --section-divs --template "C:\Users\pierr\AppData\Local\R\win-library\4.2\bookdown\templates\bs4_book.html" --highlight-style pygments --number-sections --css style.css --mathjax --include-in-header "C:\Users\pierr\AppData\Local\Temp\RtmpMFDSnn\rmarkdown-str842c423a75a.html"
Tweaking docs/index.html
Tweaking docs/introduction-to-networks-and-food-webs.html
Tweaking docs/projects-in-this-portfolio.html
Tweaking docs/how-to-simplify-networks-using-machine-learning-algorithms.html
Tweaking docs/how-fast-are-you-based-on-characteristics.html
Tweaking docs/404.html
Error in xml_children(x)[[search]] : subscript out of bounds
Calls: local ... bs4_chapter_tweak -> tweak_navbar -> template_link_icon -> <Anonymous>
Execution halted
Error: bookdown::render_book() failed to render the output format 'bookdown::bs4_book'.
Execution halted
Exited with status 1.
My index.Rmd starts with
---
title: "My Title
author: "My name"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
url: https://mydomain.github.io/mybookdown/index.html
output:
bookdown::gitbook:
highlight: tango
documentclass: book
new_session: yes # use the K-M rendering method
description: |
Report of some project
---
# About Me
I replace the names in URLs for anonimity. Still working on this.
The _bookdown.yml file:
book_filename: "bookdownproj"
new_session: true
before_chapter_script: ["_global_options.R", "_before_chapter.R"]
output_dir: "docs"
delete_merged_file: true
edit: https://github.com/mydomain/mybookdown/edit/main/%s
view: https://github.com/mydomain/mybookdown/blob/main/%s
language:
ui:
chapter_name: "Part "
And the _output.yml:
bookdown::bs4_book:
css: style.css
theme:
bootswatch: cerulean
primary: "#0403b2"
repo:
base: https://github.com/mydomain/mybookdown.git
branch: main
subdir: docs/
bookdown::gitbook:
css: style.css
config:
toc:
before: |
<li><a href="./">Data Science Report</a></li>
after: |
<li><a href="https://github.com/mydomain/mybookdown.git" target="blank">View the repository</a></li>
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
toc_float:
collapsed: TRUE