Skip to content

Commit 5319910

Browse files
committed
fix: Restore baseurl configuration for GitHub Pages
1 parent 24e63b1 commit 5319910

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
title: SmartRAG Documentation
22
description: A powerful and intelligent RAG library for .NET applications
3-
baseurl: ""
3+
baseurl: "/SmartRAG"
44
url: "https://byerlikaya.github.io"
55

66
# SEO and Search Engine Optimization

docs/assets/js/script.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ document.addEventListener('DOMContentLoaded', function() {
9292
const targetLang = this.getAttribute('data-lang');
9393
const currentPath = window.location.pathname;
9494

95-
// Remove current language prefix if exists
96-
let newPath = currentPath.replace(/^\/(en|tr|de|ru)/, '');
95+
// Remove baseurl and current language prefix if exists
96+
let newPath = currentPath.replace(/^\/SmartRAG/, '').replace(/^\/(en|tr|de|ru)/, '');
9797

98-
// Add new language prefix
98+
// Add new language prefix with baseurl
9999
if (newPath === '/' || newPath === '') {
100-
newPath = `/${targetLang}/`;
100+
newPath = `/SmartRAG/${targetLang}/`;
101101
} else {
102-
newPath = `/${targetLang}${newPath}`;
102+
newPath = `/SmartRAG/${targetLang}${newPath}`;
103103
}
104104

105105
// Navigate to new language version

0 commit comments

Comments
 (0)