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

fix(docs): add custom editUrl path for intro page #31334

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

dwgrossberg
Copy link
Contributor

SUMMARY

Problem

At issue is a broken link on the main docs intro page (https://superset.apache.org/docs/intro). This bug was introduced after a previous PR: docs: various improvements across the docs, which removed the intro.md file from the superset/docs/docs subdirectory after deeming it redundant. This change had the unintended consequence of breaking the link for the "Edit this page on GitHub" button on the main docs/intro site page. This is because the docusaurus.config.js is currently configured to return a path of 'https://github.com/apache/superset/edit/master/docs/' + docPath. While this works fine for the other sidebar items that are still housed in the docs/docs subdirectory, it needs updating for the intro page, which is currently built from the main repo README.md file.

Solution

Add a custom editURL function to the docusaurus.config.js file so that the intro page will now properly redirect to the main repo README.md file, and the remaining sidebar links will remain unchanged.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Link Location:
Screen Shot 2024-11-19 at 11 25 44 PM

Before:
Screen Shot 2024-11-19 at 11 26 13 PM

After:
Screen Shot 2024-12-07 at 1 09 11 AM

TESTING INSTRUCTIONS

Change the docusaurus.config.js file as suggested and check that the intro page link is working correctly. Verify that all other page links continue working as expected.

ADDITIONAL INFORMATION

  • Has associated issue: Fixes Link to edit Superset /docs/intro page on GitHub is broken  #30985
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Dec 7, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the contribution!

@rusackas
Copy link
Member

rusackas commented Dec 9, 2024

Thanks for the fix! Re-running CI after fixing a small linting issue. Hopefully it passes, but nag us if it needs more attention!

@mistercrunch mistercrunch merged commit 878c7f0 into apache:master Dec 9, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Namespace | Anything related to documentation size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link to edit Superset /docs/intro page on GitHub is broken
3 participants