patridge / learn-metadata-tool

Chrome extension for Microsoft Learn folks to find content maintainers and GitHub content pages.
https://chrome.google.com/webstore/detail/microsoft-learn-maintenan/kagphmnlicelfcbbhhmgjcpgnbponlda
MIT License
2 stars 0 forks source link

Notebooks edit link #64

Closed patridge closed 3 years ago

patridge commented 3 years ago

(Also showing only the applicable edit links rather than disabling the link part.)

patridge commented 3 years ago

Looks like Learn-relative links are currently broken. But if it's indicative of a new URL format, we need to make the system handle these links as well.

Example: /learn/modules/count-moon-rocks-python-nasa/notebooks/3-read-text-file.ipynb

If we assume it's hosted in the same repo, we can probably find the difference between this and the page's source URL to find the best guess at a source URL for the notebook.

Example:

patridge commented 3 years ago

Since I was already handling absolute URLs, I just made any relative URLs absolute to Learn before doing the GitHub URL manipulations.

patridge commented 3 years ago

{Fixes #60}