Added in the 'latest' command and display latest post in terminal boot

This commit is contained in:
Dan 2025-12-08 14:52:34 +00:00
parent 99e89f7e84
commit e58896cc52
5 changed files with 40 additions and 2 deletions

View file

@ -46,6 +46,15 @@ window.terminal.registerCommand("reload", "Reload the current page", () => {
// PAGE NAVIGATION
window.terminal.registerCommand(
"latest",
"View the latest post, regardles of section",
() => {
let latestPostLink = document.getElementById("latest-post-link");
window.location.href = latestPostLink.textContent;
},
);
// About command
window.terminal.registerCommand("about", "About this site", () => {
window.location.href = "/about/";