Skip to content

Change 'alias:' to 'redirect_from:' so aliases work again #152

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 6 commits into from
Nov 5, 2016
Merged

Change 'alias:' to 'redirect_from:' so aliases work again #152

merged 6 commits into from
Nov 5, 2016

Conversation

mdlinville
Copy link

@londoncalling @johndmulhausen PTAL, I think this is why our aliases don't work. :)

@joaofnfernandes
Copy link
Contributor

Just for reference, from https://github.com/jekyll/jekyll-redirect-from, it seems that the redirect paths should end with a trailing slash.
I noticed that compose/link-env-deprecated.md doesn't have one.

@mdlinville
Copy link
Author

@johndmulhausen let me know that he thought we should still be using the alias functionality rather than redirect_from, and that there might be a bug that is causing the redirect problem that Vicky reported elsewhere. I'd like him to look at it when he comes back from vacation before we decide whether we want to make this change or fix that bug. Maybe he can explain to us why we shouldn't use redirect_from. I think it actually creates the old HTML file with a 302 redirect to the new one, and maybe he thought it would make Jenkins take longer. But let's let him give more details.

@johndmulhausen johndmulhausen self-assigned this Oct 19, 2016
@@ -581,10 +581,10 @@ In the example below, three services are provided (`web`, `worker`, and `db`), a
image: mysql
networks:
new:
aliases:
redirect_from:

Choose a reason for hiding this comment

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

Erroneous replacement

- database
legacy:
aliases:
redirect_from:

Choose a reason for hiding this comment

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

Erroneous replacement

- /docker-cloud/getting-started/use-hosted/
description: How to link Docker Cloud to a hosted cloud services provider or your
own hosts
keywords:
- node, create, understand
menu:
main:
aliases:
redirect_from:

Choose a reason for hiding this comment

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

Should be moved up to root of front matter

Choose a reason for hiding this comment

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

Actually this is a dupe

@@ -1,5 +1,5 @@
---
aliases: []
redirect_from: []

Choose a reason for hiding this comment

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

Remove

@@ -1,5 +1,5 @@
---
aliases: []
redirect_from: []

Choose a reason for hiding this comment

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

Remove

@@ -1,5 +1,5 @@
---
aliases: []
redirect_from: []

Choose a reason for hiding this comment

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

Remove

@johndmulhausen
Copy link

Added some comments; will be looking at build times. This might be preferred after all so we stop throwing 404s

@mdlinville
Copy link
Author

@johndmulhausen PTAL, I think this is ready. FYI, here is the magic command I used:

find . -type f -name "*.md"|while read i; do sed -i '' -e '1,10 s/aliases:/redirect_from:/' "$i"; done

This only replaces alias: with redirect_from: if it occurs in the first 10 lines of the file.

@johndmulhausen
Copy link

Made a few nips/tucks for consistency, but this looks great, thank you!

@johndmulhausen johndmulhausen merged commit 949a89e into docker:master Nov 5, 2016
@mdlinville mdlinville deleted the redirect_from branch November 7, 2016 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants