Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
raymeskhoury authored Jul 24, 2024
1 parent 4c5ac5f commit 60e034c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blog/src/blog.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ async function downloadPosts() {
}

if (postName) {
postName += ".md";
mode = "single";
let index = 0;
for (; index < posts.length; ++index) {
Expand Down Expand Up @@ -207,8 +208,7 @@ async function renderPosts() {
template.style.display = "block";
template.getElementsByClassName("blogtitle")[0].innerText = post.title;
template.getElementsByClassName("blogimg")[0].src = post.image;
template.getElementsByClassName("blogheadinglink")[0].href = "?page=" + post.name;

template.getElementsByClassName("blogheadinglink")[0].href = "?post=" + post.name.substring(0, post.name.length-3);

template.getElementsByClassName("blogcontent")[0].innerHTML = post.body;
const options = { year: "numeric", month: "long", day: "numeric" };
Expand Down

0 comments on commit 60e034c

Please sign in to comment.