Skip to content

Conversation

@apreshill
Copy link
Contributor

@apreshill apreshill commented Jul 8, 2021

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_book in two .Rmd files:

  • 04-citations.Rmd
  • 05-blocks.Rmd

For 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 :

@apreshill apreshill linked an issue Jul 8, 2021 that may be closed by this pull request
@apreshill apreshill requested a review from cderv July 8, 2021 20:19
@cderv cderv added this to the v0.23 milestone Jul 9, 2021
@apreshill
Copy link
Contributor Author

apreshill commented Jul 27, 2021

Hi @yihui and @cderv -

I believe I tackled all the edits we discussed this AM:

  • Added the edit key for gitbook (note to self: the keys are different per format now- current docs for custom configs are not specific to output formats) 704a43f

  • Add 404 page and document together with HTML metadata 5e98955

  • Clarified custom blocks section to link to R Markdown cookbook: 9ed4475

  • Add Zotero link for downloading csl style files: 1fe0a05

  • Add complete list of bs4_book callout blocks that are built-in: 234a301

@cderv
Copy link
Collaborator

cderv commented Jul 27, 2021

I have now taken into account all feedback:

  • CSL file is downloaded during create_bs4_book() function. I used a tryCatch call so that we don't error is download is not possible and the project is still created.
Resolve from discussion with @apreshill
  • cover.png has been removed. We now copy the logo included in man/ which is in help/ when install. (devtools' system.file shims does not account for that). However, this will not be so useful because
    • cover-image can be a filename concatenated to url variable.
    • cover-image can be absolute url otherwise

As the template is not hosted, provided cover.png is not useful because it will be concatenated to our dummy url and it won't be really useful. The only purpose would be to show that this exist, but the fact that cover.png exists does not matter. We could use

cover-image: replace-me.png

with the same intent to show that the config exist.

I am just not sure at the end if cover.png needs to be in the resulting template folder.

  • cover.png has been removed. We use dummy value to show that it can be configured.

cderv added 2 commits July 27, 2021 22:37
even if it does not work properly (building a url that odes not exist)

[skip ci]
@cderv
Copy link
Collaborator

cderv commented Jul 27, 2021

@apreshill unless you want to add something more about cover-image in sketelon Rmd, I'll merge this PR tomorrow.

Copy link
Contributor

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

@apreshill
Copy link
Contributor Author

@cderv I believe I am ready to merge 👍

cderv added 5 commits July 28, 2021 09:57
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
@cderv cderv merged commit b428ade into rstudio:main Jul 28, 2021
@cderv cderv deleted the template branch July 28, 2021 08:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create bs4_book project template Feature request: bookdown.skeleton function

3 participants