diff --git a/src/ts/app.ts b/src/ts/app.ts index 3daa3f2..968fa29 100644 --- a/src/ts/app.ts +++ b/src/ts/app.ts @@ -53,6 +53,13 @@ declare const Prism: any; API.getBlogPost(id).then((post) => { blogPost.innerHTML = post.content; UI.updateUI(blogPost); + + if (location.hash && location.hash !== '#' && location.hash.startsWith('#')) { + const element = document.querySelector(location.hash); + if (element) { + setTimeout(() => element.scrollIntoView(), 1000); + } + } }); }