Giter Site home page Giter Site logo

Comments (4)

cderv avatar cderv commented on June 12, 2024

in a navigation bar at the top (like here).

The website code source is at https://github.com/rstudio/bookdown-demo/

The TOC on the top is just some CSS : https://github.com/rstudio/bookdown-demo/blob/main/toc.css

You can probably achieve the same using similar CSS.

from bookdown.

cderv avatar cderv commented on June 12, 2024

Also if you don't know about it, there is a new project called Quarto that unifies and extends what has been done over the years in the R Markdown ecosystem.

This tool is developed by a team close to R Markdown ecosystem too. it is not a replacement per-se but a lot of improvment has been made and design has been rethought. Especially:

Maybe it could be of interest. For R users, it is quite similar to R Markdown.

from bookdown.

Walser52 avatar Walser52 commented on June 12, 2024

I was looking for something more automated. I'm new to HTML so what I say might be total nonsense. Nevertheless, I can create a navigation bar at the top and use it via the in_header argument, but won't I have to update the contents of the bar manually at the end of the day?

I was putting off diving into Quarto but thanks to you I finally took the plunge. Thank you. :)

from bookdown.

cderv avatar cderv commented on June 12, 2024

I was looking for something more automated.

We don't have such feature built-in. However, tweaking the generated TOC using CSS to make a different layout is automated, in the sense that if the TOC update, it will be updated.

Nevertheless, I can create a navigation bar at the top and use it via the in_header argument, but won't I have to update the contents of the bar manually at the end of the day?

If you create the navigation bar hard coding the TOC it won't update. Though you could also tweak the templates to insert the TOC where you want, but this is more complex IMO than CSS tweaks.

I was putting off diving into Quarto but thanks to you I finally took the plunge. Thank you. :)

Good! When looking for some specific new things like you do, having a dive into Quarto can be worth it IMO, even for an R user.

from bookdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.