Skip to content

Commit 214eb6b

Browse files
authored
Merge pull request #7 from stan-dev/fix-pkgdown-error
Resolve pkgdown logo error.
2 parents b12d1cc + b93484b commit 214eb6b

4 files changed

Lines changed: 31 additions & 12 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: pkgdownconfig
22
Title: Stan pkgdown Website Styling
3-
Version: 2.3.0
3+
Version: 2.4.0
44
Authors@R:
55
person("Visruth", "Srimath Kandali", , "public@visruth.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0009-0005-9097-0688"))

inst/pkgdown/assets/logo.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

inst/pkgdown/templates/navbar.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
{{#includes}}{{{before_title}}}{{/includes}}
99
<a class="navbar-brand me-2" href="{{#site}}{{root}}{{/site}}index.html">
1010
<!-- Add Stan logo -->
11-
<picture>
12-
<source type="image/svg+xml" srcset="{{#site}}{{root}}{{/site}}logo.svg">
13-
<img src="{{#site}}{{root}}{{/site}}logo.png" class="stan-logo" alt="Stan blue hex logo">
14-
</picture>
11+
<img src="{{#site}}{{root}}{{/site}}man/figures/logo.svg" class="stan-logo" alt="Stan blue hex logo">
1512
{{#site}}{{title}}{{/site}}
1613
</a>
1714

vignettes/Quirks.qmd

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,36 @@ template:
3030
3131
I left the functionality in so that the website wouldn't fail silently and eat your input, but I hazard that you won't want to put anything before the logo. If you want to put things in `before_title` you should copy my `navbar.HTML` into your package's pkgdown configuration and edit it, putting HTML where it says `{{#includes}}{{{before_navbar}}}{{/includes}}`.
3232

33-
## Logs Say Image Missing
33+
## Logs Say Favicons Missing
3434

35-
This template copies over the Stan hex logo to root and references that manually in the templates, which `pkgdown` doens't like. As such, you'll get errors like
35+
Due to how pkgdown and this template package work, pkgdown will complain about missing favicons initially, but will copy them over soon after. They will appear in the built site properly, so you can safely ignore this error. Unfortunately, I don't see any clean way of suppressing this error.
3636

37-
```
38-
Missing images in .github/CONTRIBUTING.md: logo.png
39-
ℹ pkgdown can only use images in man/figures and vignettes
37+
```
38+
── Sitrep ──────────────────────────────────────────────────────────────────────
39+
✔ URLs ok.
40+
✖ Favicons not ok.
41+
Found package logo but not favicons.
42+
Do you need to run build_favicons()?
43+
✔ Open graph metadata ok.
44+
✔ Articles metadata ok.
45+
✔ Reference metadata ok.
46+
── Initialising site ───────────────────────────────────────────────────────────
47+
Updating deps/bootstrap-5.3.8/bootstrap.bundle.min.js
48+
Updating deps/bootstrap-5.3.8/bootstrap.bundle.min.js.map
49+
Updating deps/bootstrap-5.3.8/bootstrap.min.css
50+
── Building favicons ───────────────────────────────────────────────────────────
51+
ℹ Building favicons with <https://realfavicongenerator.net>...
52+
✔ Added apple-touch-icon.png, favicon-96x96.png, favicon.ico, favicon.svg,
53+
site.webmanifest, web-app-manifest-192x192.png, and
54+
web-app-manifest-512x512.png.
55+
Copying pkgdown/favicon/apple-touch-icon.png to apple-touch-icon.png
56+
Copying pkgdown/favicon/favicon-96x96.png to favicon-96x96.png
57+
Copying pkgdown/favicon/favicon.ico to favicon.ico
58+
Copying pkgdown/favicon/favicon.svg to favicon.svg
59+
Copying pkgdown/favicon/site.webmanifest to site.webmanifest
60+
Copying pkgdown/favicon/web-app-manifest-192x192.png to
61+
web-app-manifest-192x192.png
62+
Copying pkgdown/favicon/web-app-manifest-512x512.png to
63+
web-app-manifest-512x512.png
4064
```
4165
42-
If you actually navigate to that page the logo will be there. I may fix/change this by referencing man/figures/logo (which is also copied over).

0 commit comments

Comments
 (0)