MyNixOS website logo
Description

Automatically Generate _site.yml.

The goal of 'siteymlgen' is to make it easy to organise the building of your 'R Markdown' website. The init() function placed within the first code chunk of the index.Rmd file of an 'R' project directory will initiate the generation of an automatically written _site.yml file. 'siteymlgen' recommends a specific naming convention for your 'R Markdown' files. This naming will ensure that your navbar layout is ordered according to a hierarchy.

siteymlgen - Automatically generate a _site.yml for Rmarkdown websites

Lifecycle:maturing Rbuildstatus

siteymlgen makes it easy to organise R Markdown website output. The init() function placed within the first code chunk of the index.Rmd file of an R project directory will initiate the generation of an automatically written _site.yml file. siteymlgen recomends a specific naming convention for your markdown files. This naming will ensure that your navbar layout is ordered according to a heirarchy.

Installation

You can install siteymlgen …:

Or you can install the development version of siteymlgen from GitHub with:

devtools::install_github("Acribbs/siteymlgen")

Naming convention

In order to control how your website navbar is ordered then you need to stick to the following naming convention:

[A-Z][1-9]_TitleofTab.Rmd

e.g. A1_FileOne.Rmd

The capital first letter of the file name controls the layout position of the tab in the navbar. The number controls the position within the dropdown menu. If you would like a drop down tab menu then label your files:

B1_test1.Rmd, B2_test1.Rmd and B3_test1.Rmd.

This will ultimately render as:

Example

Included within this package is data that demonstrates the functionality of this project. First copy the data to a new folder:

dir.create(paste0(getwd(), "/test"))
file.copy(system.file("extdata", package="siteymlgen"), paste0(getwd(), "/test"), recursive = TRUE)

Then naviage to the directory and create a new R project.

All .Rmd files should be located within a single directory. index.Rmd will become the home page.

Add an empty YAML file named _site.yml, which will be populated by siteymlgen according to your file names and input options supplied to init(). ?pkgdown::build_site() Set up build tools so that you can build an R markdown website and then “Build Website”:

Then build your website:

Metadata

Version

1.0.0

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows