igs | R Documentation |
generates html statement to insert graphics in a Hugo generated web document
igs(filename, opts = list(), level = 5)
filename |
Character string with the name of the image file |
opts |
List with options to add to |
level |
Integer indicating the level where the image file is located. E.g. |
Character string with the generated html statement
Especially useful when an externally created image has to be included . It can be used in a text chunk with e.g.
'r igs(...)
' . In opts
can be specified all the options for the html img
statement (with exception of src
) :
link
, rel
, alt
, caption
, width
, height
, attr
and attrlink
Idea is from the article Miscellaneous Wisdom about R Markdown & Hugo Gained from Work on our Website by Maëlle Salmon
## Not run:
igs("post/2020-05-04-dir_files/my.png",opts=list(width='75%',alt="my.png"))
# <p><img src="../../../../../post/2020-05-04-dir_files/my.png" width="75%" alt="my.png" /></p>
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.