diff --git a/frontend/src/components/doc-content.vue b/frontend/src/components/doc-content.vue index 31f88ada..21322575 100644 --- a/frontend/src/components/doc-content.vue +++ b/frontend/src/components/doc-content.vue @@ -627,7 +627,9 @@ const downloadFile = () => { const link = document.createElement("a"); link.style.display = "none"; link.setAttribute("href", url.value); - link.setAttribute("download", props.details.type === 'manual' ? props.details.title + '.md' : props.details.title); + const needsExt = props.details.type === 'manual' && !props.details.title.toLowerCase().endsWith('.md'); + const ext = needsExt ? '.md' : ''; + link.setAttribute("download", props.details.title + ext); document.body.appendChild(link); link.click(); nextTick(() => { @@ -695,11 +697,13 @@ const handleDetailsScroll = () => {
{{ $t('knowledgeBase.documentTitle') }} -
- {{ details.title }} -
-
- +
+
+ {{ details.title }} +
+
+ +