File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed
Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,14 @@ create_absolute_links <- function(main_html, pkg) {
7474 if (pkg $ development $ in_dev && pkg $ bs_version > 3 ) {
7575 url <- paste0(url , pkg $ prefix )
7676 }
77- a_external <- a [! grepl(" external-link" , xml2 :: xml_attr(a , " class" ))]
77+ a_internal <- a [
78+ ! startsWith(xml2 :: xml_attr(a , " href" ), " https" ) &
79+ ! startsWith(xml2 :: xml_attr(a , " href" ), " #" )
80+ ]
7881
79- href_absolute <- xml2 :: url_absolute(xml2 :: xml_attr(a_external , " href" ), url )
82+ href_absolute <- xml2 :: url_absolute(xml2 :: xml_attr(a_internal , " href" ), url )
8083 href_absolute <- path_ext_set(href_absolute , " md" )
84+ xml2 :: xml_attr(a_internal , " href" ) <- href_absolute
8185 }
8286 xml2 :: xml_attr(a , " class" ) <- NULL
8387}
Original file line number Diff line number Diff line change @@ -31,6 +31,13 @@ GitHub repository from the package (e.g. with
3131[`usethis::use_github()`](https://usethis.r-lib.org/reference/use_github.html)),
3232and file an issue with a link to the repository.
3333
34+ pkgdown is designed to make it quick and easy to build a website for
35+ your package. You can see pkgdown in action at
36+ <https://pkgdown.r-lib.org> : this is the output of pkgdown applied to
37+ the latest version of pkgdown. Learn more in
38+ [`vignette("pkgdown")`](https:/pkgdown.r-lib.org/articles/pkgdown.md) or
39+ [`?build_site`](https:/pkgdown.r-lib.org/reference/build_site.md).
40+
3441------------------------------------------------------------------------
3542
36431. Note that dots (`.`) in the package name need to be replaced by
Original file line number Diff line number Diff line change 3434</ div >
3535< div class
3636
37+ < p > pkgdown is designed to make it quick and easy to build a website for your package.
38+ You can see pkgdown in action at < a href ="https://pkgdown.r-lib.org " class ="uri "> https://pkgdown.r-lib.org</ a > :
39+ this is the output of pkgdown applied to the latest version of pkgdown.
40+ Learn more in < code > < a href ="articles/pkgdown.html "> vignette("pkgdown")</ a > </ code >
41+ or < code > < a href ="reference/build_site.html "> ?build_site</ a > </ code > .</ p >
42+
43+
3744</ main >
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ test_that("build_llm_docs() works", {
1919test_that(" convert_md() works" , {
2020 skip_if_no_pandoc()
2121 pkg <- local_pkgdown_site()
22+ pkg $ meta $ url <- " https://pkgdown.r-lib.org"
2223
2324 dir <- withr :: local_tempdir()
2425 pkg $ dst_path <- dir
You can’t perform that action at this time.
0 commit comments