Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
0d31187
clean repo for overhaul
rajnandan1 Jan 22, 2026
0149b3e
first commit for version 4, very unstable
rajnandan1 Jan 22, 2026
6b88cf1
changes
Jan 22, 2026
0709111
Refactor monitoring data retrieval and caching mechanisms; enhance mo…
rajnandan1 Jan 22, 2026
d6b68e3
Refactor monitoring components and enhance latency handling; update U…
rajnandan1 Jan 23, 2026
9f2ab70
changes
Jan 23, 2026
2dce981
changes
rajnandan1 Jan 24, 2026
b51fc19
changes
rajnandan1 Jan 24, 2026
4608b03
alerting new set up done
rajnandan1 Jan 26, 2026
b4aeb51
Update seed function to insert all alert templates when no templates …
rajnandan1 Jan 26, 2026
c4f0945
subs v1
rajnandan1 Jan 26, 2026
d0d8e60
changes
rajnandan1 Jan 27, 2026
af829fa
changes
rajnandan1 Jan 28, 2026
28bfd8c
refactor: simplify SubscribeMenu props and integrate subscription set…
rajnandan1 Jan 28, 2026
b7023b7
changes
rajnandan1 Jan 29, 2026
e714fe8
changes
rajnandan1 Jan 29, 2026
2abb266
changes
Jan 29, 2026
463d1c8
changes
rajnandan1 Jan 30, 2026
8a0e1e7
changes
rajnandan1 Jan 30, 2026
93f91ab
changes
Jan 30, 2026
c77985f
i18n
rajnandan1 Jan 30, 2026
8f187aa
Implement sub-menu options configuration and localization updates
rajnandan1 Jan 31, 2026
accdd76
changes
rajnandan1 Jan 31, 2026
3165567
added few apis
rajnandan1 Feb 2, 2026
8bd26cc
delete trigger
rajnandan1 Feb 2, 2026
6c15d48
new api spec
rajnandan1 Feb 2, 2026
d851610
Implement theme configuration and user preferences for status page
rajnandan1 Feb 2, 2026
00511da
changes
Feb 2, 2026
24872d2
changes
Feb 2, 2026
98c723c
changes
Feb 2, 2026
045ce12
Implement monitor management components including DangerZoneCard, Gen…
rajnandan1 Feb 2, 2026
34605fe
Remove email customization feature and related API endpoints from the…
rajnandan1 Feb 3, 2026
3295b7b
docs
rajnandan1 Feb 3, 2026
601186d
good docs
Feb 3, 2026
331cd5b
Refactor documentation structure and enhance monitor features with ne…
rajnandan1 Feb 4, 2026
e92c8a0
added docs might get modified for api monitors
Feb 4, 2026
4d0e135
changes
Feb 4, 2026
52c76fc
clean up
rajnandan1 Feb 5, 2026
08f72e5
Enhance monitoring functionality with new uptime calculations and ale…
rajnandan1 Feb 5, 2026
2d7d6a3
fixes
rajnandan1 Feb 5, 2026
9a0ca6c
Create alert configuration and logs pages with functionality for mana…
rajnandan1 Feb 5, 2026
96fd8d0
Create maintenance documentation for impact on monitoring, overview, …
rajnandan1 Feb 5, 2026
ba41c6f
Implement password reset functionality with email template and API en…
rajnandan1 Feb 5, 2026
6ed95ed
Implement user invitation system with password setup and validation
rajnandan1 Feb 6, 2026
6aa43fa
Implement URL resolver functions for client and server, update naviga…
rajnandan1 Feb 6, 2026
038c52a
base path adding
Feb 6, 2026
845132f
base path adding
Feb 6, 2026
a20125a
changes
rajnandan1 Feb 6, 2026
1c05e2d
style: Update LanguageSelector and ThemePlus components for improved …
rajnandan1 Feb 7, 2026
baa9449
refactor: Update components for improved styling and theme handling
rajnandan1 Feb 7, 2026
47c00c2
refactor: Replace IsLoggedInSession with GetLoggedInSession and updat…
rajnandan1 Feb 7, 2026
cdc0de9
refactor: Update SMTP configuration handling and improve email setup …
rajnandan1 Feb 7, 2026
be0745f
Initial plan
Claude Feb 7, 2026
4ff1604
feat: Add documentation-writer Claude skill
Claude Feb 7, 2026
7f32802
Merge pull request #575 from rajnandan1/claude/create-documentation-s…
rajnandan1 Feb 7, 2026
7392b96
cvcc
rajnandan1 Feb 8, 2026
c759ade
file clean up
rajnandan1 Feb 8, 2026
72a28ca
changes
rajnandan1 Feb 8, 2026
9e8b096
changes
rajnandan1 Feb 9, 2026
ee1adf8
vv
rajnandan1 Feb 9, 2026
228808a
stable
Feb 9, 2026
eed71d3
added group
Feb 9, 2026
8a498e9
refactor: update tooltip styles and improve component structure acros…
rajnandan1 Feb 9, 2026
9b99bec
Create Dockerfile and Docker Compose configurations for Kener v4 appl…
rajnandan1 Feb 10, 2026
c58530c
cleanup 1
rajnandan1 Feb 10, 2026
5f86ca2
analystic 101
rajnandan1 Feb 10, 2026
3208105
track: implement event tracking for user interactions across multiple…
rajnandan1 Feb 10, 2026
2377a4f
changes
Feb 10, 2026
17ed56c
changes
rajnandan1 Feb 10, 2026
1f370b3
changes
rajnandan1 Feb 11, 2026
290113d
refactor: update layout and styling for MinuteGrid and MonitorDayDeta…
rajnandan1 Feb 11, 2026
d99da14
sas
Feb 11, 2026
21f06a4
hb
rajnandan1 Feb 11, 2026
366c2c0
refactor: update heartbeat handling and monitoring logic, enhance UI …
rajnandan1 Feb 12, 2026
8fd8aa4
refactor: implement CloneMonitor functionality and enhance monitor lo…
rajnandan1 Feb 12, 2026
6ea045d
refactor: implement site announcement feature with management UI and …
rajnandan1 Feb 12, 2026
09afbbd
refactor: optimize npm installation step by removing cache mount
rajnandan1 Feb 12, 2026
552bdc0
refactor: enhance ping and tcp monitoring logic, improve error handli…
rajnandan1 Feb 13, 2026
275c9d7
changes
Feb 13, 2026
d1eb926
changes
Feb 13, 2026
444fe58
ui revamp
rajnandan1 Feb 13, 2026
d04ee0a
changes
rajnandan1 Feb 14, 2026
d170ba6
refactor: enhance documentation and improve page titles with site name
rajnandan1 Feb 14, 2026
5a95c81
refactor: restrict role updates in user data modification
rajnandan1 Feb 14, 2026
e6424b1
refactor: integrate @humanspeak/svelte-purify for enhanced HTML sanit…
rajnandan1 Feb 15, 2026
d758de0
refactor: enhance image upload ID generation with file extension
rajnandan1 Feb 15, 2026
7b3afa4
so many
rajnandan1 Feb 16, 2026
5989e5b
refactor: improve error handling and logging in GamedigCall, SqlCall,…
rajnandan1 Feb 16, 2026
14d46cb
Merge main into next/4-pre-alpha (keep overhaul changes)
rajnandan1 Feb 16, 2026
b088a79
refactor: update logging in analyticsEvent function and improve laten…
rajnandan1 Feb 16, 2026
9129e96
changes
Feb 16, 2026
88072b7
changes
rajnandan1 Feb 16, 2026
58f0e9f
refactor: remove copy current page link option and implement sharing …
rajnandan1 Feb 17, 2026
3aedb9b
refactor: restructure authentication flow and remove obsolete API end…
rajnandan1 Feb 17, 2026
9a8bf84
changes
Feb 17, 2026
1c485ac
go live
rajnandan1 Feb 20, 2026
c9c675d
changes
Feb 20, 2026
4b23e72
changes
rajnandan1 Feb 20, 2026
e5e244e
refactor: enhance MonitorBar component with layout options and improv…
rajnandan1 Feb 21, 2026
bf126e7
refactor: implement event display settings for incidents and maintena…
rajnandan1 Feb 21, 2026
1c6bed1
changes
rajnandan1 Feb 21, 2026
cbc48d2
docs updates
rajnandan1 Feb 22, 2026
585db91
refactor: enhance layout and site data handling with social preview i…
rajnandan1 Feb 22, 2026
339d653
delete static files
rajnandan1 Feb 22, 2026
50482aa
changes
rajnandan1 Feb 22, 2026
78bad84
refactor: update workflow to publish nightly Docker images with impro…
rajnandan1 Feb 22, 2026
3363e90
chore(locales): Update translations for multiple languages and add ne…
rajnandan1 Feb 23, 2026
9199b80
chore: Update environment variables and documentation for ORIGIN requ…
rajnandan1 Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
good docs
  • Loading branch information
