Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add single_version config to fix URLs. #16

Merged
merged 6 commits into from
Nov 28, 2022
Merged

Add single_version config to fix URLs. #16

merged 6 commits into from
Nov 28, 2022

Conversation

ericholscher
Copy link
Member

@ericholscher ericholscher commented Nov 21, 2022

Fixes #14


📚 Documentation preview 📚: https://readthedocs-preview--16.org.readthedocs.build/en/16/

@ericholscher ericholscher requested a review from humitos November 21, 2022 23:58
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 to me. I'd use a boolean variable instead of a string, tho, unless there is a specific reason that I'm not seeing.

preview/action.yaml Show resolved Hide resolved
@@ -56,3 +56,4 @@ These are all the parameters this action supports:
* `message-template` (_optional_): Text message to be injected by the action in the Pull Request description. It supports the following placeholders to be replaced:
* `{docs-pr-index-url}`: URL to the root of the documentation for the Pull Request preview.
* `platform` (_optional_): Read the Docs Community (`community`) or Read the Docs for Business (`business`). (default: `community`)
* `single_version` (_optional_): Set this to `'true'` if your project is single version, so we can link to the correct URL. (default: `false`)
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
* `single_version` (_optional_): Set this to `'true'` if your project is single version, so we can link to the correct URL. (default: `false`)
* `single_version` (_optional_): Set this to `true` if your project is single version, so we can link to the correct URL. (default: `false`)

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
* `single_version` (_optional_): Set this to `'true'` if your project is single version, so we can link to the correct URL. (default: `false`)
* `single_version` (_optional_): Set this to `'true'` (note it's a _string_) if your project is single version, so we can link to the correct URL. (default: `'false'`)

preview/scripts/edit-description.js Show resolved Hide resolved
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.

I updated my comments after research a little more about this. It seems it's a problem on GHA and there is no good solution. It's just a string, unfortunately 👎🏼

I'm suggesting to update a little the docs of the single_version and use single-version for consistency. Also, the variable needs to be defined before used.

@@ -56,3 +56,4 @@ These are all the parameters this action supports:
* `message-template` (_optional_): Text message to be injected by the action in the Pull Request description. It supports the following placeholders to be replaced:
* `{docs-pr-index-url}`: URL to the root of the documentation for the Pull Request preview.
* `platform` (_optional_): Read the Docs Community (`community`) or Read the Docs for Business (`business`). (default: `community`)
* `single_version` (_optional_): Set this to `'true'` if your project is single version, so we can link to the correct URL. (default: `false`)
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
* `single_version` (_optional_): Set this to `'true'` if your project is single version, so we can link to the correct URL. (default: `false`)
* `single_version` (_optional_): Set this to `'true'` (note it's a _string_) if your project is single version, so we can link to the correct URL. (default: `'false'`)

preview/README.md Outdated Show resolved Hide resolved
preview/action.yaml Outdated Show resolved Hide resolved
preview/scripts/edit-description.js Show resolved Hide resolved
ericholscher and others added 2 commits November 23, 2022 11:15
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
@ericholscher
Copy link
Member Author

@humitos should be ready 👍

preview/README.md Outdated Show resolved Hide resolved
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
@ericholscher ericholscher merged commit cfdc433 into main Nov 28, 2022
@stsewd stsewd deleted the single-version branch November 28, 2022 23:14
humitos added a commit that referenced this pull request Jan 30, 2023
* Add single_version config to fix URLs.

Fixes #14

* Fix logic

* Use var properly

* Set RTD_SINGLE_VERSION

* Apply suggestions from code review

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>

* Update preview/README.md

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
humitos added a commit to readthedocs/website that referenced this pull request Jan 30, 2023
Use the new feature of our own preview action.

See readthedocs/actions#16
ericholscher added a commit to readthedocs/website that referenced this pull request Jan 30, 2023
* Make the GHA "preview" single version

Use the new feature of our own preview action.

See readthedocs/actions#16

* Update .github/workflows/documentation-links.yaml

Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>

---------

Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
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.

Support single version projects
2 participants