Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,9 @@
// See: https://docusaurus.io/docs/api/docusaurus-config

import {themes as prismThemes} from 'prism-react-renderer';
import versions from './versions.json';

// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)

function getLatestVersion() {
// versions[0] is "latest", versions[1] will contain the actual version number
// of the latest version
return versions[1];
}
const latestVersion = getLatestVersion();

/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'bpftrace',
Expand Down Expand Up @@ -55,9 +47,6 @@ const config = {
}),
],
],
customFields: {
latestVersion,
},

themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
Expand Down
10 changes: 10 additions & 0 deletions static/latest.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="canonical" href="https://bpftrace.org/docs/0.22.html" />
</head>
<script>
window.location.href = 'https://bpftrace.org/docs/0.22.html';
</script>
</html>
Loading