How can I add a favicon to by blogdown website? I am using the minimal theme. I tried adding the line in the config.toml favicon = imgPath
and I also attemped to move 'favicon.ico' to the static folder, but neither has worked.
相关问题
- R - Quantstart: Testing Strategy on Multiple Equit
- Using predict with svyglm
- Reshape matrix by rows
- Extract P-Values from Dunnett Test into a Table by
- split data frame into two by column value [duplica
相关文章
- How to convert summary output to a data frame?
- How to plot smoother curves in R
- Paste all possible diagonals of an n*n matrix or d
- ess-rdired: I get this error “no ESS process is as
- How to use doMC under Windows or alternative paral
- dyLimit for limited time in Dygraphs
- Saving state of Shiny app to be restored later
- How to insert pictures into each individual bar in
If you are using other themes such as Academic, you might have to create an icon instead of a
favicon.ico
file. As per instructions here, you have to create a square 512x512 pixel image namedicon.png
and place the image in your rootassets/images/
folder. For the Academic theme, theassets
folder is located underthemes\hugo-academic
when using RStudio.So be careful if you have a Hugo theme that does not support simply pasting the favicon.ico file in the root of the static folder.
If you have a file named
favicon.ico
in root directory, most browsers will use it. The easiest way is to addfavicon.ico
instatic
directory (therefore, Hugo will copy it to root directory), see here.Favicon is declared in
<head>
element. Inminimal
theme, the<head>
element is defined in header.html file.As you can see, the
minimal
theme does not provide support for favicon.First, check if you have a
layouts/partials/header.html
file.If this file does not exist, copy
themes/minimal/layouts/partials/header.html
file tolayouts/partials
directory (you may have to create this directory).You have to modify the
layouts/partials/header.html
file.Add after opening
<head>
tag: