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

Proactively test Hugo themes #707

Open
yihui opened this issue May 10, 2022 · 3 comments
Open

Proactively test Hugo themes #707

yihui opened this issue May 10, 2022 · 3 comments
Assignees

Comments

@yihui
Copy link
Member

yihui commented May 10, 2022

From #704 (comment)

Originally I was thinking of testing only a few themes in a GHA daily workflow:

themes = c(
  'hugo-apero/hugo-apero',
  'wowchemy/starter-hugo-academic',
  'wowchemy/starter-research-group',
  'yihui/hugo-prose'
)
for (theme in themes) {
  d = tempfile()
  dir.create(d)
  xfun::in_dir(d, {
    blogdown::new_site(theme = theme, serve = FALSE)
    blogdown::build_site(build_rmd = 'newfile')
  })
  unlink(d, recursive = TRUE)
}

But it may be a better idea to test all themes: https://github.com/gohugoio/hugoThemesSiteBuilder/blob/main/themes.txt and generate a "status" page that shows which themes work or do not work with blogdown. This page could be a simple (meaning a plain style) HTML page deployed along with https://pkgs.rstudio.com/blogdown/. We can save the results in the artifacts, and make the pkgdown workflow read and deploy the results.

yihui added a commit that referenced this issue Sep 16, 2022
@yihui
Copy link
Member Author

yihui commented Sep 16, 2022

While I was fixing another new_site() bug, I decided to add some tests. Now the themes I mentioned above will be tested during R CMD check in GHA, but not on a daily basis, nor have I tried to test all themes.

yihui added a commit that referenced this issue Sep 16, 2022
@cderv
Copy link
Collaborator

cderv commented Sep 16, 2022

Oh cool.

For the final solution, do you want still want it to be as part of R CMD check in package tests/ or is this a workaround and a custom GHA workflow would be better ?

Just to know

@yihui
Copy link
Member Author

yihui commented Sep 16, 2022

What I'm hoping for is that we want to make sure a selected list of themes always work, so a daily action to check them would be nice, and the action should throw an error if any of these themes fail to work.

Then I also want a "status page" that shows the full list of themes and indicate which ones work or fail. It's fine if certain themes in the full list fail (i.e. the action doesn't need to throw an error).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants