Skip to content

Commit

Permalink
docs: Add base href to each page to fix relative URLs (#16046)
Browse files Browse the repository at this point in the history
* fix: Set base URL on pages so relative URL links work

Fixes #15844

* Use relative base URL
  • Loading branch information
nzakas committed Jun 28, 2022
1 parent 6840940 commit f50cf43
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/src/_includes/layouts/base.html
@@ -1,6 +1,5 @@
<!DOCTYPE html>
<html lang="{{ config.lang }}" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand All @@ -24,7 +23,10 @@
<!-- SEO -->
<title>{{ page_title }}</title>
<meta name="description" content="{{ page_desc }}">
<link rel="canonical" href="{{page_url}}">
<link rel="canonical" href="{{ page_url }}">

<!-- https://github.com/eslint/eslint/issues/15844 -->
<base href="{{ relative_page_url }}">

<!-- favicon -->
<link rel="icon" href="/favicon.ico" sizes="any"><!-- 32×32 -->
Expand Down

0 comments on commit f50cf43

Please sign in to comment.