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

docs: fix redirect #16548

Merged
merged 3 commits into from
Jun 14, 2024
Merged

docs: fix redirect #16548

merged 3 commits into from
Jun 14, 2024

Conversation

317brian
Copy link
Contributor

@317brian 317brian commented Jun 4, 2024

This deletes a markdown file in favor of the redirect file entry. Having both led to the following warning:

[WARNING] @docusaurus/plugin-client-redirects: multiple redirects are created with the same "from" pathname: "/docs/latest/ingestion/flatten-json.html"
It is not possible to redirect the same pathname to multiple destinations:
- {"from":"/docs/latest/ingestion/flatten-json.html","to":"/docs/latest/ingestion/flatten-json"}
- {"from":"/docs/latest/ingestion/flatten-json.html","to":"/docs/latest/ingestion/ingestion-spec"}

Having it doesn't break anything since it just gets ignored, but it's nice to get rid of a warning

Verify by running npm run build/yarn build, launching the site locally (like with http-server) and verifying that HOST:PORT/docs/latest/ingestion/flatten-json.html redirects to ingestion-spec

This PR has:

  • been self-reviewed.

(cherry picked from commit d86aaad)
@@ -201,7 +201,6 @@ const Redirects=[
},
{
"from": [
"/docs/latest/ingestion/flatten-json.html",
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we able to keep this redirect, and remove the flatten-json md file instead? That way, all the redirects would be kept in one place.

Copy link
Contributor Author

@317brian 317brian Jun 11, 2024

Choose a reason for hiding this comment

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

It's a tradeoff. We keep it all in one place, but redirects done this way always go to /latest since we didn't adopt Docusaurus's versioning feature. The one in the file will stay within the same version.

I don't have strong feelings about one over the other. Traditionally, I think we've just typically been fine with redirects always going to the latest version. So we can stick with tradition 🤣

@317brian 317brian changed the title docs: cleanup msq index page docs: fix redirect Jun 11, 2024
"/docs/latest/ingestion/flatten-json.html",
"/docs/latest/ingestion/transform-spec.html"
"/docs/latest/ingestion/transform-spec.html",
"/docs/latest/ingestion/flatten-json.html"
],
"to": "/docs/latest/ingestion/ingestion-spec"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we split this into two entries? Since the Markdown file redirected to /docs/latest/ingestion/data-formats, we might want to keep that. But keep redirecting transform-spec to ingestion-spec.

Also, let's double-check the flatten-json redirection works as expected (maybe something is off, which would be why the markdown was added a couple of weeks ago?).

Copy link
Member

@vtlim vtlim left a comment

Choose a reason for hiding this comment

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

Works for me 🦖

@FrankChen021 FrankChen021 merged commit e1926e2 into apache:master Jun 14, 2024
12 checks passed
@kfaraz kfaraz added this to the 31.0.0 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants