-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
21 lines (19 loc) · 841 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
document.addEventListener("DOMContentLoaded", function() {
// Replace these URLs with the actual URLs of your Markdown files
let posts = [
'https://raw.githubusercontent.com/PugTechnology/Pug-Land/main/posts/azure/post_azure.md',
'https://raw.githubusercontent.com/PugTechnology/Pug-Land/main/posts/office365/post_office365.md'
];
posts.forEach(url => {
fetch(url)
.then(response => response.text())
.then(markdown => {
let converter = new showdown.Converter();
let html = converter.makeHtml(markdown);
let div = document.createElement('div');
div.className = 'blog-post';
div.innerHTML = html;
document.getElementById('blog-posts').appendChild(div);
});
});
});