Documentation on authoring webpages using RMarkdown and Github (to host the site)
Example _site.yml
doc
name: "Bioinformatics & Phylogenetics"
output_dir: "docs"
navbar:
title: "Code"
left:
- text: "Home"
href: index.html
- text: "RStudio"
icon: fa-file-alt
menu:
- text: Introduction
href: rstudio-intro.html
- text: "---------"
- text: "Plots & data"
- text: Aesthetics
href: rstudio-aesthetics.html
- text: Plots
href: rstudio-plots.html
- text: Statistics
href: rstudio-statistics.html
- text: "---------"
- text: "RMarkdown"
- text: Introduction
href: rmd-intro.html
- text: Bookdown
href: rmd-bookdown.html
- text: Websites
href: rmd-webpages.html
- text: "Sequence files"
icon: fa-dna
menu:
- text: Command line
href: sequence-files.html
- text: Visualising and editing
href: visualise.html
- text: "Muscle"
href: muscle.html
- text: "Phylogenetics"
icon: fa-code-branch
menu:
- text: "Introduction"
href: phylo-intro.html
- text: "Evolutionary models"
href: evolutionary-models.html
- text: "IQ-TREE"
href: iqtree.html
- text: "MrBayes"
href: mrbayes.html
output:
html_document:
theme: yeti
highlight: monochrome
include:
after_body: footer.html
Icons for webpages
If using the Simple R Markdown website
option to create a website then the default available themes options include:
“cerulean”, “cosmo”, “cyborg”, “darkly”, “flatly”, “journal”, “lumen”, “paper”, “readable”, “sandstone”, “simplex”, “slate”, “spacelab”, “superhero”, “united”, “yeti”…check them out here.
Highlight options include:
“default”, “tango”, “pygments”, “kate”, “monochrome”, “espresso”, “zenburn”, “haddock”, “breezedark”, “textmate”.
They can be changed by including the following in the ‘YAML’
output:
html_document:
theme: united
highlight: monochrome
remotes::install_github("rstudio/bootstraplib")
library(bootstraplib)
To start using bootstraplib in your rmarkdown::html_documents, install the following:
remotes::install_github("rstudio/rmarkdown#1706")
Use bootstrap_version
and theme
to choose the Bootstrap version and a Bootswatch theme. These arguments are currently supported only in html_document
and html_document_base
.
---
output:
html_document:
bootstrap_version: 4+3
theme: minty
---
You can also add theme customizations inside any R code chunk (these customizations end up influencing the Bootstrap CSS included in the output document).
library(bootstraplib)
bs_theme_accent_colors(primary = 'green')
Some extra info here
Get extra bits of html from the bootswatch theme webpages. E.g. minty
Work by Siobhon Egan
siobhon.egan@murdoch.edu.au