Adds view page in markdown to UI element #1326
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
This pull request enhances the Markdown page utilities in
js/copy-to-llm.jsby improving URL handling for scoped deployments and adding a new "View Page in Markdown" option to the dropdown menu. The changes ensure that page slugs and Markdown URLs are correctly generated based on the current scope, and that the UI behaves appropriately on the home page.Improvements to URL and slug handling:
getScopeUrlandstripBasePathfunctions to correctly compute the base path and scope for generating page slugs and Markdown URLs, ensuring compatibility with scoped deployments. (js/copy-to-llm.js, js/copy-to-llm.jsR21-R55)getPageSlugandgetMarkdownUrlto use the new scope-aware logic for consistent and accurate URL generation. (js/copy-to-llm.js, js/copy-to-llm.jsR21-R55)UI enhancements:
js/copy-to-llm.js, [1] [2]js/copy-to-llm.js, js/copy-to-llm.jsL292-R338)