library(ramp.uganda)Layout
This can be used to build, modify, or reconstruct the _quarto.yml page.
In a Quarto website, the sidebar layout is found in _quarto.yml. The sidebar is formatted in text that creates the nested menus at the right hand side of the webpage, with nested sub-menus that link to view information by region or district. The following creates a new _quarto.yml file.
If it ever needs to be updated, follow the instructions.
NOTE: Proceed with Caution! the suffix
ymltells us we’re working with ayamlstands foryet another markup language.Markup languages are a “best bad solution” to document preparation. Syntax is a glorious pain in the butt to learn and implement. Before you modify something, it’s good practice to save a backup that works.
top
This is the text at the top of _quarto.yml
top = paste(
"project:\n",
" type: website\n",
" output-dir: ../UW/uganda_intelligence\n",
"\n",
"website:\n",
" title: Malaria in Uganda\n",
" navbar:\n",
" left:\n",
" - href: index.qmd\n",
" text: Home\n",
" - facility_data.qmd\n",
" - text: Vector Control\n",
" menu:\n",
" - irs.qmd\n",
" - itn.qmd\n",
" - text: Site\n",
" menu:\n",
" - maintain/layout.qmd\n",
" - maintain/region_pages.qmd\n",
" - maintain/district_pages.qmd\n",
" - about.qmd\n",
" sidebar:\n",
" style: \"docked\"\n",
" search: true\n",
" collapse-level: 1\n",
" contents:\n",
" - section: uganda.qmd\n",
" contents:\n",
" - irs.qmd\n",
" - itn.qmd \n", sep="")bottom
This is the text at the bottom of _quarto.yml
bottom = paste(
"format:\n",
" html:\n",
" theme: cosmo\n",
" css: styles.css\n",
" toc: true\n\n",
"editor: visual\n", sep="")Updating
To rebuild (or to modify) _quarto.yml
Modify the
topor thebottomormake_sidebarRun
make_sidebar
make_sidebar()Open the new _quarto.yml and check it for errors
Back up the old
_quarto.yml
file.copy("../_quarto.yml", "./_old_quarto.yml")- Replace the existing
file.copy("./_quarto.yml", "../_quarto.yml", overwrite=TRUE)