pkgdown icon indicating copy to clipboard operation
pkgdown copied to clipboard

Feature: Allow for file exclusions

Open pawelru opened this issue 1 month ago • 1 comments

Reprex:

  1. Clone tibble: git clone https://github.com/tidyverse/tibble.git
  2. Install all dependencies (including tidytemplate): pak::pak(c(".", "tidyverse/tidytemplate"))
  3. Build site with pkgdown::build_site()

You will see following entries:

── Initialising site ───────────────────────────────────────────────────────────
── Building home ───────────────────────────────────────────────────────────────
Reading AGENTS.md
Writing `AGENTS.html`
(...)
Reading .github/copilot-instructions.md
Writing `copilot-instructions.html`
(...)

Then you will be able to see /AGENTS.html and /copilot-instructions.html pages.

Image

What's worse is that the content got into the /search.json which is used for search box on the webpage:

[
  {
    "path": "https://tibble.tidyverse.org/dev/AGENTS.html",
    "id": null,
    "dir": "",
    "previous_headings": "",
    "what": "AI Agent Development Guidelines for tibble",
    "title": "AI Agent Development Guidelines for tibble",
    "text": "Note: GitHub Copilot-specific instructions, see .github/copilot-instructions.md.",
    "code": ""
  },
  {
    "path": "https://tibble.tidyverse.org/dev/AGENTS.html",
    "id": "project-overview",
    "dir": "",
    "previous_headings": "",
    "what": "Project Overview",
    "title": "AI Agent Development Guidelines for tibble",
    "text": "tibble R package provides modern reimagining data.frame. offers tbl_df class stricter checking better formatting traditional data frames. Tibbles lazy surly: less (don’t change variable names types, don’t partial matching) complain (variable exist), helping confront problems earlier write cleaner code.",
    "code": ""
  },
 
  ...

So the feature request is as follows: As a developer, I do want to have AGENTS.md for my dev activities and exclude this (and potentially more files) when creating pkgdown docs.

Connected: https://github.com/r-lib/pkgdown/issues/1336#issuecomment-791582048

pawelru avatar Nov 24 '25 17:11 pawelru

+1

I tried adding to .Rbuildignore:

^\.github/copilot\-instructions\.md$
^\.github/copilot-instructions\.md$
^\\.github/copilot-instructions\\.md$
^.*github.*md$

None worked.

talgalili avatar Nov 29 '25 17:11 talgalili