assafvayner HF Staff commited on
Commit
be70a85
·
verified ·
1 Parent(s): f646389

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +27 -18
index.html CHANGED
@@ -1,19 +1,28 @@
1
- <!doctype html>
2
  <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
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>