IALSA / tutorials

Collection of tutorials to help you get started with GitHub, R, RStudio, and more.
5 stars 5 forks source link

Steps to upgrade site's Bootstrap library & dependent code #6

Open wibeasley opened 9 years ago

wibeasley commented 9 years ago

@andkov See https://github.com/rstudio/rmarkdown/issues/263 to take advantage of the navigation bar working on mobile browsers.

The steps are

  1. upgrade to the newest GitHub version of RMarkdown with devtools. This is the main thing that makes it build with newest supported bootstrap version (currently 3.3.1 instead of 2.3.2).
  2. The CSS in include/before_body.html has changed a lot. It probably makes the most sense to copy the newest version from the RMarkdown site, then add your heading/links to it. Trying to upgrade your existing menu structure's CSS would be pretty error-prone.
  3. JJ also updated include/in_header.html. I copied that too.
  4. Delete the old bootstrap library code in libs/
  5. The 'GitHub' button doesn't render properly on the menu any more. The top alignment was 0 px, and I didn't see how to space it correctly. So I put a button at the bottom of the index page instead. I also put it in a well panel with a Zenodo DOI badge.
  6. If you did any other custom stuff, it may need to change with the new version of Bootstrap. See http://bootswatch.com/ examples for the code.
  7. Rebuild/rerender all the md files into html, with your typical process. Then push to the GitHub server.

For an example, see the three Dec 21 commits in https://github.com/LiveOak/NlsyLinks/commits/gh-pages.

It's worked well on the two sites http://liveoak.github.io/NlsyLinks/ and http://ouhscbbmc.github.io/MReportingPublic/

wibeasley commented 9 years ago

See the improved documentation that JJ wrote: https://github.com/rstudio/rmarkdown/issues/335