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);