mirror of https://github.com/docker/docs.git
Canonical links are expected to be full URLs, not relative. For this to work, the Dockerfile had to be updated, because we're stripping the domain-name from links ("<a href..."), but the script currently also included "<link rel='canonical' .." tags. With the change, canonical links are left alone; These hrefs will be replaced echo '<a class=foo href="https://docs.docker.com/foo">hello</a>' | sed -e 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g' # <a class=foo href="/foo">hello</a> echo '<a href="https://docs.docker.com/foo">hello</a>' | sed -e 's#\(<a[^>]* href="\)https://docs.docker.com/#\1/#g' # <a href="/foo">hello</a> But, for example, this one is left alone echo '<link rel="canonical" href="https://docs.docker.com/foo/bar" />' | sed -e 's#\(<a[^>]* href="?\)https://docs.docker.com/#\1/#g' # <link rel="canonical" href="https://docs.docker.com/foo/bar" /> Signed-off-by: Sebastiaan van Stijn <github@gone.nl> |
||
---|---|---|
.. | ||
archive-redirect.html | ||
docs.html | ||
engine-api.html | ||
redirect.html |