Site: Use automatic ToC for more pages

RELNOTES: None.
PiperOrigin-RevId: 221140593
diff --git a/site/docs/crosstool-reference.md b/site/docs/crosstool-reference.md
index 1996155..331780a 100644
--- a/site/docs/crosstool-reference.md
+++ b/site/docs/crosstool-reference.md
@@ -5,25 +5,9 @@
 
 # Understanding CROSSTOOL
 
-*  [Overview](#overview)
-*  [`CROSSTOOL` proto structure](#crosstool-proto-structure)
-*  [Toolchain selection](#toolchain-selection)
-*  [`CROSSTOOL` features](#crosstool-features)
-   *  [Feature relationships](#feature-relationships)
-*  [`CROSSTOOL` actions](#crosstool-actions)
-   *  [Assembler actions](#assembler-actions)
-   *  [Compiler actions](#compiler-actions)
-   *  [Link actions](#link-actions)
-   *  [AR actions](#ar-actions)
-   *  [LTO actions](#lto-actions)
-*  [`CROSSTOOL` action_config`](#crosstool-action_config)
-   *  [`tool` messages](#tool-messages)
-   *  [Example usage](#example-usage)
-   *  [Flag groups](#flag-groups)
-   *  [Conditional expansion](#conditional-expansion)
-*  [`CROSSTOOL` reference](#crosstool-reference)
-   *  [`CROSSTOOL` build variables](#crosstool-build-variables)
-   *  [`CROSSTOOL` features](#crosstool-features)
+* ToC
+{:toc}
+
 
 To get hands-on with `CROSSTOOL`, see the
 [Configuring `CROSSTOOL`](tutorial/crosstool.html) tutorial.
diff --git a/site/docs/skylark/aspects.md b/site/docs/skylark/aspects.md
index 6511dc6..9e88382 100644
--- a/site/docs/skylark/aspects.md
+++ b/site/docs/skylark/aspects.md
@@ -5,7 +5,8 @@
 
 # Aspects
 
-<!-- [TOC] -->
+* ToC
+{:toc}
 
 **Status: Experimental**. We may make breaking changes to the API, but we will
 announce them.
diff --git a/site/docs/skylark/depsets.md b/site/docs/skylark/depsets.md
index 61919dc..fea965f 100644
--- a/site/docs/skylark/depsets.md
+++ b/site/docs/skylark/depsets.md
@@ -25,7 +25,8 @@
 If you don't need the merge operation, consider using another type, such as
 [list](lib/list.html) or [dict](lib/dict.html).
 
-<!-- [TOC] -->
+* ToC
+{:toc}
 
 ## Full example
 
diff --git a/site/docs/skylark/faq.md b/site/docs/skylark/faq.md
index 58d5481..59cdbbf 100644
--- a/site/docs/skylark/faq.md
+++ b/site/docs/skylark/faq.md
@@ -7,7 +7,8 @@
 
 These are some common issues and questions with writing extensions.
 
-<!-- [TOC] -->
+* ToC
+{:toc}
 
 
 ## Why is my file not produced / my action never executed?
diff --git a/site/docs/skylark/performance.md b/site/docs/skylark/performance.md
index e050304..6b76667 100644
--- a/site/docs/skylark/performance.md
+++ b/site/docs/skylark/performance.md
@@ -5,8 +5,6 @@
 
 # Optimizing Performance
 
-<!-- [TOC] -->
-
 When writing rules, the most common performance pitfall is to traverse or copy
 data that is accumulated from dependencies. When aggregated over the whole
 build, these operations can easily take O(N^2) time or space. To avoid this, it
@@ -17,6 +15,12 @@
 The cost of writing an inefficient rule may not be evident until it is in
 widespread use.
 
+## Contents
+{:.no_toc}
+
+* ToC
+{:toc}
+
 ## Use depsets
 
 Whenever you are rolling up information from rule dependencies you should use
diff --git a/site/docs/skylark/testing.md b/site/docs/skylark/testing.md
index b99bdd8..0d6ca8a 100644
--- a/site/docs/skylark/testing.md
+++ b/site/docs/skylark/testing.md
@@ -8,7 +8,8 @@
 There are several different approaches to testing Starlark code in Bazel. This
 page gathers the current best practices and frameworks by use case.
 
-<!-- [TOC] -->
+* ToC
+{:toc}
 
 
 ## For testing rules
diff --git a/site/docs/tutorial/cpp.md b/site/docs/tutorial/cpp.md
index 9d6b989..6c59f4d 100644
--- a/site/docs/tutorial/cpp.md
+++ b/site/docs/tutorial/cpp.md
@@ -3,8 +3,7 @@
 title: Build Tutorial - C++
 ---
 
-Introduction to Bazel: Building a C++ Project
-==========
+# Introduction to Bazel: Building a C++ Project
 
 In this tutorial, you'll learn the basics of building C++ applications with
 Bazel. You will set up your workspace and build a simple C++ project that
@@ -26,20 +25,11 @@
 *  Reference targets through labels
 
 ## Contents
+{:.no_toc}
 
-*  [Before you begin](#before-you-begin)
-   *  [Install Bazel](#install-bazel)
-   *  [Get the sample project](#get-the-sample-project)
-*  [Build with Bazel](#build-with-bazel)
-   *  [Set up the workspace](#set-up-the-workspace)
-   *  [Understand the BUILD file](#understand-the-build-file)
-   *  [Build the project](#build-the-project)
-   *  [Review the dependency graph](#review-the-dependency-graph)
-*  [Refine your Bazel build](#refine-your-bazel-build)
-   *  [Specify multiple build targets](#specify-multiple-build-targets)
-   *  [Use multiple packages](#use-multiple-packages)
-*  [Use labels to reference targets](#use-labels-to-reference-targets)
-*  [Further reading](#further-reading)
+* ToC
+{:toc}
+
 
 ## Before you begin
 
diff --git a/site/docs/tutorial/crosstool.md b/site/docs/tutorial/crosstool.md
index 7e41c11..7ebb80b 100644
--- a/site/docs/tutorial/crosstool.md
+++ b/site/docs/tutorial/crosstool.md
@@ -5,10 +5,8 @@
 
 # Configuring CROSSTOOL
 
-*  [Overview](#overview)
-*  [Setting up the build environment](#setting-up-the-build-environment)
-*  [Configuring the C++ toolchain](#configuring-the-c-toolchain)
-
+* ToC
+{:toc}
 
 ## Overview
 
diff --git a/site/docs/tutorial/ios-app.md b/site/docs/tutorial/ios-app.md
index 55909ba..8843860 100644
--- a/site/docs/tutorial/ios-app.md
+++ b/site/docs/tutorial/ios-app.md
@@ -3,31 +3,14 @@
 title: Build Tutorial - iOS
 ---
 
-Introduction to Bazel: Building an iOS App
-==========
+# Introduction to Bazel: Building an iOS App
 
 In this tutorial, you will learn how to build a simple iOS app. You'll do the
 following:
 
-*   [Set up your environment](#set-up-your-environment)
-    *   [Install Bazel](#install-bazel)
-    *   [Install Xcode](#install-xcode)
-    *   [Get the sample project](#get-the-sample-project)
-*   [Set up a workspace](#set-up-a-workspace)
-    *   [Create a WORKSPACE file](#create-a-workspace-file)
-    *   [Update the WORKSPACE file](#update-the-workspace-file)
-*   [Review the source files](#review-the-source-files)
-*   [Create a BUILD file](#create-a-build-file)
-    *   [Add the rule load statement](#add-the-rule-load-statement)
-    *   [Add an objc_library rule](#add-an-objc_library-rule)
-    *   [Add an ios_application rule](#add_an-ios_application-rule)
-*   [Build and deploy the app](#build-and-deploy-the-app)
-    *   [Build the app for the simulator](#build-the-app-for-the-simulator)
-    *   [Find the build outputs](#find-the-build-outputs)
-    *   [Run and debug the app in the simulator](#run-and-debug-the-app-in-the-simulator)
-    *   [Build the app for a device](#build-the-app-for-a-device)
-    *   [Install the app on a device](#install-the-app-on-a-device)
-*   [Review  your work](#review-your-work)
+* ToC
+{:toc}
+
 
 ## Set up your environment
 
diff --git a/site/docs/tutorial/java.md b/site/docs/tutorial/java.md
index b0ee64f..c7355c6 100644
--- a/site/docs/tutorial/java.md
+++ b/site/docs/tutorial/java.md
@@ -3,8 +3,7 @@
 title: Build Tutorial - Java
 ---
 
-Introduction to Bazel: Building a Java Project
-==========
+# Introduction to Bazel: Building a Java Project
 
 In this tutorial, you'll learn the basics of building Java applications with
 Bazel. You will set up your workspace and build a simple Java project that
@@ -24,22 +23,11 @@
 *  Deploy a target
 
 ## Contents
+{:.no_toc}
 
-*  [Before you begin](#before-you-begin)
-   *  [Install Bazel](#install-bazel)
-   *  [Install the JDK](#install-the-jdk)
-   *  [Get the sample project](#get-the-sample-project)
-*  [Build with Bazel](#build-with-bazel)
-   *  [Set up the workspace](#set-up-the-workspace)
-   *  [Understand the BUILD file](#understand-the-build-file)
-   *  [Build the project](#build-the-project)
-   *  [Review the dependency graph](#review-the-dependency-graph)
-*  [Refine your Bazel build](#refine-your-bazel-build)
-   *  [Specify multiple build targets](#specify-multiple-build-targets)
-   *  [Use multiple packages](#use-multiple-packages)
-*  [Use labels to reference targets](#use-labels-to-reference-targets)
-*  [Package a Java target for deployment](#package-a-java-target-for-deployment)
-*  [Further reading](#further-reading)
+* ToC
+{:toc}
+
 
 ## Before you begin