Added in the 'latest' command and display latest post in terminal boot
This commit is contained in:
parent
99e89f7e84
commit
e58896cc52
5 changed files with 40 additions and 2 deletions
|
|
@ -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/";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue