Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine check_pkgdown() and pkgdown_sitrep() #2463

Closed
hadley opened this issue Apr 18, 2024 · 4 comments · Fixed by #2516
Closed

Combine check_pkgdown() and pkgdown_sitrep() #2463

hadley opened this issue Apr 18, 2024 · 4 comments · Fixed by #2516
Labels
upkeep maintenance, infrastructure, and similar
Milestone

Comments

@hadley
Copy link
Member

hadley commented Apr 18, 2024

Probably want to keep current behaviour where check errors and sitrep does not, but they should perform the same checks.

@olivroy
Copy link
Collaborator

olivroy commented Apr 18, 2024

Also shouldn't build_site(), especially build_site_github_pages() call check_pkgdown() first? It would error more quickly if it has to and give CI feedback earlier.

@jayhesselberth
Copy link
Collaborator

I would suggest running check at the top of sitrep, and if check throws an error, catch it, and add to the list of warnings:

	x Problems found in `_pkgdown.yml`. Run `check_pkgdown()`.

Agree that adding sitrep at the top of build_site is a good idea.

@hadley
Copy link
Member Author

hadley commented Apr 19, 2024

Hmmmm, but a sitrep function can potentially report things that aren't definitely problems but you might want to look into. I'm not sure whether or not that's the case for the URL stuff in pkgdown_sitrep().

@hadley hadley added the upkeep maintenance, infrastructure, and similar label Apr 19, 2024
@hadley hadley added this to the 2.1.0 milestone Apr 19, 2024
@hadley
Copy link
Member Author

hadley commented Apr 22, 2024

We might also want to have an additional function (possibly exported) for running checks on the built site — this could include warning about missing alt text (#2357), broken links in README (#2194), and if we implement it invalid HTML check (#2369).

hadley added a commit that referenced this issue May 7, 2024
* Introduce new `check_urls()` function that reports on url problems with errors and call it in `check_pkgdown()`
* `pkgdown_sitrep()` now calls the same functions as `check_pkgdown()` but wrapped in a helper to convert errors to messages
* `check_built()` is a separate concern so it's moved to a separate file

Fixes #2463. Fixes #2380.
hadley added a commit that referenced this issue May 11, 2024
* Introduce new `check_urls()` function that reports on url problems with errors and call it in `check_pkgdown()`
* `pkgdown_sitrep()` now calls the same functions as `check_pkgdown()` but wrapped in a helper to convert errors to messages
* `check_built()` is a separate concern so it's moved to a separate file
* Improve articles checking by reusing reference checks.

Fixes #2463. Fixes #2380.
SebKrantz pushed a commit to SebKrantz/pkgdown that referenced this issue Jun 1, 2024
* Introduce new `check_urls()` function that reports on url problems with errors and call it in `check_pkgdown()`
* `pkgdown_sitrep()` now calls the same functions as `check_pkgdown()` but wrapped in a helper to convert errors to messages
* `check_built()` is a separate concern so it's moved to a separate file
* Improve articles checking by reusing reference checks.

Fixes r-lib#2463. Fixes r-lib#2380.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upkeep maintenance, infrastructure, and similar
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants