Skip to content

Commit 94cf179

Browse files
committed
Dynamic links to favicons/icons
1 parent 04eeb23 commit 94cf179

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Description: This package is a template package, built off of the Stan
77
Quarto styling. Exclusively for use styling `pkgdown` websites in
88
the Stan ecosystem.
99
License: BSD_3_clause + file LICENSE
10-
URL: https://visruthsk.github.io/pkgdownConfig
10+
URL: https://visruthsk.github.io/pkgdownConfig, https://visruthsk.github.io/pkgdownConfig
1111
Config/Needs/website: VisruthSK/pkgdownConfig
1212
Encoding: UTF-8
1313
Roxygen: list(markdown = TRUE)

_pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
url: https://visruthsk.github.io/pkgdownConfig
1+
url: https://visruthsk.github.io/pkgdownConfig/
22
template:
33
package: pkgdownConfig

inst/pkgdown/_pkgdown.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ template:
55
# add logo to navbar
66
before_title: |
77
<a class="navbar-brand me-2" href="index.html">
8-
<img src="/logo.svg" class="stan-logo" alt="Stan blue hex logo">
8+
<img src="{{#site}}{{root}}{{/site}}logo.svg" class="stan-logo" alt="Stan blue hex logo">
99
</a>
10-
# necessary for Bluesky icon
10+
# loads fontawesome 7; pkgdown already loads 6. replace with template if wanted.
11+
# forces favicons since pkgdown doesn't know they're there. could also do with template.
12+
# problem with template is {{{headdeps}}}
1113
in_header: |
1214
<link rel="stylesheet"
1315
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.1/css/all.min.css"
1416
referrerpolicy="no-referrer">
15-
<link rel="icon" href="favicon.ico" sizes="any">
17+
<link rel="icon" type="image/png" sizes="96x96" href="{{#site}}{{root}}{{/site}}favicon-96x96.png">
18+
<link rel="icon" type=”image/svg+xml” href="{{#site}}{{root}}{{/site}}favicon.svg">
19+
<link rel="apple-touch-icon" sizes="180x180" href="{{#site}}{{root}}{{/site}}apple-touch-icon.png">
20+
<link rel="icon" sizes="any" href="{{#site}}{{root}}{{/site}}favicon.ico" >
21+
<link rel="manifest" href="{{#site}}{{root}}{{/site}}site.webmanifest">
1622
1723
# syntax highlighting
1824
theme: tango

0 commit comments

Comments
 (0)