Raj Nandan Sharma Raj Nandan Sharma
Raj Nandan Sharma authored and Raj Nandan Sharma committed Feb 3, 2026
commit 601186dcc08a860e5c7578ceb43188b506f350a9
64 changes: 51 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@
"knex": "^3.1.0",
"lucide-svelte": "^0.561.0",
"marked": "^17.0.1",
"marked-alert": "^2.1.2",
"marked-custom-heading-id": "^2.0.16",
"marked-gfm-heading-id": "^4.1.3",
"marked-highlight": "^2.2.3",
"marked-plaintify": "^1.1.1",
"mobile-detect": "^1.4.5",
"mode-watcher": "^1.1.0",
"moment": "^2.30.1",
Expand Down
89 changes: 52 additions & 37 deletions src/lib/marked.ts
Original file line number Diff line number Diff line change
@@ -1,41 +1,45 @@
import { marked } from "marked";
import { Marked } from "marked";
import { markedHighlight } from "marked-highlight";
import markedPlaintify from "marked-plaintify";
import customHeadingId from "marked-custom-heading-id";
import markedAlert from "marked-alert";
import hljs from "highlight.js";

/**
* Configure marked with syntax highlighting
* Uses highlight.js for code block syntax highlighting
*/
function configureMarked() {
// Configure marked with highlight.js
marked.use(
markedHighlight({
langPrefix: "hljs language-",
highlight(code: string, lang: string) {
const language = hljs.getLanguage(lang) ? lang : "plaintext";
return hljs.highlight(code, { language }).value;
},
}),
);
// Create dedicated instances for each use case to avoid cross-contamination
const markedHTML = new Marked();
const markedText = new Marked();

// Custom renderer to open links in new tab
const renderer = new marked.Renderer();
renderer.link = function ({ href, title, tokens }: { href: string; title?: string | null; tokens: any[] }) {
const titleAttr = title ? ` title="${title}"` : "";
const text = this.parser.parseInline(tokens);
return `<a href="${href}"${titleAttr} target="_blank" rel="noopener noreferrer">${text}</a>`;
};
// Configure HTML instance with syntax highlighting
markedHTML.use(customHeadingId());
markedHTML.use(markedAlert());
markedHTML.use(
markedHighlight({
langPrefix: "hljs language-",
highlight(code: string, lang: string) {
const language = hljs.getLanguage(lang) ? lang : "plaintext";
return hljs.highlight(code, { language }).value;
},
}),
);
markedHTML.use({
renderer: {
link({ href, title, tokens }: { href: string; title?: string | null; tokens: any[] }) {
const titleAttr = title ? ` title="${title}"` : "";
const text = this.parser.parseInline(tokens);
return `<a href="${href}"${titleAttr} target="_blank" rel="noopener noreferrer">${text}</a>`;
},
},
});
markedHTML.setOptions({
breaks: true,
gfm: true,
});

marked.setOptions({
breaks: true, // Convert line breaks to <br>
gfm: true, // Enable GitHub Flavored Markdown
renderer: renderer,
});
}
// Configure text instance for plain text conversion
markedText.use(markedPlaintify());

