Closed Bug 1394074 Opened 7 years ago Closed 4 years ago

Use redirects for Sphinx docs, formalize URI schema, upload old versions

Categories

(Developer Infrastructure :: Source Documentation, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED MOVED

People

(Reporter: gps, Unassigned)

References

(Blocks 1 open bug)

Details

+++ This bug was initially created as a clone of Bug #1390693 +++

In bug 1390693, we refactored the Sphinx docs to upload different copies. e.g. /main/latest, /main/57.0.

In this bug, I want to clean things up a bit:

* Decide if the current <project>/<version> schema is ideal. For the hostname of firefox-source-docs.mozilla.org, one can make the argument that <version>/<project> is more appropriate.
* Investigate using redirect objects so e.g. / redirects to the latest docs.
* Backfill docs for old versions as far back as we can (for posterity)
* Maybe populate an index with links to all available projects/versions
* Purge the S3 bucket so we start from a clean slate and don't have any cruft
See Also: → 1402154
Product: Core → Firefox Build System

Didn't know this bug existed, but some of the functionality has been implemented already.

  • Investigate using redirect objects so e.g. / redirects to the latest docs.

This item isn't completed, but redirects are now possible as of bug 1527363. However, S3's API only supports redirecting based on prefix match. So I'm not sure if it's possible to distinguish e.g / from /main/latest.

  • Purge the S3 bucket so we start from a clean slate and don't have any cruft

This is finished (bug 1526796).

Component: General → Generated Documentation

Note that it's possible to create an empty object with a "website-redirect-location" metadata item. S3's website hosting will translate this into a 302.

https://github.com/taskcluster/taskcluster-docs/blob/master/lib/make-redirects.js#L25

So you could put that at /index.html for example.

Yes, if we wanted a general redirect (e.g, /foo/bar.html -> /main/latest/foo/bar.html), we'd need one redirect per page. This would be totally do-able.. just not sure if that's any better than just uploading the files to multiple locations.

It is from an SEO perspective since it "combines" those pages' pagerank.

Good point. I guess hosting an empty object is also some fraction of a cent cheaper than hosting actual content as well.

Though, maybe it would be better to redirect both main/latest and main/<latest version> to / instead. Those could both be handled with a single prefix redirect and it would also keep URLs shorter for the common case. If we did this, we'd need to upload main/<older version> from DocUp tasks running on older trees. But we should arguably be doing this anyway.

On an unrelated note, I don't really see much benefit in supporting multiple projects. I guess gps was envisioning people might want to have more "stand-alone" docs, e.g firefox-source-docs.mozilla.org/mozbase/latest/index.html. In practice I'm not entirely sure how much more useful that is than just firefox-source-docs.org/main/latest/mozbase/index.html.

One pro of the "stand-alone" approach is that the index hierarchy will be much flatter. But one big con is that these sub-projects aren't discoverable from the main docs. I guess it doesn't hurt to leave multi-project support in but it's worth noting that no one is using this feature.

Going to resolve this as much of this has been completed, much of the rest is covered by other bugs and there are too many questions here anyway.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → MOVED
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.