rstudio / blogdown
Showing 2 of 3 files from the diff.
Other files ignored by Codecov
NEWS.md has changed.

@@ -483,18 +483,34 @@
Loading
483 483
})
484 484
485 485
check_garbage_html = function() {
486 -
  res = unlist(lapply(list_files(content_file(), '[.]html$'), function(f) {
486 +
  res = unlist(lapply(list_files('.', '[.]html$'), function(f) {
487 487
    if (file.size(f) < 200000) return()
488 488
    x = readLines(f, n = 15)
489 489
    if (any(x == '<meta name="generator" content="pandoc" />')) return(f)
490 490
  }))
491 -
  if (n <- length(res)) {
491 +
  res = sub('^[.]/', '', res)
492 +
  ok = TRUE
493 +
  i = xfun::is_sub_path(res, content_file())
494 +
  if (n <- sum(i)) {
492 495
    msg_todo(
493 496
      'Found ', n, ' incompatible .html file', if (n > 1) 's',
494 -
      ' introduced by previous blogdown versions:\n\n', action_list(res), '\n\n',
497 +
      ' in the content directory:\n\n', action_list(res[i]), '\n\n',
495 498
      '  To fix, run the above command and then blogdown::build_site(build_rmd = "newfile").'
496 499
    )
497 -
  } else {
498 -
    msg_okay('Found 0 incompatible .html files to clean up.')
500 +
    ok = FALSE
501 +
  }
502 +
  i = xfun::is_sub_path(res, p <- publish_dir())
503 +
  if (n <- sum(i) && any(i1 <- file_exists(f1 <- with_ext(res[i], 'Rmd')))) {
504 +
    i2 = file_exists(f2 <- content_file(substr(f1[i1], nchar(p) + 1, nchar(f1))))
505 +
    if (n <- sum(i2)) {
506 +
      msg_todo(
507 +
        'Found ', n, ' incompatible .html file', if (n > 1) 's',
508 +
        ' in the publish directory:\n\n', action_list(c(res[i][i1][i2], f1[i1])), '\n\n',
509 +
        '  To fix, restart R, run the above command, fix other issues identified ',
510 +
        'by blogdown::check_site(), and then run blogdown::build_site().'
511 +
      )
512 +
      ok = FALSE
513 +
    }
499 514
  }
515 +
  if (ok) msg_okay('Found 0 incompatible .html files to clean up.')
500 516
}

@@ -211,7 +211,12 @@
Loading
211 211
    rebuild(rmd_files <- filter_newfile(list_rmds()))
212 212
213 213
    watch = servr:::watch_dir('.', rmd_pattern, handler = function(files) {
214 -
      rmd_files <<- list_rmds(files = files)
214 +
      files = list_rmds(files = files)
215 +
      # ignore Rmd files in the public/ directory, in case users forgot to set
216 +
      # ignoreFiles in config.yaml and Rmd files would be copied to public/
217 +
      # (they should not be): https://github.com/rstudio/blogdown/issues/610
218 +
      i = if (g == 'hugo') !xfun::is_sub_path(files, rel_path(publish_dir())) else TRUE
219 +
      rmd_files <<- files[i]
215 220
    })
216 221
    watch_build = function() {
217 222
      # stop watching if stop_server() has cleared served_dirs
Files Coverage
R 11.25%
Project Totals (11 files) 11.25%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
    patch:
10
      default:
11
        target: auto
12
        threshold: 1%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading