Native Shell
Native Shell:AI 生成的 UI,在你的應用中原生呈現,涵蓋每個平台。iOS、Android、macOS、Windows 與 Linux 上的應用、GPUI 應用與網頁在執行時載入已簽名、沙箱隔離的 TSX 模組並繪製 th
AI 翻譯
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Read-only mirror of gitlab.com/bart-turczynski/sitemapr
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗sitemapr is a deterministic toolkit for reading and validating XML, text, and index sitemaps against the Sitemap Protocol 0.9 and the related W3C and RFC standards. It parses sitemap sources into tidy tibbles, expands sitemap indexes, discovers a site’s sitemaps from its root URL, and reports schema and protocol findings with stable, reproducible output.
Status: experimental. The package works and is covered by an extensive test suite, but the API may still change without deprecation and it is not yet on CRAN. Pin a commit or tag if you depend on it.
sitemapr is not on CRAN yet. Install it from r-universe:
install.packages(
"sitemapr",
repos = c("https://bart-turczynski.r-universe.dev", "https://cloud.r-project.org")
)
Or install the development version from GitLab:
# install.packages("pak")
pak::pak("gitlab::bart-turczynski/sitemapr")
Its URL-parsing dependency, rurl, is installed automatically from CRAN.
read_sitemap() accepts a sitemap URL or a local file (.xml, .txt,
.gz, or .tar.gz) and returns one row per URL, with lastmod,
changefreq, priority, and the image/video/news/alternate extension
columns.
library(sitemapr)
sitemap <- '<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2024-01-01</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/?page=about</loc>
<changefreq>monthly</changefreq>
</url>
</urlset>'
path <- tempfile(fileext = ".xml")
writeLines(sitemap, path)
read_sitemap(path)
#> # A tibble: 2 × 9
#> loc lastmod changefreq priority images video news alternates
#> <chr> <dttm> <chr> <dbl> <list> <list> <list> <list>
#> 1 https… 2024-01-01 00:00:00 <NA> 1 <NULL> <NULL> <NULL> <NULL>
#> 2 https… NA monthly NA <NULL> <NULL> <NULL> <NULL>
#> # ℹ 1 more variable: source_sitemap <chr>
A top-level sitemap index is expanded recursively (cycle-safe, depth- and count-capped) so every reachable child sitemap’s rows carry provenance.
validate_sitemap() returns a stable findings tibble — one row per
issue, with a code, severity, and the layer (schema, protocol,
classification, or index) that produced it. The same source and mode
always yield a row-for-row identical result.
invalid <- '<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://example.com/</loc><priority>2.0</priority></url>
<url><loc>/relative/path</loc></url>
</urlset>'
path <- tempfile(fileext = ".xml")
writeLines(invalid, path)
findings <- validate_sitemap(path)
findings[, c("code", "severity", "layer")]
#> # A tibble: 3 × 3
#> code severity layer
#> <chr> <chr> <chr>
#> 1 SCHEMA_INVALID error schema
#> 2 PROTOCOL_PRIORITY_OUT_OF_RANGE error protocol
#> 3 PROTOCOL_URL_NOT_ABSOLUTE error protocol
Pass mode = "non-strict" to downgrade schema violations to warnings
and drop strict-only findings.
sitemap_tree() takes a site-root URL, tries a catalog of common
sitemap paths (generic, then WordPress/Shopify), and returns a discovery
tree: one row per candidate, marked accepted or rejected. It needs
network access, so it is not run here.
sitemap_tree("https://example.com")
vignette("introduction", package = "sitemapr")