Skip to content

Take down docker.github.io #6433

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

Merged
merged 4 commits into from
Jan 17, 2019
Merged

Take down docker.github.io #6433

merged 4 commits into from
Jan 17, 2019

Conversation

allejo
Copy link
Contributor

@allejo allejo commented Apr 12, 2018

Proposed changes

Don't know if you're still interested in taking down the docker.github.io domain from #6101, but see my comment #6101 (comment).

This PR does the following:

  • Adds a .nojekyll so GitHub doesn't build the site as a Jekyll site
  • Adds a index.html so GitHub has something to fall back on and it'll redirect to docs.docker.com
  • Adds index.html to Jekyll's exclude list so it doesn't interfere with index.md
  • Abuse GitHub's 404.html to blindly attempt a redirect to a docs.docker.com URL

Closes #6101

/cc @joaofnfernandes @thaJeztah

@gbarr01 gbarr01 added the area/ux Issue affects functionality of docs.docker.com label Apr 12, 2018
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! I'm not super-familiar with the Jekyll options, but left some comments on the HTML changes 👍

index.html Outdated
<meta http-equiv="refresh" content="0; url=https://docs.docker.com" />
<title>Docker docs</title>
</head>
<body></body>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps this body should also mention that we're redirecting; similar to the 404 page, and provide a link if redirect doesn't kick in (e.g., if you're not being automatically redirected, click here ..)

404.html Outdated
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Docker docs</title>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:perhaps Docker Documentation instead of "docs"

index.html Outdated
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=https://docs.docker.com" />
<title>Docker docs</title>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:perhaps Docker Documentation instead of "docs"

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a meta-redirect here as well (perhaps with a 1..2 seconds timeout)?;

<meta http-equiv="refresh" content="1; url=https://docs.docker.com" />

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put it for 1 second as you suggested; should be enough time for JS to kick in if enabled.

404.html Outdated
<p>We have moved away from the <strong>docker.github.io</strong> domain. Please visit <a href="https://docs.docker.com">docs.docker.com</a> instead.</p>

<script>
window.location.replace("https://docs.docker.com" + window.location.pathname);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we want to remove the original URL from history; perhaps use .assign() instead?

window.location.assign("https://docs.docker.com" + window.location.pathname);

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but would like people from the docs team to verify the Jekyll side of things 😅

@bermudezmt
Copy link
Contributor

@JustinINevill also sounds like a good candidate for discussion during F2F. See #6101 for more context.

@bermudezmt
Copy link
Contributor

@allejo I looked into doing a similar redirect for one of the DTR pages but according to http://www.redirect-checker.org/can-i-use-meta-refresh.php and Wikipedia, the meta refresh tag is deprecated and not recommended by W3C and Google. I do find it concerning that docker.github.io is very out of sync with docs.docker.com. cc: @thaJeztah @JustinINevill

@allejo
Copy link
Contributor Author

allejo commented Dec 28, 2018

Yea, the correct way of handling redirects is using response headers instead of the meta tag or JS. However, GitHub pages doesn’t support anything fancy like response headers. Their recommendation for redirects is the Jekyll redirect plugin, which at its core uses a meta tag refresh.

Unless GitHub support gets involved and starts supporting response redirect support, not sure what other options there are.

@GordonTheTurtle
Copy link

Deploy preview for docsdocker ready!

Built with commit fef6260

https://deploy-preview-6433--docsdocker.netlify.com

@thaJeztah
Copy link
Member

Yes, it's definitely a dirty-hack® / band-aid, but I don't think there's another way currently to remove the docker.github.io domain (see the discussion on #6101)

@thaJeztah
Copy link
Member

@bermudezmt this LGTY?

@bermudezmt
Copy link
Contributor

bermudezmt commented Jan 4, 2019

@allejo @thaJeztah what's the least invasive way to test this change? I fiddled around with testing this locally but that doesn't really work. I don't suppose we could point the site URL in _config.yml to staging and test the redirect that way?

@allejo
Copy link
Contributor Author

allejo commented Jan 4, 2019

One idea would be replicating the situation this repo is in:

  1. Create a GH org + gh-pages repo (e.g. sample-org/sample-org.github.io); see the discussion Take docker.github.io down #6101 to make sure I'm not missing anything
  2. Use the master branch to generate this Jekyll site
  3. Then try out this PR in that repo and ensure the redirect works and it no longer builds as a Jekyll site

@bermudezmt
Copy link
Contributor

@allejo thank you for the quick response! Sorry if you're having to repeat information regarding this issue (and PR). I will bring this up again at our next team meeting and let you know how we decide to move forward.

@bermudezmt
Copy link
Contributor

bermudezmt commented Jan 14, 2019

Status update 01/14/2019:
Conversed with Github and @peter-docker regarding this PR. Here's a thoughtful response from Friday Saarelaht at Github which supports the fixes in this PR, with the caveat that .nojekyll might affect some site configurations:

In the context of GitHub Pages, a "custom domain" refers to any domain other than a GitHub-provided *.github.io subdomain. Looking at the docker/docker.github.io repository, it doesn't appear a custom domain is configured.

If your site is hosted here on GitHub Pages, you can configure docs.docker.com as a custom domain by following our instructions below. If you follow this approach, docker.github.io would then redirect to docs.docker.com automatically.

https://help.github.com/articles/using-a-custom-domain-with-github-pages

However, it doesn't appear docs.docker.com is currently hosted with GitHub Pages. With this in mind, if the goal is to have docker.github.io redirect to an externally-hosted site, then the approach embodied by Pull Request #6433 represent the best available option. It's worth noting that a .nojekyll file disables Jekyll entirely, rendering the _config.yml file changes redundant.

I hope that helps! Let us know if you have any more questions.

Next step is for @JustinINevill to check on current site traffic for docker.github.io.

@allejo
Copy link
Contributor Author

allejo commented Jan 14, 2019

It's worth noting that a .nojekyll file disables Jekyll entirely, rendering the _config.yml file changes redundant.

Just as a note, the .nojekyll file is a GH-pages only feature; it's set so GH won't compile Jekyll and deploy it anymore. The changes to _config.yml are not redundant in this case because there's an index.html in this PR, which will conflict with the current index.md in the repo; index.html will take precedence meaning you'd break the docs.docker.com homepage if you don't ignore it. So when you build the Jekyll site and host it whereever docs.docker.com is currently being hosted, you want Jekyll to build index.md and ignore index.html (which is only intended for GH-pages redirects).

@JustinINevill
Copy link
Contributor

JustinINevill commented Jan 17, 2019

@allejo thank you very much for your work on this!

@bermudezmt I'm approving the implementation of this based on your testing and the reduced user confusion that will result from removing this now superfluous, not fully working, and low traffic domain.

@bermudezmt
Copy link
Contributor

Thank you so much for your patience with this, @allejo . We welcome more web development / Jekyll insights from you!

@bermudezmt bermudezmt merged commit 5af7998 into docker:master Jan 17, 2019
@allejo allejo deleted the takedown-github-io branch January 17, 2019 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ux Issue affects functionality of docs.docker.com
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants