Replace Docusaurus site with static HTML

This commit is contained in:
Nova King
2025-08-19 03:05:23 -07:00
parent c510b9c2b5
commit 0a46ac6a90
23 changed files with 189 additions and 9640 deletions

15
docs/docs.js Normal file
View File

@@ -0,0 +1,15 @@
async function loadDoc() {
const hash = decodeURIComponent(location.hash.slice(1)) || '01-get-started/01-What-is-Stardust';
const file = hash + '.md';
const res = await fetch(file);
const container = document.getElementById('content');
if (!res.ok) {
container.textContent = 'Document not found.';
return;
}
let text = await res.text();
text = text.replace(/^---[\s\S]*?---\n/, '');
container.innerHTML = marked.parse(text);
}
window.addEventListener('hashchange', loadDoc);
window.addEventListener('load', loadDoc);

23
docs/index.html Normal file
View File

@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Stardust XR Docs</title>
<link rel="stylesheet" href="../style.css" />
<link rel="icon" type="image/png" href="../static/img/icon.png" />
<script src="../js/marked.min.js"></script>
<script src="docs.js" defer></script>
</head>
<body>
<header>
<h1><a href="../index.html" style="color:inherit;text-decoration:none;">Stardust XR Docs</a></h1>
<nav>
<a href="../index.html">Home</a>
</nav>
</header>
<main>
<div id="content">Loading...</div>
</main>
</body>
</html>