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 relative links in reference documentation #468

Merged
merged 3 commits into from
Mar 10, 2025
Merged

Conversation

jhamon
Copy link
Collaborator

@jhamon jhamon commented Mar 10, 2025

Problem

In the rendered static site at https://sdk.pinecone.io/python, links from within the README to other markdown files in the github repo are currently broken links.

Solution

  • Add beautifulsoup4 as dev dependency to enable parsing generated docs pages
  • After the docs build, find relative links pointing to markdown files and replace the path with a github url.
  • Setup a different flavor of the README specifically for pdoc to link to the most important parts of the reference docs
  • Make a few docs tweaks (mainly adding @private annotations in a few places to hide clutter)

Type of Change

  • Infrastructure change (CI configs, etc)

@jhamon jhamon marked this pull request as ready for review March 10, 2025 16:03
@jhamon jhamon requested a review from austin-denoble March 10, 2025 16:03
Copy link
Contributor

@austin-denoble austin-denoble left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a bunch for getting this fixed up.


if __name__ == "__main__":
if len(sys.argv) < 2:
print("Usage: python script.py input.html [output.html]")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Might be worth changing this to python fix-relative-links.py

continue

print(f"Processing {file}")
input_path = os.path.join(root, file)
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably don't need to be defensive here, but would it make sense to check that the files being processed are html?

@jhamon jhamon merged commit 938a5c8 into main Mar 10, 2025
52 of 58 checks passed
@jhamon jhamon deleted the jhamon/fix-docs-links branch March 10, 2025 17:22
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.

2 participants