Skip to content

Commit

Permalink
add markdown parser
Browse files Browse the repository at this point in the history
😎
  • Loading branch information
bubzilla committed Nov 27, 2024
1 parent d94db27 commit 8d1f413
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
16 changes: 13 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bubzilla.DEV</title>

<script src="https://cdn.jsdelivr.net/npm/showdown@latest/dist/showdown.min.js"></script>
<link rel="stylesheet" href="/style/stylesheet.css">
</head>
<body>
<script src="js/header.js"></script>
<div class="container" style="width: 95%;">
<p>Welcome to my website! I'm not really doing much with it at the moment, but soon I'll probally have something functional here!</p>
</div>
<!-- Markdown Parser carrying. FRR -->
<div id="markdown" class="container" style="width: 95%;"></div>
</body>

<script>
fetch('/index.md')
.then(response => response.text())
.then(text => {
const converter = new showdown.Converter();
const html = converter.makeHtml(text);
document.getElementById('markdown').innerHTML = html;
});
</script>
</html>
3 changes: 3 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Welcome to my website, here I just place all my internet adventures for everyone to see!
&nbsp;
Use the navigator on the top of your screen to look around my website!

0 comments on commit 8d1f413

Please sign in to comment.