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

Redirect Sass docs when running on Heroku #2706

Merged
merged 1 commit into from
Jul 21, 2022
Merged

Conversation

36degrees
Copy link
Contributor

When running on Heroku (based on the presence of the HEROKU_APP environment variable set in app.json):

  • link to the live API reference docs from the homepage of the review app
  • redirect requests for /docs to the live API reference docs

This avoids the confusion of having two ‘live’ versions of the Sass docs available, whilst redirecting anyone who may have the existing docs bookmarked.

However, it’s still useful to be able to run the 'generic' Sass docs locally so that we can use it to preview documentation before we do a release. As such, when running locally:

  • link to both the live API reference docs and the ‘local’ docs from the homepage of the review app
  • preserve the existing behaviour of serving the locally generate Sass docs when visiting /docs

Closes #1892.

When running on Heroku (based on the presence of the `HEROKU_APP` environment variable set in `app.json`):

- link to the live API reference docs from the homepage of the review app
- redirect requests for `/docs` to the live API reference docs

This avoids the confusion of having two ‘live’ versions of the Sass docs available, whilst redirecting anyone who may have the existing docs bookmarked.

However, it’s still useful to be able to run the 'generic' Sass docs locally so that we can use it to preview documentation before we do a release. As such, when running locally:

- link to both the live API reference docs and the ‘local’ docs from the homepage of the review app
- preserve the existing behaviour of serving the locally generate Sass docs when visiting `/docs`

Closes #1892.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-2706 July 19, 2022 15:32 Inactive
@36degrees
Copy link
Contributor Author

36degrees commented Jul 19, 2022

Built on top of #2705 which should be merged first. Once that PR is merged, the target branch for this PR should automatically update to main.

Done.

Base automatically changed from app-views to main July 20, 2022 10:03
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.

Redirect Sass docs in review app to Sass API reference in Frontend Docs
3 participants