-
Notifications
You must be signed in to change notification settings - Fork 366
refactor package urls, routes, and handlers #999
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
refactor package urls, routes, and handlers #999
Conversation
d4192e8 to
be75cf4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've uploaded a branch with some changes. Nothing significant, just helped me review. Feel free to pick and choose.
https://github.com/ocaml/ocaml.org/tree/cuihtlauac-999
It may have been possible to split this in several PR.
In url.ml I'm not so convinced by the names:
package_redirect
package_docs_redirect
To me, redirection is an implementation option which is not relevant to URL string processing and should not be exposed. Maybe package_overview_without_version and package_documentation_without_version would be better. I'm not sure.
Overall, it goes in the right direction, this is what matters.
I'm pretty sure I don't want to name it in such a way that someone will be tempted to use that URL in a template. I considered moving it to the |
I had the same thought. Let's do that and remove them from |
* refactor package urls, routes, and handlers * move package redirects to redirection.ml
* refactor package urls, routes, and handlers * move package redirects to redirection.ml
* make package documentation link more obvious (#828) * make documentation link more obvious * minor style improvement Co-Authored-By: Sabine Schmaltz <sabine@tarides.com> * improve authors/maintainers display on package overview (#1001) * refactor package urls, routes, and handlers (#999) * refactor package urls, routes, and handlers * move package redirects to redirection.ml * Unify package overview and documentation layout (#1015) * unified package overview/docs layout Rearranges package overview and documentation such that: * package_layout.eml defines the two sidebars and the content area * there is a navigation element to switch between Overview (About) and Documentation (Docs) * there is a placeholder element for the upcoming in-package search (to remind us how important this feature is and to show users that we have a plan where it goes) Consequences: * package overview page now has a collapsing sidebar with a button to slide it in on small screens * package documentation now has a tablet (md) layout that shows the sidebar on-screen, instead of collapsed * add text-sm which was lost during unification * "Overview" instead of "About" since we have the space * Add support for sitemap.xml * Generate sitemap.xml by dream * Apply suggestions from @cuihtlauac code review Co-authored-by: Cuihtlauac Alvarado <cuihtlauac@users.noreply.github.com> * Convert lists of urls to sequences and change names of functions * Apply suggestions from @cuihtlauac code review 2 Co-authored-by: Cuihtlauac Alvarado <cuihtlauac@users.noreply.github.com> * Delete subdomains URLs and URLs returning status code other than 200 * Apply suggestions from @cuihtlauac code review 3 Co-authored-by: Cuihtlauac Alvarado <cuihtlauac@users.noreply.github.com> * Update PR * formating * do not touch playground asset * Apply suggestions from @cuihtlauac code review 4 * Apply suggestions from @cuihtlauac code review 5 * Apply suggestions from @cuihtlauac code review 6 * Apply suggestions from @cuihtlauac code review 7 * Apply suggestions from @cuihtlauac code review 8 --------- Co-authored-by: Sabine Schmaltz <sabine@tarides.com> Co-authored-by: sabine <sabine@users.noreply.github.com> Co-authored-by: Cuihtlauac Alvarado <cuihtlauac@users.noreply.github.com>
This patch
PackageHelpersto prevent confusion with handlershomepagesandsourceResolves #995.
There's more potential for tidying up / clarifying that this patch does not include, e.g.
package_documentationhandlerpackage.jsondocumentation_statusas part ofpackage.jsonpackage.json