/**
* Convert markdown to HTML with syntax highlighting
* Initializes marked configuration on first use for optimal performance
*
* @param markdown - The markdown string to convert
* @returns HTML string with syntax-highlighted code blocks
Expand All @@ -46,13 +50,24 @@ function configureMarked() {
* // Returns: <pre><code class="hljs language-javascript">...</code></pre>
* ```
*/
let isConfigured = false;

export default function mdToHTML(markdown: string): string {
if (!isConfigured) {
configureMarked();
isConfigured = true;
}
return markedHTML.parse(markdown, { async: false }) as string;
}

return marked.parse(markdown) as string;
/**
* Convert markdown to plain text
* Strips all markdown syntax and returns clean text
*
* @param markdown - The markdown string to convert
* @returns Plain text string with markdown syntax removed
*
* @example
* ```typescript
* const text = mdToText('# Hello **World**');
* // Returns: 'Hello World'
* ```
*/
export function mdToText(markdown: string): string {
const text = markedText.parse(markdown, { async: false }) as string;
return text.replace(/\s+/g, " ").trim();
}
17 changes: 3 additions & 14 deletions src/lib/server/docs-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
*/

import FlexSearch from "flexsearch";
import { marked } from "marked";
import striptags from "striptags";
import { redisConnection } from "$lib/server/redisConnector";
import { mdToText } from "$lib/marked";
import type { DocsSearchDocument, DocsSearchResult, DocsSearchIndexData } from "$lib/types/docs-search";
import { getDocsConfig, getMarkdownContent, getAllPages } from "../../routes/(docs)/docs/docs-utils.server";

