Initial commit
This commit is contained in:
commit
93330ddc28
9 changed files with 145 additions and 0 deletions
13
assets/js/main.js
Normal file
13
assets/js/main.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
const data = get_data()
|
||||
const post_list = document.getElementById("posts")
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
data.posts.forEach(post => {
|
||||
const item = document.createElement("li")
|
||||
const anchor = document.createElement("a")
|
||||
anchor.innerText = post.title
|
||||
anchor.href = 'posts/html/' + post.slug + '.md.html'
|
||||
item.appendChild(anchor)
|
||||
post_list.appendChild(item)
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue