File tree Expand file tree Collapse file tree 1 file changed +3
-22
lines changed Expand file tree Collapse file tree 1 file changed +3
-22
lines changed Original file line number Diff line number Diff line change @@ -12,26 +12,7 @@ if (is.null(pkgdown:::pkgdown_config_path("."))) {
1212if (! require(pkgdown , quietly = TRUE )) {
1313 stop(" {pkgdown} could not be loaded, please install it." )
1414}
15- if (! require( mockery , quietly = TRUE )) {
16- stop( " {mockery} could not be loaded, please install it ." )
15+ if (packageVersion( " pkgdown " ) < package_version( " 2.0.4 " )) {
16+ rlang :: abort( " You need at least version 2.0.4 of {pkgdown} to run this hook ." )
1717}
18-
19- stub_render_page <- function (pkg , name , data , ... ) {
20- force(data )
21- }
22- stub(build_reference_index , " render_page" , stub_render_page )
23- stub(build_articles_index , " render_page" , stub_render_page )
24- config <- yaml :: read_yaml(pkgdown ::: pkgdown_config_path(" ." ))
25-
26- tryCatch(
27- {
28- if (" reference" %in% names(config )) {
29- build_reference_index()
30- }
31- if (" articles" %in% names(config )) {
32- build_articles_index()
33- }
34- },
35- error = function (e ) stop(e ),
36- warning = function (w ) stop(w )
37- )
18+ check_pkgdown()
You can’t perform that action at this time.
0 commit comments