Skip to content

Commit

Permalink
Bazel DevSite: Explicitly specify source file location of index.md fi…
Browse files Browse the repository at this point in the history
…les.

We typically omit "index" from URLs since both https://bazel.build/migrate/index and https://bazel.build/migrate point to the same index.md file.
However, the second URL breaks the "view source" button since it uses the path from the HTTP request, which lacks the essential "index" part.
Consequently, clicking the button led to a 404 error on GitHub.

This change fixes the problem by setting the correct source file path.

PiperOrigin-RevId: 486916394
Change-Id: I57c0ea58307f294ff52fe147aa21726c1c363f24
  • Loading branch information
fweikert authored and copybara-github committed Nov 8, 2022
1 parent 128d833 commit a7fc88a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions site/en/basics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Book: /_book.yaml

# Build Basics

{% dynamic setvar source_file "site/en/basics/index.md" %}
{% include "_buttons.html" %}

A build system is one of the most important parts of an engineering organization
Expand Down
1 change: 1 addition & 0 deletions site/en/contribute/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Book: /_book.yaml

# Contributing to Bazel

{% dynamic setvar source_file "site/en/contribute/index.md" %}
{% include "_buttons.html" %}

There are many ways to help the Bazel project and ecosystem.
Expand Down
1 change: 1 addition & 0 deletions site/en/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Book: /_book.yaml

# Installing Bazel

{% dynamic setvar source_file "site/en/install/index.md" %}
{% include "_buttons.html" %}

This page describes the various platforms supported by Bazel and links
Expand Down
1 change: 1 addition & 0 deletions site/en/migrate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Book: /_book.yaml

# Migrating to Bazel

{% dynamic setvar source_file "site/en/migrate/index.md" %}
{% include "_buttons.html" %}

This page links to migration guides for Bazel.
Expand Down
1 change: 1 addition & 0 deletions site/en/release/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Book: /_book.yaml

# Release Policy

{% dynamic setvar source_file "site/en/release/index.md" %}
{% include "_buttons.html" %}

Bazel maintains a
Expand Down
1 change: 1 addition & 0 deletions site/en/rules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Book: /_book.yaml

# Rules

{% dynamic setvar source_file "site/en/rules/index.md" %}
{% include "_buttons.html" %}

The Bazel ecosystem has a growing and evolving set of rules to support popular
Expand Down
1 change: 1 addition & 0 deletions site/en/versions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Book: /_book.yaml

# Documentation Versions

{% dynamic setvar source_file "site/en/versions/index.md" %}
{% include "_buttons.html" %}

The documentation on this website represents the latest in Bazel. Documentation
Expand Down

0 comments on commit a7fc88a

Please sign in to comment.