Expand All @@ -17,16 +16,6 @@ const REDIS_DOCS_KEY = "kener-docs:search:documents";
let searchIndex: any = null;
let documentsMap: Map<string, DocsSearchDocument> = new Map();

/**
* Convert markdown to plain text using marked and striptags
*/
function stripMarkdown(content: string): string {
// Convert markdown to HTML
const html = marked.parse(content, { async: false }) as string;
// Strip HTML tags and normalize whitespace
return striptags(html).replace(/\s+/g, " ").trim();
}

/**
* Create a search excerpt around the matching term
*/
Expand All @@ -51,7 +40,7 @@ function createExcerpt(content: string, query: string, maxLength: number = 150):
}

/**
* Create slug from heading text (same logic as addHeadingIds in docs-utils)
* Create slug from heading text (same logic as marked-gfm-heading-id)
*/
function createHeadingSlug(text: string): string {
return text
Expand Down Expand Up @@ -149,7 +138,7 @@ export async function buildSearchIndex(): Promise<void> {
for (const page of group.pages) {
const markdownContent = getMarkdownContent(page.slug);
if (markdownContent) {
const plainContent = stripMarkdown(markdownContent);
const plainContent = mdToText(markdownContent);
const doc: DocsSearchDocument = {
id: page.slug,
title: page.title,
Expand Down
2 changes: 2 additions & 0 deletions src/routes/(docs)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import "../layout.css";
import "../kener.css";
import "../docs.css";
import "../prose.css";
import "highlight.js/styles/github-dark.css";
import { ModeWatcher } from "mode-watcher";
import { resolve } from "$app/paths";
import { Toaster } from "$lib/components/ui/sonner/index.js";
Expand Down
10 changes: 3 additions & 7 deletions src/routes/(docs)/docs/(with-sidebar)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,19 @@
<div class="mx-auto flex max-w-[1400px] pt-24">
<!-- Mobile sidebar overlay -->
{#if isMobileMenuOpen}
<div
class="fixed inset-0 top-24 z-[35] bg-black/50 lg:hidden"
onclick={closeMobileMenu}
role="presentation"
></div>
<div class="fixed inset-0 top-24 z-35 bg-black/50 lg:hidden" onclick={closeMobileMenu} role="presentation"></div>
{/if}

<!-- Sidebar -->
<aside
class="bg-background border-border fixed top-24 bottom-0 left-0 z-40 w-[280px] -translate-x-full overflow-y-auto border-r transition-transform duration-300 ease-in-out lg:translate-x-0"
class="bg-background fixed top-24 bottom-0 left-0 z-40 w-[200px] -translate-x-full overflow-y-auto transition-transform duration-300 ease-in-out lg:translate-x-0"
class:translate-x-0={isMobileMenuOpen}
>
<DocsSidebar config={data.config} currentSlug={data.currentSlug} onNavigate={closeMobileMenu} />
</aside>

<!-- Main content -->
<div class="min-w-0 flex-1 p-6 px-8 lg:ml-[280px] lg:p-8 lg:px-12">
<div class="min-w-0 flex-1 p-6 px-8 lg:ml-[200px] lg:p-8 lg:px-12">
{@render children()}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PageServerLoad } from "./$types";
import { getDocsPageData, addHeadingIds, extractTableOfContents, docExists } from "../../docs-utils.server";
import { getDocsPageData, extractTableOfContents, docExists } from "../../docs-utils.server";
import { error } from "@sveltejs/kit";
import mdToHTML from "$lib/marked";

Expand All @@ -21,11 +21,8 @@ export const load: PageServerLoad = async ({ params }) => {
});
}

// Convert markdown to HTML
let htmlContent = mdToHTML(pageData.content);

// Add IDs to headings for anchor links
htmlContent = addHeadingIds(htmlContent);
// Convert markdown to HTML (heading IDs are added by marked-gfm-heading-id)
const htmlContent = mdToHTML(pageData.content);

// Extract table of contents
const tableOfContents = extractTableOfContents(htmlContent);
Expand Down
Loading