Closed tadman closed 10 years ago
Do you know how to do that? I have thought about this problem a lot and am not sure it is possible.
I'm not sure who's in charge of the repo for that site, but it should be the promises-aplus
project which doesn't appear to be public. Making patches to that repo will trigger a site rebuild.
Both sites are a product of this repo's gh-pages branch. But how do we tell GitHub to create different contents for the different URLs?
It'd probably be better to have two different repos, one for the domain, one for the legacy site, and make the legacy site a redirect to the main site.
The pages site on the github.io
domain is locked to the repo name, but the repo for the domain name one could be called anything.
One hacky solution would be a script like this at the bottom:
<script>
if (document.location.host !== "promisesaplus.com") {
// redirect to corresponding site on promisesaplus.com, possibly overwriting the
// body with a message beforehand so people are aware of the issue.
}
</script>
I'd much prefer a proper 301 redirect, but I don't see any way we're going to get that from a GitHub pages site.
I was tempted to try this until gh-pages broke entirely for me. #158
Maybe one of the approaches from this SO can help.
So is anyone going to add that meta header? According to that stack overflow answer it seems like a pretty perfect solution. EDIT: I'm just realizing right now that that will probably not work because the redirect will be circular.
What about adding a base tag ?
<base href="http://promisesaplus.com/" >
It's not perfect but I think it's better then dead links or absolute paths.
Fixed by a series of fairly-comical commits in the gh-pages branch. Also added rel="canonical" links which should help clean up our Google presence.
The old GitHub pages site http://promises-aplus.github.io/promises-spec/ ranks really high in the Google search results for Promises/A+ but is apparently out of date and very few of the links in the footer work correctly. Since it looks exactly like the new site, it does stand to introduce a lot of confusion.
It seems like this page should be killed off and replaced with some kind of redirect to the official http://promisesaplus.com/ site.