Skip to content

Add structured heading hierarchy to pkgdown references page#20

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/add-heading-structure-references-page
Closed

Add structured heading hierarchy to pkgdown references page#20
Copilot wants to merge 3 commits into
mainfrom
copilot/add-heading-structure-references-page

Conversation

Copy link
Copy Markdown

Copilot AI commented May 19, 2026

The _pkgdown.yml was empty, causing pkgdown to render the references page as a flat alphabetical list with no organisation. This adds a proper heading structure and a data-raw script to keep it in sync as datasets are added over time.

Changes

_pkgdown.yml

Structured reference section with three top-level headings:

  • Individual SSD datasets — five subheadings by source organisation:
    • Data from the Australian Institute of Marine Science (aims_*)
    • Data provided from anonymous sources (anon_*)
    • Data from the Australian and New Zealand guidelines (anzg_*)
    • Data from the Canadian Council of Ministers of the Environment (ccme_*)
    • Data provided by the Commonwealth Scientific and Industrial Research Organisation of Australia (csiro_*)
  • Multi chemical SSD datasets — the five *_data combined datasets
  • Derived SSD datasets (populated dynamically when anztox_data/wqbench_data are added)
  • SSD Fit Resultsssd_fits
  • Functionsssd_data_sets, get_ssddata, gm_mean

data-raw/build_pkgdown.R

New script to regenerate _pkgdown.yml dynamically. Queries utils::data(package = "ssddata") at runtime so re-running it after new datasets are added (especially anzg_*) keeps the reference page accurate without manual edits.

# Run from package root
source("data-raw/build_pkgdown.R")
# → _pkgdown.yml written successfully.

The "Derived SSD datasets" section is omitted from the current file (no such datasets exist yet) but will appear automatically once anztox_data or wqbench_data land in the package.

Copilot AI linked an issue May 19, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add heading structure to references page Add structured heading hierarchy to pkgdown references page May 19, 2026
Copilot AI requested a review from joethorley May 19, 2026 08:53
@joethorley joethorley requested a review from beckyfisher May 19, 2026 08:58
@joethorley joethorley marked this pull request as ready for review May 19, 2026 09:00
@beckyfisher
Copy link
Copy Markdown
Contributor

Thanks for putting this together — the structure and approach are very similar to what we landed on, which is a good sign. A few things in this PR needed correcting: the site URL was pointing to bcgov.github.io/ssdtools rather than open-aims.github.io/ssddata, getdata was missing from the Functions section, and the use of utils::data(package = "ssddata") for discovery requires the package to be installed rather than reading directly from man/. We've merged an alternative implementation in #22 that addresses these points and also adds the authors: block and development: mode: auto for the dev/release site split. Everything useful implemented in #20 is present in #22. This PR also makes some other minor tweaks to the documentation workflow. Closing this in favour of #22.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add heading structure to references page

3 participants