Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 1, 2025

  • Understand the existing addons documentation structure
  • Review the CustomScript addon feature implementation and usage
  • Create documentation for the CustomScript addon in docs/user/addons.rst
  • Document the window.ReadTheDocsEventData flag for accessing addons data
  • Add information about contacting support to enable the feature
  • Include an example of how to use this feature
  • Build and verify the documentation renders correctly
  • Run code review on documentation changes
  • Run security scanning (no code changes detected)
  • Address PR feedback: add Custom Script to initial features list
  • Address PR feedback: update code comments for better clarity
Original prompt

This section details on the original issue you should resolve

<issue_title>Addons: add documentation for CustomScript</issue_title>
<issue_description>We need to document this addon and put some examples on how to solve common issues with this feature.

<agent_instructions>We want to document this feature, even it's not exposed in the UI. Tell people to contact support if they want to make usage of this feature.

Explain the flag we expose in window object.

Mention an example of what this feature is useful for.</agent_instructions>

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

@ericholscher We actually aren't exposing this to users -- should we, and write docs for it? @humitos Yeah. I think it's fine to have small docs for this addon. It's not polished/perfect, but it's useful. We can add the other features mentioned in the description of the issue in the following iteration when more people are using it and requesting for upgrades.

💡 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.

Co-authored-by: humitos <244656+humitos@users.noreply.github.com>
@read-the-docs-community
Copy link

read-the-docs-community bot commented Dec 1, 2025

Documentation build overview

📚 docs | 🛠️ Build #30573167 | 📁 Comparing 2abf4e4 against latest (92b69eb)


🔍 Preview build

Show files changed (2 files in total): 📝 2 modified | ➕ 0 added | ➖ 0 deleted
File Status
addons.html 📝 modified
reference/git-integration.html 📝 modified

Co-authored-by: humitos <244656+humitos@users.noreply.github.com>
Copilot AI changed the title [WIP] Add documentation for CustomScript addon Docs: Add documentation for CustomScript addon Dec 1, 2025
Copilot AI requested a review from humitos December 1, 2025 11:18
Copilot finished work on behalf of humitos December 1, 2025 11:18
Copy link
Member

@humitos humitos left a comment

Choose a reason for hiding this comment

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

Looks good with small changes.

Copy link
Member

Choose a reason for hiding this comment

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

Update the beginning of this file to add "Custom Script" to the initial list of features.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added "Custom Script" to the initial features list in commit 2abf4e4.

Comment on lines 436 to 437
// The event has already fired when custom scripts load.
// Check for window.ReadTheDocsEventData first.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// The event has already fired when custom scripts load.
// Check for window.ReadTheDocsEventData first.
// The event "readthedocs-addons-data-ready" has been already fired when this script is run.
// We need to check for `window.ReadTheDocsEventData` first, and if it's available
// use that data to call the handler.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated with the suggested comment text in commit 2abf4e4.

handleReadTheDocsData(window.ReadTheDocsEventData.data());
}
// Subscribe to the event for future data updates
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Subscribe to the event for future data updates
// After that, we subscribe to the Read the Docs Addons event to access data
// on future dispatchs (e.g. when a URL changes on a SPA)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated with the suggested comment text in commit 2abf4e4.

@ericholscher
Copy link
Member

@copilot Fix feedback

…de comments

Co-authored-by: ericholscher <25510+ericholscher@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 4, 2025

@copilot Fix feedback

Fixed all feedback in commit 2abf4e4.

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:

  • blog.readthedocs.com
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • dev.readthedocs.io
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • docs.djangoproject.com
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • docs.jupyter.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • docs.poliastro.space
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • docs.python.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • docs.readthedocs.io
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • executablebooks.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • ipyleaflet.readthedocs.io
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • ipywidgets.readthedocs.io
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • jupyterbook.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • jupytext.readthedocs.io
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • myst-nb.readthedocs.io
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • myst-parser.readthedocs.io
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • nbsphinx.readthedocs.io
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • rst-to-myst.readthedocs.io
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • www.sphinx-doc.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)
  • www.writethedocs.org
    • Triggering command: /home/REDACTED/.local/bin/sphinx-build sphinx-build -b html -d _build/user/doctrees -T -j auto -W . _build/user/html (dns block)

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

@read-the-docs-community
Copy link

Documentation build overview

📚 dev | 🛠️ Build #30573166 | 📁 Comparing 2abf4e4 against latest (92b69eb)


🔍 Preview build

Show files changed (25 files in total): 📝 1 modified | ➕ 24 added | ➖ 0 deleted
File Status
http-routingtable.html ➕ added
index.html 📝 modified
design/apiv3.html ➕ added
design/better-doc-urls-handling.html ➕ added
design/build-images.html ➕ added
design/embed-api.html ➕ added
design/file-tree-diff.html ➕ added
design/flyout-redesign.html ➕ added
design/future-builder.html ➕ added
design/in-doc-search-ui.html ➕ added
design/index.html ➕ added
design/new-notifications-system.html ➕ added
design/new-search-api.html ➕ added
design/new-sphinx-guides.html ➕ added
design/organizations.html ➕ added
design/pr-builder.html ➕ added
design/privacy-levels.html ➕ added
design/redirects.html ➕ added
design/refactor-remote-repository.html ➕ added
design/secure-api-access-from-builders.html ➕ added
design/sphinx-jquery.html ➕ added
design/system-packages.html ➕ added
design/telemetry.html ➕ added
design/theme-context.html ➕ added
design/yaml-file.html ➕ added

Copilot AI requested a review from ericholscher December 4, 2025 21:15
Copilot finished work on behalf of ericholscher December 4, 2025 21:15
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.

Addons: add documentation for CustomScript

3 participants