sfirke/janitor

index.html - Small Logo - not loading fix

bradfordjohnson opened this issue · 7 comments

On the GitHub Pages the small janitor logo is not loading.

Here is the current code on index.html:
<a href="#janitor" class="anchor"></a>janitor <img src="docs/reference/figures/logo_small.png" align="right">

Changing the img src to not include "docs/" will fix this and the small logo will load:
<a href="#janitor" class="anchor"></a>janitor <img src="reference/figures/logo_small.png" align="right">

This is happening because GH Pages is likely using the docs directory already so it does not need that additional path.

Thanks for pointing this out - and for suggesting the fix! I tried a quick fix but the hook to rebuild that site didn't run because the build failed because tests failed even though I didn't change anything in the codebase 😩 So I'm leaving the issue open.

No problem! I had noticed it and changed it with inspect element in my browser and saw it had worked. If I figure out any fixes I will let you know.

Oh interesting, apparently the project's pkgdown workflow had not run in 2 years since we renamed from "master" to "main" branch. I've updated the pkgdown yaml file, let's see if that does it.

Oh I see there is a branch called gh-pages, it looks like that is what is hosted on the pages as it was last run 2 years ago on April 2nd, it looks like the latest workflow references that branch.

It appears that updating the GitHub pages directory and then making changes would do the trick. Referencing the docs directory from the main branch.

However I am newer to R and GitHub so I would get some other input as I would hate for you to listen to me and it mess up because of my inexperience :)

This may help though, here is my experience with GitHub Pages:
I started using Quarto in R and once I set the output in the .yml file to docs it renders all the output files to the /docs directory. So once I push it and set it up as below shows, then it updates with every additional push.
Repository -> Settings -> Code and Automation -> Pages

Build and Deployment ->...

Source == Deploy from a branch
Branch == main, Folder == /docs

Perhaps this helps, or is at least in the right direction, but obviously this repository is much more complex than my Quarto blog haha.

The simplest fix may be for @sfirke to redo all the GitHub actions with the current ones:

usethis::use_github_action_check_standard()
usethis::use_coverage()
usethis::use_pkgdown_github_pages()

You may need to delete some of the files in .github/ to make it work. The step of usethis::use_pkgdown_github_pages() does some github-fu to make it work correctly, so I think that @sfirke has to do it and not anyone else (since it's your account hosting the repo).

Thanks Bill! I tried use_pkgdown_github_pages and I think it's fixed. @bradfordjohnson if it's fixed for you now, can you close this issue?

Awesome looks good!