R/gallery.R
gallery_items.Rd
This function allows you to create an image gallery type of website, using the hugo hugrid theme, with minimal setup in a google drive folder. Files in the folder starting with the folder/project name are omitted. The rest is processed in order, and added to the items.toml file. Everything works by linking to google drive, so files are hosted there, but all files should hence be available through a shared link. Details for setup are provided below.
gallery_items(drive_folder, path = "data/items.toml")
full path to google drive folder without trailing slash
path to the items.toml
file to be created
Every image file should start with a code, then a name, and finally a
type, separated with underscores (e.g. code_name_type.jpg
). Types can be
thumb
, for the thumbnail images on the main page grid, image
for the
image used for display when the thumbnail is clicked, and url
for the file
that is linked to when clicking the button that is foreseen in the theme.
If other types are included, these are added as separate buttons, by appending an html <a></a> tag to the description (explained below). For the button text, the type is used, but underscores are replaced by spaces.
A csv file should be included as well, with a column code
that links
the rows with the image files, and columns title
and description
, which
are displayed next to the image
type file.