From 7180ec1d1906effc8e2b89de62c7280b5bce3638 Mon Sep 17 00:00:00 2001 From: Muhammad Salman Date: Sun, 21 Jul 2024 15:12:20 +0500 Subject: [PATCH] feat[#18]: add support for Markdown headings in URL to link to a specific section --- src/views/ArticleView.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/ArticleView.vue b/src/views/ArticleView.vue index 5a5a2d4..1dcabf0 100644 --- a/src/views/ArticleView.vue +++ b/src/views/ArticleView.vue @@ -180,6 +180,7 @@ export default defineComponent({ (c) => c.shortName === this.collectionName ); + document.getElementById(window.location.hash.slice(1))?.scrollIntoView({behavior: 'smooth'}); this.setEditUrl(collectionConfig); }, methods: {