I found instructions to add a logo to the top of my Table of Contents (TOC). https://rstudio4edu.github.io/rstudio4edu-book/book-fancy.html
However, the edits I made are not reflected in the bookdown website.
I have made edits to
_output.yml
bookdown::gitbook:
css: style.css
config:
toc:
before: |
<li class="toc-logo"><a href="./"><img src="docs/images/logos/logo-transparent.png"></a></li>
after: |
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
edit: https://github.com/rstudio/bookdown-demo/edit/master/%s
download: ["pdf", "epub"]
bookdown::pdf_book:
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: natbib
keep_tex: yes
bookdown::epub_book: default
bookdown::bs4_book: default
and the style.css
/*--- LOGO ---*/
.toc-logo {
width: 200px !important;
object-fit: contain;
margin: 0 auto;
}
.toc-logo img {
max-width: 100%;
margin-bottom: 10px;
}
.summary > li:first-child {
height: auto !important;
}
my index.Rmd file looks like this:
title: "Book"
author: "FH"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output: bookdown::gitbook
documentclass: book
bibliography: [book.bib, packages.bib]
biblio-style: apalike
link-citations: yes
cover-image: images/logos/logo-transparent.png
github-repo: FH/book
description: "Guide book."
I am not sure why the when I Build Book, the logo change is not reflected. Also it seems that maybe the "tile: "Book" in index.Rmd overrides everything else?
What it looks like now: