Spaces:
Running
Running
Update index.html
Browse files- index.html +27 -18
index.html
CHANGED
@@ -1,19 +1,28 @@
|
|
1 |
-
<!
|
2 |
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
<html>
|
3 |
+
<head>
|
4 |
+
<title>Markdown Viewer</title>
|
5 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js"></script>
|
6 |
+
<!-- Or for Marked.js: -->
|
7 |
+
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/4.0.0/marked.min.js"></script> -->
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
<div id="markdown-content"></div>
|
11 |
+
|
12 |
+
<script>
|
13 |
+
const markdownUrl = 'https://raw.githubusercontent.com/huggingface/xet-core/refs/heads/assaf/spec/spec/spec.md'; // Replace with your URL
|
14 |
+
|
15 |
+
fetch(markdownUrl)
|
16 |
+
.then(response => response.text())
|
17 |
+
.then(markdownText => {
|
18 |
+
const converter = new showdown.Converter(); // For Showdown.js
|
19 |
+
// Or for Marked.js:
|
20 |
+
// const html = marked.parse(markdownText);
|
21 |
+
|
22 |
+
const html = converter.makeHtml(markdownText); // For Showdown.js
|
23 |
+
document.getElementById('markdown-content').innerHTML = html;
|
24 |
+
})
|
25 |
+
.catch(error => console.error('Error fetching Markdown:', error));
|
26 |
+
</script>
|
27 |
+
</body>
|
28 |
+
</html>
|