Use relative paths in links in docs.
This change fixes links among Bazel docs to use relative paths links instead of
absolute path (either full URL or absolute from site root). This way, versioned
documentation will link to other pages within the same versioned directory
rather than to the site root, which will point to the latest version of the
page from HEAD.
Future improvements may include adding a lint tool to check links in
documentation to ensure that the correct convention is followed such that all
links to pages within a version of the docs will point to pages within the same
version.
RELNOTES: None
PiperOrigin-RevId: 160117865
diff --git a/site/docs/tutorial/cpp.md b/site/docs/tutorial/cpp.md
index e0a5e70..95898e3 100644
--- a/site/docs/tutorial/cpp.md
+++ b/site/docs/tutorial/cpp.md
@@ -27,7 +27,7 @@
## Before you begin
-To prepare for the tutorial, first [Install Bazel](/docs/install.md) if
+To prepare for the tutorial, first [Install Bazel](../install.md) if
you don't have it installed already. Then, retrieve the sample project from
Bazel's GitHub repository:
@@ -369,15 +369,15 @@
Next, read up on the most common [C++ build use cases](cpp-use-cases.md). Then,
check out the following:
-* [External Dependencies](https://bazel.build/versions/master/docs/external.html)
- to learn more about working with local and remote repositories.
+* [External Dependencies](../external.html) to learn more about working with
+ local and remote repositories.
-* The [Build Encyclopedia](/docs/be/overview.html) to learn more about Bazel.
+* The [Build Encyclopedia](../be/overview.html) to learn more about Bazel.
-* The [Java build tutorial](/docs/tutorial/java.md) to get started with
+* The [Java build tutorial](java.md) to get started with
building Java applications with Bazel.
-* The [mobile application tutorial](/docs/tutorial/app.md) to get started with
+* The [mobile application tutorial](app.md) to get started with
building mobile applications for Android and iOS with Bazel.
Happy building!