Skip to content

doc: correct version redirects where possible #1411

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

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

erisu
Copy link
Member

@erisu erisu commented Mar 21, 2025

Motivation and Context

Resolves #1278

Description

  • CI to use NodeJS 22
  • Fix regex to replace .md to .html in all-pages.yml generation.
  • Remove console.log that affected all-pages.yml content.
  • Get the current page full URL with page.path and format it with a prefixed / and converted .md to .html.
  • Fixed page detection when checking against all-pages.yml.

Testing

Built Docs:

  • bundle install
  • npm install
  • npm run serve

Navigated to an old doc:

  • http://localhost:3000/docs/en/8.x/guide/cli/index.html

Observations:

  1. Outdated Version Warning:
    The link for "This version of the documentation is outdated! Click here for the latest released version." points to http://localhost:3000/docs/en/latest/guide/cli/index.html.

    Note: Clicking on this link will not work because the latest redirection is handled by .htaccess, and serve is not running an Apache Httpd server.

  2. 12.x Version Link:
    The link for 12.x in the version dropdown points to http://localhost:3000/docs/en/12.x/guide/cli/index.html. Clicking on this link will perform a redirect to the correct page.

  3. 2.8.0 Version Link:
    The link for 2.8.0 is grayed out since this version does not have a mapping for the current page. The link points to http://localhost:3000/docs/en/2.8.0/. Clicking on this link will redirect to the root page of version 2.8.0.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@erisu erisu merged commit b7563b3 into apache:master Mar 24, 2025
1 check passed
@erisu erisu deleted the doc/change-version-fix branch March 24, 2025 17:09
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.

Switching Cordova Version of an article redirects to the startpage
2 participants