Skip to content

Fix documentation link in README files#69

Open
becky-gilbert wants to merge 3 commits into
mainfrom
fix-readme-docs-link
Open

Fix documentation link in README files#69
becky-gilbert wants to merge 3 commits into
mainfrom
fix-readme-docs-link

Conversation

@becky-gilbert

Copy link
Copy Markdown

Fixes #63

This PR changes the link used in the README.md file for the "See documentation" text. It includes the following changes:

  • Changes the README's embedded documentation link so that it points to the documentation file created in /<package-root>/docs/<package-name>.md, rather than to the README file itself.
  • Fixes broken documentation links that can be generated in some cases (e.g. contains tree rather than blob in full file URL; contains misplaced leading slash).
  • Updates the interactive console prompt to say "Enter the path to the documentation file" rather than "Enter the path to the README file" (this link is used only for the documentation, and the README file location cannot be changed).
  • Changes the --readme-path flag to --documentation-path, for clarity

Examples

Installing in a known repo (jsPsych contrib)

Old: points to README itself

See [documentation](https://github.com/jspsych/jspsych-contrib/packages/extension-test/README.md)

New: points to the .md file in /docs

See [documentation](https://github.com/jspsych/jspsych-contrib/blob/main/packages/extension-test/docs/extension-test.md)

Installing in an untracked (non-Git) directory or from the root of an unknown repo

Old: points back to README, and this is a broken link due to the leading slash, which makes it an absolute path from the domain root (https://github.com)

See [documentation](/extension-test/README.md)

New: relative path to docs file

See [documentation](docs/extension-test.md)

Installing in a subdirectory of an unknown repo

Old: points back to README and link is broken due to /tree/

See [documentation](https://github.com/becky-gilbert/jspsych-extension-pause/tree/main/subdirectory/extension-test/README.md)

New: points to docs file and works with /blob/ instead of /tree/

See [documentation](https://github.com/becky-gilbert/jspsych-extension-pause/blob/main/subdirectory/extension-test/docs/extension-test.md) 

Screenshots

New interactive console prompt for documentation file path, and the new default value (this was called inside an untracked directory).

Screenshot 2026-07-02 at 3 38 13 PM

p.s. Tests would be helpful... I would add tests that cover all of these cases if someone wants to add a test setup (👀 #4)

…emoteGitURL to root URL instead of undfined when it is empty (running from repo root)
@changeset-bot

changeset-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 41582a1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@jspsych/new-multiplayer-adapter Minor
@jspsych/new-extension Minor
@jspsych/new-timeline Minor
@jspsych/new-plugin Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

new-extension: docs link in README is broken

1 participant