Description Usage Arguments Examples
Create an article from a rmarkdown file and add it in a hugo repository
1 2 3 4 5 6 7 8 9 10 11 | nat_hugo_addarticle(
urlpath,
foldername,
title,
author,
categories,
description,
slug,
logourl_path,
metadata_photo
)
|
urlpath |
Path to the rmarkdown file (usually a location on the web) |
foldername |
name of the folder to be created under β/content/articles/' like β2019-09-nat' |
title |
Set the title of the article like 'article_xxx' |
author |
Set the author name like sri, greg etc (corresponding to names in the hugo repository) |
categories |
Set the category of the article like 'learn', 'nat' etc. |
description |
Set the description of the article like 'βnat' version 1.8.13 is now on CRAN!β |
slug |
Set the slug of the article like 'nat-1-8-13' |
logourl_path |
Path to the square logo file that is displayed as favicon (usually a location on the web) |
metadata_photo |
Set the metadata related to the photo to appear on the article (must be a wide figure) like c(photoauthor, photo_url) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
urlRemote <- "https://raw.githubusercontent.com/"
pathGithub <- "natverse/natverse_hugo/dev_pages/content/articles/2019-09-nat/"
pic_fileName <- "natverse_logo-sq.jpg"
urlRemote <- "https://raw.githubusercontent.com/"
vigpathGithub <- "natverse/nat/master/vignettes/"
vig_fileName <- "NeuroGeometry.Rmd"
wikiurlRemote <- "https://upload.wikimedia.org/"
wikipath <- "wikipedia/commons/4/45/"
wiki_fileName <- "Wide_lightning.jpg"
nat_hugo_addarticle(urlpath=paste0(urlRemote, vigpathGithub, vig_fileName),
foldername = '2019-09-nat', title = 'NeuroGeometry - Analysing 3D morphology of neurons',
author = c('greg'), categories = c('learn','nat'),
description = '`nat` version 1.8.13 is now on CRAN!',
slug = 'nat-1-8-13', logourl_path = paste0(urlRemote, pathGithub, pic_fileName),
metadata_photo = c('Wikipedia', paste0(wikiurlRemote, wikipath, wiki_fileName))
vig_fileName <- "neurons-intro.Rmd"
nat_hugo_addarticle(urlpath=paste0(urlRemote, vigpathGithub, vig_fileName),
foldername = '2019-09-neurons', title = 'Introduction to neurons and neuronlists',
author = c('greg'), categories = c('learn','nat'), description = '`nat` neurons and neuronlists!',
slug = 'nat',logourl_path = paste0(urlRemote, pathGithub, pic_fileName),
metadata_photo = c('Wikipedia', paste0(wikiurlRemote, wikipath, wiki_fileName))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.