Skip to content
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

Allow user to change bookdown::gitbook() options #84

Merged
merged 3 commits into from
May 25, 2020
Merged

Allow user to change bookdown::gitbook() options #84

merged 3 commits into from
May 25, 2020

Conversation

abichat
Copy link
Contributor

@abichat abichat commented May 18, 2020

With ellipsis here and the check of toc sub-options, YAML configuration like these will be passed to bookdown::gitbook correctly.

thesisdown::thesis_gitbook: 
  sharing:
    facebook: no
    github: yes
  toc: 
    before: "<center><b><a href='./'>My super title</a></b></center>"
    after: null

Note: it's a better version of my last PR, you can ignore it.
Note 2: it does not take into account other toc sub-options like scroll_highlight.

@abichat
Copy link
Contributor Author

abichat commented May 18, 2020

I'm working on a way to fix Note2, it will be done soon

@abichat
Copy link
Contributor Author

abichat commented May 18, 2020

I made a mistake with the different level of list but it's fixed now (with a totally different approach). You can try with these options

thesisdown::thesis_gitbook: 
  number_sections: FALSE
  config: 
    sharing:
      facebook: no
      github: yes
    toc: 
      scroll_highlight: no
      before: "<center><b><li><a href='./'>Titre</a></li></b></center>"
      after: null

Sorry to have done it in several PR :/

@ismayc
Copy link
Owner

ismayc commented May 18, 2020

Thanks! I’ve been meaning to do this for awhile. I’ll try to review over the next week.

