Skip to content

Switch from pkgdown to altdoc for documentation#503

Draft
Copilot wants to merge 14 commits intomainfrom
copilot/switch-to-altdoc
Draft

Switch from pkgdown to altdoc for documentation#503
Copilot wants to merge 14 commits intomainfrom
copilot/switch-to-altdoc

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 2, 2026

Description

Replaces pkgdown with altdoc following the UCD-SERG/rpt pattern. Documentation renders with Quarto via altdoc::render_docs().

Changes:

  • DESCRIPTION: Added altdoc, bslib to Suggests; updated Config/Needs/website with d-morrison/altdoc@recursive-qmd-search remote
  • altdoc/ directory created:
    • quarto_website.yml: Quarto config using altdoc template variables ($ALTDOC_PACKAGE_NAME, $ALTDOC_PACKAGE_URL_GITHUB, $ALTDOC_MAN_BLOCK) with proper sections/contents structure for navbar
    • index.qmd: Includes README.md
    • CONTRIBUTING.md: Includes .github/CONTRIBUTING.md
    • styles.css: Custom sidebar spacing
    • .gitignore: Ignores altdoc/ directory
  • .github/workflows/docs.yaml:
    • Workflow name "Docs 📚" restored
    • Uses altdoc::render_docs() instead of pkgdown::build_site()
    • Workflow elements reordered to match main branch structure (push, release, pull_request, workflow_dispatch)
    • Added cancel-in-progress: true to concurrency settings
    • Removed duplicate name key
  • .Rbuildignore: Added ^altdoc$, removed pkgdown-specific patterns
  • vignettes/_metadata.yml: Created with format settings extracted from _quarto.yml
  • Removed files: pkgdown/ directory, _quarto.yml from repo root

Maintained:

  • PR preview deployment to /preview/pr<number>/
  • GitHub Pages deployment for main branch and version tags
  • Output to docs/ directory
  • Support for .Rmd and .qmd vignettes

Configuration:

  • Bootstrap 5 with light/dark theme toggle
  • Downlit code-linking enabled
  • Bibliography from vignettes/references.bib
  • Navbar uses proper sections with contents arrays (Get started, Methodology, Examples)
  • Sidebar sections: Home, Articles (Get started/Methodology/Examples), Reference, News, Code of Conduct, Contributing

Note on Multi-version Documentation:

The insightsengineering/r-pkgdown-multiversion action is not compatible with altdoc as it is specifically designed for pkgdown sites and expects pkgdown's output structure. Multi-version documentation support was removed. Implementing multi-version docs with altdoc would require a custom workflow solution.


  • The title of your PR should briefly describe the change.
  • Commit/merge messages to be included in NEWS.md should begin with -.
  • Code should follow the tidyverse style guide.
  • Documentation should use roxygen2, with Markdown syntax.
  • Contributions should include unit tests (using testthat). - N/A for infrastructure change

For more information see Contributing.

Original prompt

This section details on the original issue you should resolve

<issue_title>switch to altdoc</issue_title>
<issue_description>follow the example of https://github.com/d-morrison/altdoc</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 10 commits February 2, 2026 06:03
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
… quarto package reference

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copilot AI changed the title [WIP] Switch to altdoc implementation Switch from pkgdown to altdoc for documentation Feb 2, 2026
Copilot AI requested a review from d-morrison February 2, 2026 06:16
Comment thread .Rbuildignore Outdated
Comment thread .github/workflows/docs.yaml
Comment thread .github/workflows/docs.yaml
Comment thread altdoc/.gitignore Outdated
Comment thread altdoc/quarto_website.yml Outdated
… navbar structure, extract _quarto.yml to vignettes/_metadata.yml

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 2, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/UCD-SERG/rpt/contents/vignettes
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Comment thread .github/workflows/docs.yaml
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Comment thread .github/workflows/docs.yaml Outdated
Comment on lines +23 to +37
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- synchronize
- closed
paths:
- 'man/**'
- 'altdoc/**'
- 'vignettes/**'
- '.github/workflows/docs.yaml'
- 'README.md'
- 'index.qmd'
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+' # build on version tags like v1.2.3
branches:
- main
paths:
- "inst/templates/**"
- "pkgdown/**"
- "_pkgdown.*"
- DESCRIPTION
- "**.md"
- "**.Rmd"
- "man/**"
- "LICENSE.*"
- NAMESPACE
- ".github/workflows/docs.yaml"
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Tag to deploy
required: false
default: ''

name: docs
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reorder these elements to match the main branch version order as closely as possible, so the diff is easier to read

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in acd0e64. Reordered to match main branch: push (with branches, tags, paths), release, pull_request (with types, branches, paths), workflow_dispatch.

Comment thread .github/workflows/docs.yaml Outdated
Comment on lines +23 to +37
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- synchronize
- closed
paths:
- 'man/**'
- 'altdoc/**'
- 'vignettes/**'
- '.github/workflows/docs.yaml'
- 'README.md'
- 'index.qmd'
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+' # build on version tags like v1.2.3
branches:
- main
paths:
- "inst/templates/**"
- "pkgdown/**"
- "_pkgdown.*"
- DESCRIPTION
- "**.md"
- "**.Rmd"
- "man/**"
- "LICENSE.*"
- NAMESPACE
- ".github/workflows/docs.yaml"
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: Tag to deploy
required: false
default: ''

name: docs
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove duplicate name key

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in acd0e64. Removed duplicate name: docs on line 37.


concurrency:
group: docs-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep the cancel-in-progress rule for concurrency

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in acd0e64. Added cancel-in-progress: true to the concurrency section.

…rogress

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

switch to altdoc

2 participants