Spaces:
Running
Running
| <html> | |
| <head> | |
| <title>Markdown Viewer</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js"></script> | |
| <!-- Or for Marked.js: --> | |
| <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/marked/4.0.0/marked.min.js"></script> --> | |
| </head> | |
| <body> | |
| <div id="markdown-content"></div> | |
| <script> | |
| const markdownUrl = 'https://raw.githubusercontent.com/huggingface/xet-core/refs/heads/assaf/spec/spec/spec.md'; // Replace with your URL | |
| fetch(markdownUrl) | |
| .then(response => response.text()) | |
| .then(markdownText => { | |
| const converter = new showdown.Converter(); // For Showdown.js | |
| // Or for Marked.js: | |
| // const html = marked.parse(markdownText); | |
| const html = converter.makeHtml(markdownText); // For Showdown.js | |
| document.getElementById('markdown-content').innerHTML = html; | |
| }) | |
| .catch(error => console.error('Error fetching Markdown:', error)); | |
| </script> | |
| </body> | |
| </html> |