bookdown icon indicating copy to clipboard operation
bookdown copied to clipboard

"View Book Source" link always points to the "base" dir instead of "base + subdir"

Open kulbhushanchand opened this issue 4 years ago • 3 comments

The "View Book Source" link at the bottom left corner always points to the base directory, which is fine if the docs source files resides in top level directory. However, if a subdirectory is defined for source files, it should (ideally) links to the "base+subdir".

Example of my setup : top level directory: https://github.com/kulbhushanchand/BioNES book_source directory: https://github.com/kulbhushanchand/BioNES/tree/master/docs_source build directory: https://github.com/kulbhushanchand/BioNES/tree/master/docs

Setup:

bookdown::bs4_book:
  theme:
    primary: "#637238"
  repo: 
    base: https://github.com/kulbhushanchand/BioNES
    branch: master
    subdir: docs_source
  css: style.css

Link in question: image

kulbhushanchand avatar Sep 19 '21 12:09 kulbhushanchand

@maelle you added the feature of subdir in #1036

It seems it was chosen to point book source to the main repo. However, it makes also sense to point to the subdir part of the repo when subdir is provided.

Do you agree ?

cderv avatar Sep 20 '21 08:09 cderv

It might make sense indeed!

If not and in any case https://github.com/rstudio/bookdown/issues/1011 is about adding more flexibility incl. links for the left and right sidebars so users who disagree with whatever the default becomes could still get another behaviour.

maelle avatar Sep 20 '21 09:09 maelle

Any chance this issue request may make to the future release?

kulbhushanchand avatar Apr 16 '22 09:04 kulbhushanchand