Skip to content

Commit 8196ae7

Browse files
authored
Merge pull request #11 from mine3krish/feature/base-url
Feature: added baseUrl support
2 parents e3fd6e1 + 4b88247 commit 8196ae7

File tree

25 files changed

+89
-571
lines changed

25 files changed

+89
-571
lines changed

dist/images/icon.png

-123 Bytes
Loading

dist/index.html

Lines changed: 3 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
66
<title>Zeno Docs - Documentation</title>
7-
<link rel="stylesheet" href="style.css">
7+
<link rel="stylesheet" href="/style.css">
88
<link rel="preconnect" href="https://fonts.googleapis.com">
99
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1010
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
@@ -220,7 +220,6 @@ <h4>Support</h4>
220220
</div>
221221
</footer>
222222
<script>
223-
// Theme toggle
224223
function toggleTheme() {
225224
const currentTheme = document.documentElement.getAttribute('data-theme');
226225
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
@@ -234,71 +233,10 @@ <h4>Support</h4>
234233
}
235234
}
236235

237-
// Sidebar toggle
238236
function toggleSidebar() {
239237
const sidebar = document.getElementById('sidebar');
240238
sidebar.classList.toggle('open');
241239
}
242-
243-
// Initialize theme and other functionality
244-
document.addEventListener('DOMContentLoaded', function() {
245-
// Initialize theme
246-
const savedTheme = localStorage.getItem('theme') || 'light';
247-
document.documentElement.setAttribute('data-theme', savedTheme);
248-
249-
const themeIcon = document.querySelector('.theme-icon');
250-
if (themeIcon) {
251-
themeIcon.textContent = savedTheme === 'dark' ? '☀️' : '🌙';
252-
}
253-
254-
// Setup search functionality
255-
const searchInput = document.getElementById('searchInput');
256-
const searchResults = document.getElementById('searchResults');
257-
258-
if (searchInput && searchResults) {
259-
searchInput.addEventListener('input', function(e) {
260-
const query = e.target.value.toLowerCase();
261-
262-
if (query.length > 2) {
263-
// Mock search results - replace with actual search implementation
264-
const mockResults = [
265-
{ title: 'Getting Started', url: '/getting-started.html' },
266-
{ title: 'Configuration', url: '/configuration.html' },
267-
{ title: 'Themes', url: '/themes.html' },
268-
{ title: 'Plugins', url: '/plugins.html' }
269-
].filter(item => item.title.toLowerCase().includes(query));
270-
271-
if (mockResults.length > 0) {
272-
searchResults.innerHTML = mockResults.map(result =>
273-
`<a href="${result.url}" class="search-result-item">${result.title}</a>`
274-
).join('');
275-
searchResults.style.display = 'block';
276-
} else {
277-
searchResults.innerHTML = '<div class="search-no-results">No results found</div>';
278-
searchResults.style.display = 'block';
279-
}
280-
} else {
281-
searchResults.style.display = 'none';
282-
}
283-
});
284-
285-
// Hide search results when clicking outside
286-
document.addEventListener('click', function(e) {
287-
if (!searchInput.contains(e.target) && !searchResults.contains(e.target)) {
288-
searchResults.style.display = 'none';
289-
}
290-
});
291-
}
292-
293-
// Set active navigation item
294-
const currentPath = window.location.pathname;
295-
const navItems = document.querySelectorAll('.nav-item');
296-
navItems.forEach(item => {
297-
if (item.getAttribute('href') === currentPath) {
298-
item.classList.add('active');
299-
}
300-
});
301-
});
302240
</script>
303241
</body>
304242
</html>
@@ -310,15 +248,15 @@ <h4>Support</h4>
310248
<div class="card-header">
311249
<div class="card-icon">📚</div>
312250
<h3 class="card-title">
313-
<a href="{{slug}}/" class="card-link">{{post_title}}</a>
251+
<a href="/{{slug}}/" class="card-link">{{post_title}}</a>
314252
</h3>
315253
</div>
316254
<p class="card-description">{{excerpt}}</p>
317255
<div class="card-footer">
318256
<div class="card-tags">
319257
<span class="card-tag">Guide</span>
320258
</div>
321-
<a href="{{slug}}/" class="card-arrow">→</a>
259+
<a href="/{{slug}}/" class="card-arrow">→</a>
322260
</div>
323261
</div>`;
324262

dist/post/configuration/index.html

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,6 @@ <h4>Support</h4>
359359
}
360360
</script>
361361
<script>
362-
// Theme toggle
363362
function toggleTheme() {
364363
const currentTheme = document.documentElement.getAttribute('data-theme');
365364
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
@@ -373,71 +372,10 @@ <h4>Support</h4>
373372
}
374373
}
375374

376-
// Sidebar toggle
377375
function toggleSidebar() {
378376
const sidebar = document.getElementById('sidebar');
379377
sidebar.classList.toggle('open');
380378
}
381-
382-
// Initialize theme and other functionality
383-
document.addEventListener('DOMContentLoaded', function() {
384-
// Initialize theme
385-
const savedTheme = localStorage.getItem('theme') || 'light';
386-
document.documentElement.setAttribute('data-theme', savedTheme);
387-
388-
const themeIcon = document.querySelector('.theme-icon');
389-
if (themeIcon) {
390-
themeIcon.textContent = savedTheme === 'dark' ? '☀️' : '🌙';
391-
}
392-
393-
// Setup search functionality
394-
const searchInput = document.getElementById('searchInput');
395-
const searchResults = document.getElementById('searchResults');
396-
397-
if (searchInput && searchResults) {
398-
searchInput.addEventListener('input', function(e) {
399-
const query = e.target.value.toLowerCase();
400-
401-
if (query.length > 2) {
402-
// Mock search results - replace with actual search implementation
403-
const mockResults = [
404-
{ title: 'Getting Started', url: '/getting-started.html' },
405-
{ title: 'Configuration', url: '/configuration.html' },
406-
{ title: 'Themes', url: '/themes.html' },
407-
{ title: 'Plugins', url: '/plugins.html' }
408-
].filter(item => item.title.toLowerCase().includes(query));
409-
410-
if (mockResults.length > 0) {
411-
searchResults.innerHTML = mockResults.map(result =>
412-
`<a href="${result.url}" class="search-result-item">${result.title}</a>`
413-
).join('');
414-
searchResults.style.display = 'block';
415-
} else {
416-
searchResults.innerHTML = '<div class="search-no-results">No results found</div>';
417-
searchResults.style.display = 'block';
418-
}
419-
} else {
420-
searchResults.style.display = 'none';
421-
}
422-
});
423-
424-
// Hide search results when clicking outside
425-
document.addEventListener('click', function(e) {
426-
if (!searchInput.contains(e.target) && !searchResults.contains(e.target)) {
427-
searchResults.style.display = 'none';
428-
}
429-
});
430-
}
431-
432-
// Set active navigation item
433-
const currentPath = window.location.pathname;
434-
const navItems = document.querySelectorAll('.nav-item');
435-
navItems.forEach(item => {
436-
if (item.getAttribute('href') === currentPath) {
437-
item.classList.add('active');
438-
}
439-
});
440-
});
441379
</script>
442380
</body>
443381
</html>

dist/post/installation/index.html

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ <h4>Support</h4>
323323
}
324324
</script>
325325
<script>
326-
// Theme toggle
327326
function toggleTheme() {
328327
const currentTheme = document.documentElement.getAttribute('data-theme');
329328
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
@@ -337,71 +336,10 @@ <h4>Support</h4>
337336
}
338337
}
339338

340-
// Sidebar toggle
341339
function toggleSidebar() {
342340
const sidebar = document.getElementById('sidebar');
343341
sidebar.classList.toggle('open');
344342
}
345-
346-
// Initialize theme and other functionality
347-
document.addEventListener('DOMContentLoaded', function() {
348-
// Initialize theme
349-
const savedTheme = localStorage.getItem('theme') || 'light';
350-
document.documentElement.setAttribute('data-theme', savedTheme);
351-
352-
const themeIcon = document.querySelector('.theme-icon');
353-
if (themeIcon) {
354-
themeIcon.textContent = savedTheme === 'dark' ? '☀️' : '🌙';
355-
}
356-
357-
// Setup search functionality
358-
const searchInput = document.getElementById('searchInput');
359-
const searchResults = document.getElementById('searchResults');
360-
361-
if (searchInput && searchResults) {
362-
searchInput.addEventListener('input', function(e) {
363-
const query = e.target.value.toLowerCase();
364-
365-
if (query.length > 2) {
366-
// Mock search results - replace with actual search implementation
367-
const mockResults = [
368-
{ title: 'Getting Started', url: '/getting-started.html' },
369-
{ title: 'Configuration', url: '/configuration.html' },
370-
{ title: 'Themes', url: '/themes.html' },
371-
{ title: 'Plugins', url: '/plugins.html' }
372-
].filter(item => item.title.toLowerCase().includes(query));
373-
374-
if (mockResults.length > 0) {
375-
searchResults.innerHTML = mockResults.map(result =>
376-
`<a href="${result.url}" class="search-result-item">${result.title}</a>`
377-
).join('');
378-
searchResults.style.display = 'block';
379-
} else {
380-
searchResults.innerHTML = '<div class="search-no-results">No results found</div>';
381-
searchResults.style.display = 'block';
382-
}
383-
} else {
384-
searchResults.style.display = 'none';
385-
}
386-
});
387-
388-
// Hide search results when clicking outside
389-
document.addEventListener('click', function(e) {
390-
if (!searchInput.contains(e.target) && !searchResults.contains(e.target)) {
391-
searchResults.style.display = 'none';
392-
}
393-
});
394-
}
395-
396-
// Set active navigation item
397-
const currentPath = window.location.pathname;
398-
const navItems = document.querySelectorAll('.nav-item');
399-
navItems.forEach(item => {
400-
if (item.getAttribute('href') === currentPath) {
401-
item.classList.add('active');
402-
}
403-
});
404-
});
405343
</script>
406344
</body>
407345
</html>

dist/post/introduction-to-zeno/index.html

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,6 @@ <h4>Support</h4>
478478
}
479479
</script>
480480
<script>
481-
// Theme toggle
482481
function toggleTheme() {
483482
const currentTheme = document.documentElement.getAttribute('data-theme');
484483
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
@@ -492,71 +491,10 @@ <h4>Support</h4>
492491
}
493492
}
494493

495-
// Sidebar toggle
496494
function toggleSidebar() {
497495
const sidebar = document.getElementById('sidebar');
498496
sidebar.classList.toggle('open');
499497
}
500-
501-
// Initialize theme and other functionality
502-
document.addEventListener('DOMContentLoaded', function() {
503-
// Initialize theme
504-
const savedTheme = localStorage.getItem('theme') || 'light';
505-
document.documentElement.setAttribute('data-theme', savedTheme);
506-
507-
const themeIcon = document.querySelector('.theme-icon');
508-
if (themeIcon) {
509-
themeIcon.textContent = savedTheme === 'dark' ? '☀️' : '🌙';
510-
}
511-
512-
// Setup search functionality
513-
const searchInput = document.getElementById('searchInput');
514-
const searchResults = document.getElementById('searchResults');
515-
516-
if (searchInput && searchResults) {
517-
searchInput.addEventListener('input', function(e) {
518-
const query = e.target.value.toLowerCase();
519-
520-
if (query.length > 2) {
521-
// Mock search results - replace with actual search implementation
522-
const mockResults = [
523-
{ title: 'Getting Started', url: '/getting-started.html' },
524-
{ title: 'Configuration', url: '/configuration.html' },
525-
{ title: 'Themes', url: '/themes.html' },
526-
{ title: 'Plugins', url: '/plugins.html' }
527-
].filter(item => item.title.toLowerCase().includes(query));
528-
529-
if (mockResults.length > 0) {
530-
searchResults.innerHTML = mockResults.map(result =>
531-
`<a href="${result.url}" class="search-result-item">${result.title}</a>`
532-
).join('');
533-
searchResults.style.display = 'block';
534-
} else {
535-
searchResults.innerHTML = '<div class="search-no-results">No results found</div>';
536-
searchResults.style.display = 'block';
537-
}
538-
} else {
539-
searchResults.style.display = 'none';
540-
}
541-
});
542-
543-
// Hide search results when clicking outside
544-
document.addEventListener('click', function(e) {
545-
if (!searchInput.contains(e.target) && !searchResults.contains(e.target)) {
546-
searchResults.style.display = 'none';
547-
}
548-
});
549-
}
550-
551-
// Set active navigation item
552-
const currentPath = window.location.pathname;
553-
const navItems = document.querySelectorAll('.nav-item');
554-
navItems.forEach(item => {
555-
if (item.getAttribute('href') === currentPath) {
556-
item.classList.add('active');
557-
}
558-
});
559-
});
560498
</script>
561499
</body>
562500
</html>

0 commit comments

Comments
 (0)