-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Project template with conditional content for gitbook vs bs4_book #1201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…book, and potentially confusing to document)
instead of longer form `bookdown_skeleton_*`
|
I believe I tackled all the edits we discussed this AM:
|
Print a message for offline usage
[skip ci]
|
I have now taken into account all feedback:
Resolve from discussion with @apreshill
As the template is not hosted, provided cover-image: replace-me.pngwith the same intent to show that the config exist. I am just not sure at the end if
|
even if it does not work properly (building a url that odes not exist) [skip ci]
|
@apreshill unless you want to add something more about |
yihui
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks!
|
@cderv I believe I am ready to merge 👍 |
We need to put the logic in main bookdown_skeleton() function so that it works the same as the wrapper. * remove `create_html()` and only use `bookdown_skeleton()` with all the logic inside * Isolate the csl logic in a function to follow pattern * `create_*()` are just convenient exported wrapper to create the template
Hi @cderv -
Some tweaking will be needed, I decided to put the output format specific resources into separate folders. Not wedded to this approach over others, so feel free to change as you see fit.
I added some minimal pointers inside the chapters themselves for how to do very common/basic things, largely expanding upon what was already there inside the existing intro chapter. In doing so, I realized there is some custom content for
bs4_bookin two .Rmd files:04-citations.Rmd05-blocks.RmdFor now, in both of these files, I denoted that content with HTML comments:
<!--bs4_book-->specific things go in here
<!--end-->You might see a better way to handle this.
Revisiting our TODO list here from #1123 :
A project accessible from RStudio project wizard with drop-down (some wiring in this PR already provided by @cderv, needs tweaking)
A checkbox for users using GitHub Pages to automatically add the
.nojekyllfile and change the output directory todocs/(same as Distill's website, see: Add a checkbox for deploying to ghpages in New Bookdown Project window (inspired by distill) #1092; Images not rendering on gh-pages; might be missing some config step #1087)I'm happy to write some filler text into the book skeleton for this so that the example book gives some minimal instructions for users. (this PR right here)
Exported functions
create_bs4_book()andcreate_gitbookto do the same as above from the command line (see: Feature request: bookdown.skeleton function #225); also like Distill'screate_website()function: https://pkgs.rstudio.com/distill/reference/create_website.html) (done by @cderv)