Centralize base styles for docs.bazel.build using bazel-website's css
The base style.scss is already identical between the two sites; this PR pulls it from bazel-website instead of having a local copy.
Like https://github.com/bazelbuild/bazel-blog/pull/225, but for docs.bazel.build
For bazelbuild/bazel#10793
Closes #11376.
PiperOrigin-RevId: 311500094
diff --git a/WORKSPACE b/WORKSPACE
index 7a65056..0ab394d 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -567,6 +567,7 @@
load("//scripts/docs:doc_versions.bzl", "DOC_VERSIONS")
+# Load versioned documentation tarballs from GCS
[http_file(
# Split on "-" to get the version without cherrypick commits.
name = "jekyll_tree_%s" % DOC_VERSION["version"].split("-")[0].replace(".", "_"),
@@ -574,6 +575,20 @@
urls = ["https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-%s.tar" % DOC_VERSION["version"]],
) for DOC_VERSION in DOC_VERSIONS]
+# Load shared base CSS theme from bazelbuild/bazel-website
+http_archive(
+ name = "bazel_website",
+ urls = ["https://github.com/bazelbuild/bazel-website/archive/c174fa288aa079b68416d2ce2cc97268fa172f42.tar.gz"],
+ strip_prefix = "bazel-website-c174fa288aa079b68416d2ce2cc97268fa172f42",
+ sha256 = "a5f531dd1d62e6947dcfc279656ffc2fdf6f447c163914c5eabf7961b4cb6eb4",
+ # TODO(https://github.com/bazelbuild/bazel/issues/10793)
+ # - Export files from bazel-website's BUILD, instead of doing it here.
+ # - Share more common stylesheets, like footer and navbar.
+ build_file_content = """
+exports_files(["_sass/style.scss"])
+"""
+)
+
# Skydoc recommends declaring its dependencies via "*_dependencies" functions.
# This requires that the repositories these functions come from need to be
# fetched unconditionally for everything (including just building bazel!), so
@@ -907,4 +922,3 @@
load("//tools/distributions/debian:deps.bzl", "debian_deps")
debian_deps()
-