Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: pkgdownconfig
Title: Stan pkgdown Website Styling
Version: 2.3.0
Version: 2.4.0
Authors@R:
person("Visruth", "Srimath Kandali", , "public@visruth.com", role = c("aut", "cre"),
comment = c(ORCID = "0009-0005-9097-0688"))
Expand Down
1 change: 0 additions & 1 deletion inst/pkgdown/assets/logo.svg

This file was deleted.

5 changes: 1 addition & 4 deletions inst/pkgdown/templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
{{#includes}}{{{before_title}}}{{/includes}}
<a class="navbar-brand me-2" href="{{#site}}{{root}}{{/site}}index.html">
<!-- Add Stan logo -->
<picture>
<source type="image/svg+xml" srcset="{{#site}}{{root}}{{/site}}logo.svg">
<img src="{{#site}}{{root}}{{/site}}logo.png" class="stan-logo" alt="Stan blue hex logo">
</picture>
<img src="{{#site}}{{root}}{{/site}}man/figures/logo.svg" class="stan-logo" alt="Stan blue hex logo">
{{#site}}{{title}}{{/site}}
</a>

Expand Down
35 changes: 29 additions & 6 deletions vignettes/Quirks.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,36 @@ template:

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}}`.

## Logs Say Image Missing
## Logs Say Favicons Missing

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
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.

```
Missing images in .github/CONTRIBUTING.md: logo.png
ℹ pkgdown can only use images in man/figures and vignettes
```
── Sitrep ──────────────────────────────────────────────────────────────────────
✔ URLs ok.
✖ Favicons not ok.
Found package logo but not favicons.
Do you need to run build_favicons()?
✔ Open graph metadata ok.
✔ Articles metadata ok.
✔ Reference metadata ok.
── Initialising site ───────────────────────────────────────────────────────────
Updating deps/bootstrap-5.3.8/bootstrap.bundle.min.js
Updating deps/bootstrap-5.3.8/bootstrap.bundle.min.js.map
Updating deps/bootstrap-5.3.8/bootstrap.min.css
── Building favicons ───────────────────────────────────────────────────────────
ℹ Building favicons with <https://realfavicongenerator.net>...
✔ Added apple-touch-icon.png, favicon-96x96.png, favicon.ico, favicon.svg,
site.webmanifest, web-app-manifest-192x192.png, and
web-app-manifest-512x512.png.
Copying pkgdown/favicon/apple-touch-icon.png to apple-touch-icon.png
Copying pkgdown/favicon/favicon-96x96.png to favicon-96x96.png
Copying pkgdown/favicon/favicon.ico to favicon.ico
Copying pkgdown/favicon/favicon.svg to favicon.svg
Copying pkgdown/favicon/site.webmanifest to site.webmanifest
Copying pkgdown/favicon/web-app-manifest-192x192.png to
web-app-manifest-192x192.png
Copying pkgdown/favicon/web-app-manifest-512x512.png to
web-app-manifest-512x512.png
```

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).