@ismayc ismayc merged commit f9ee59b into ismayc:master May 25, 2020
ismayc added a commit that referenced this pull request May 25, 2020
* Add hadamardown template (#67)

* Add hadamardown

* Update documentation

* Update DESCRIPTION

* Switch to PDF by default

* Update README.md

* Update README.md

* updates README.md (#78)

* updates README.md

* changes dependencies from devtools to remotes.

* Update template.tex (#79)

* Add link to amsterdown pkg in README (#80)

* Fixed broken URLs and added few more (#85)

* Fixed broken URLs and added few more

* Reversed a URL change for markdown cheatsheet

I moved the Rmakrdown Cheatsheet under R Markdown and reversed the modification of the Markdown Cheatsheet.

* Allow user to change bookdown::gitbook() options (#84)

* Add ...

* Allow user to change "before" and "after" toc arguments

* Pass all type of option and sub-options to bookdown::gitbook

Co-authored-by: Antoine Bichat <30300749+abichat@users.noreply.github.com>
Co-authored-by: Leon Reteig <35737105+lcreteig@users.noreply.github.com>
Co-authored-by: Mehrad Mahmoudian <m.mahmoudian@gmail.com>
ismayc added a commit that referenced this pull request May 26, 2020
* Tweak phrasing

* Updates (#68)

* Add hadamardown template (#67)

* Add hadamardown

* Update documentation

* Update DESCRIPTION

Co-authored-by: Antoine Bichat <30300749+abichat@users.noreply.github.com>

* update (#88)

* Add hadamardown template (#67)

* Add hadamardown

* Update documentation

* Update DESCRIPTION

* Switch to PDF by default

* Update README.md

* Update README.md

* updates README.md (#78)

* updates README.md

* changes dependencies from devtools to remotes.

* Update template.tex (#79)

* Add link to amsterdown pkg in README (#80)

* Fixed broken URLs and added few more (#85)

* Fixed broken URLs and added few more

* Reversed a URL change for markdown cheatsheet

I moved the Rmakrdown Cheatsheet under R Markdown and reversed the modification of the Markdown Cheatsheet.

* Allow user to change bookdown::gitbook() options (#84)

* Add ...

* Allow user to change "before" and "after" toc arguments

* Pass all type of option and sub-options to bookdown::gitbook

Co-authored-by: Antoine Bichat <30300749+abichat@users.noreply.github.com>
Co-authored-by: Leon Reteig <35737105+lcreteig@users.noreply.github.com>
Co-authored-by: Mehrad Mahmoudian <m.mahmoudian@gmail.com>

* Fix Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 14.49998pt.

* Fix abstract messing up bib findings/fix spacing

* Move preliminary content to their own folder

* Start using {here}

* Apply {styler} / Can't use rmd_files with {thesisdown} in _bookdown.yml

* Remove extra line

Co-authored-by: Chester Ismay <chester.ismay@datarobot.com>
Co-authored-by: Antoine Bichat <30300749+abichat@users.noreply.github.com>
Co-authored-by: Leon Reteig <35737105+lcreteig@users.noreply.github.com>
Co-authored-by: Mehrad Mahmoudian <m.mahmoudian@gmail.com>
ismayc added a commit that referenced this pull request May 27, 2020
* Tweak phrasing

* Updates (#68)

* Add hadamardown template (#67)

* Add hadamardown

* Update documentation

* Update DESCRIPTION

Co-authored-by: Antoine Bichat <30300749+abichat@users.noreply.github.com>

* update (#88)

* Add hadamardown template (#67)

* Add hadamardown

* Update documentation

* Update DESCRIPTION

* Switch to PDF by default

* Update README.md

* Update README.md

* updates README.md (#78)

* updates README.md

* changes dependencies from devtools to remotes.

* Update template.tex (#79)

* Add link to amsterdown pkg in README (#80)

* Fixed broken URLs and added few more (#85)

* Fixed broken URLs and added few more

* Reversed a URL change for markdown cheatsheet

I moved the Rmakrdown Cheatsheet under R Markdown and reversed the modification of the Markdown Cheatsheet.

* Allow user to change bookdown::gitbook() options (#84)

* Add ...

* Allow user to change "before" and "after" toc arguments

* Pass all type of option and sub-options to bookdown::gitbook

Co-authored-by: Antoine Bichat <30300749+abichat@users.noreply.github.com>
Co-authored-by: Leon Reteig <35737105+lcreteig@users.noreply.github.com>
Co-authored-by: Mehrad Mahmoudian <m.mahmoudian@gmail.com>

* Fix Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 14.49998pt.

* Fix abstract messing up bib findings/fix spacing

* Move preliminary content to their own folder

* Start using {here}

* Apply {styler} / Can't use rmd_files with {thesisdown} in _bookdown.yml

* Remove extra line

* Switch to https from http

* Add License, update dev version, clean up dependencies

* Update documentation

* Clean up Rmds

* Reduce size of data

* Tweak package definition in R file

* Add {usethis} commands for setup

* Move pictures to images folder

* Add hex to README

* Add pkgdown build to docs

* Update NEWS for 0.1.0

Co-authored-by: Chester Ismay <chester.ismay@datarobot.com>
Co-authored-by: Antoine Bichat <30300749+abichat@users.noreply.github.com>
Co-authored-by: Leon Reteig <35737105+lcreteig@users.noreply.github.com>
Co-authored-by: Mehrad Mahmoudian <m.mahmoudian@gmail.com>
ismayc added a commit that referenced this pull request May 27, 2020
* Tweak phrasing

* Updates (#68)

* Add hadamardown template (#67)

* Add hadamardown

* Update documentation

* Update DESCRIPTION

Co-authored-by: Antoine Bichat <30300749+abichat@users.noreply.github.com>

* update (#88)

* Add hadamardown template (#67)

* Add hadamardown

* Update documentation

* Update DESCRIPTION

* Switch to PDF by default

* Update README.md

* Update README.md

* updates README.md (#78)

* updates README.md

* changes dependencies from devtools to remotes.

* Update template.tex (#79)

* Add link to amsterdown pkg in README (#80)

* Fixed broken URLs and added few more (#85)

* Fixed broken URLs and added few more

* Reversed a URL change for markdown cheatsheet

I moved the Rmakrdown Cheatsheet under R Markdown and reversed the modification of the Markdown Cheatsheet.

* Allow user to change bookdown::gitbook() options (#84)

* Add ...

* Allow user to change "before" and "after" toc arguments

* Pass all type of option and sub-options to bookdown::gitbook

Co-authored-by: Antoine Bichat <30300749+abichat@users.noreply.github.com>
Co-authored-by: Leon Reteig <35737105+lcreteig@users.noreply.github.com>
Co-authored-by: Mehrad Mahmoudian <m.mahmoudian@gmail.com>

* Fix Package Fancyhdr Warning: \headheight is too small (12.0pt):
Make it at least 14.49998pt.

* Fix abstract messing up bib findings/fix spacing

* Move preliminary content to their own folder

* Start using {here}

* Apply {styler} / Can't use rmd_files with {thesisdown} in _bookdown.yml

* Remove extra line

* Switch to https from http

* Add License, update dev version, clean up dependencies

* Update documentation

* Clean up Rmds

* Reduce size of data

* Tweak package definition in R file

* Add {usethis} commands for setup

* Move pictures to images folder

* Add hex to README

* Add pkgdown build to docs

* Update NEWS for 0.1.0

* Add /docs/ to git (Will use GitHub Actions to build pkgdown down the road)

Co-authored-by: Chester Ismay <chester.ismay@datarobot.com>
Co-authored-by: Antoine Bichat <30300749+abichat@users.noreply.github.com>
Co-authored-by: Leon Reteig <35737105+lcreteig@users.noreply.github.com>
Co-authored-by: Mehrad Mahmoudian <m.mahmoudian@gmail.com>
@github-actions
Copy link

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org whenever possible) and link to this issue. If a reprex is not applicable, recording a short Loom video showing what you are seeing can go a long way in helping to diagnose problems.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants