From d201a57be36fc835f6bf9130e7bfc19ad988dc28 Mon Sep 17 00:00:00 2001 From: rizzhal Date: Thu, 13 Aug 2026 00:32:49 +0530 Subject: [PATCH 1/3] redesign documentation page --- app/documentation/page.tsx | 203 +++++++++++++++++++++++++++++++++---- 1 file changed, 183 insertions(+), 20 deletions(-) diff --git a/app/documentation/page.tsx b/app/documentation/page.tsx index 5079c268..80f9bd7e 100644 --- a/app/documentation/page.tsx +++ b/app/documentation/page.tsx @@ -3,10 +3,28 @@ import path from "path" import matter from "gray-matter" import Link from "next/link" import { MarkdownRenderer } from "@/components/markdown-renderer" +import { ArrowRight, BookOpen, FileText, Package, Printer, ScanLine, Settings } from "lucide-react" +import React from "react" const PAGE_MD = path.join(process.cwd(), "contents", "pages", "documentation.md") const DOCS_DIR = path.join(process.cwd(), "contents", "documentation") +const iconsMap = { + "01-printer-application": Printer, + "02-designing-printer-drivers": Settings, + "03-designing-scanner-drivers": ScanLine, + "04-packaging-drivers": Package, + "05-User-Manual": BookOpen +} as const + +const descriptionMap = { + "01-printer-application": "Explore how Printer Applications simplify and enhance printing in Linux.", + "02-designing-printer-drivers": "Learn the essentials of building reliable and efficient printer drivers.", + "03-designing-scanner-drivers": "Guidelines and best practices for creating scanner drivers.", + "04-packaging-drivers": "Step-by-step guide to package your drivers and publish to the Snap Store.", + "05-User-Manual": "Comprehensive user manual for Printer Applications.", +} as const + export default async function DocumentationPage() { const raw = await fs.readFile(PAGE_MD, "utf8") const { data, content } = matter(raw) @@ -33,32 +51,177 @@ export default async function DocumentationPage() { const hasContent = content != null && content.trim().length > 0 return ( -
-
-

- {typeof data.title === "string" ? data.title : "Documentation"} -

- - {hasContent && ( -
- +
+
+ + +
+
+ +
+ +
+ +

+ {typeof data.title === "string" + ? data.title + : "Documentation"} +

- )} -
    - {docs.map((doc) => ( -
  • + {hasContent && ( +
    + +
    + )} +
+ + +
+ {docs.map((doc) => { + const Icon = + iconsMap[doc.slug as keyof typeof iconsMap] ?? FileText; + + const description = + descriptionMap[ + doc.slug as keyof typeof descriptionMap + ]; + + return ( - {doc.title} + {/* Icon */} +
+ +
+ + {/* Content */} +
+

+ {doc.title} +

+ + {description && ( +

+ {description} +

+ )} +
+ + {/* Arrow */} +
+ +
- - ))} - + ); + })} +
+
- ) -} + ); +} \ No newline at end of file From b68ec1535ff6bcc747a99241161662718d8c4712 Mon Sep 17 00:00:00 2001 From: rizzhal Date: Fri, 14 Aug 2026 00:11:49 +0530 Subject: [PATCH 2/3] Fix: description --- app/documentation/page.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/documentation/page.tsx b/app/documentation/page.tsx index 80f9bd7e..a40c812b 100644 --- a/app/documentation/page.tsx +++ b/app/documentation/page.tsx @@ -18,11 +18,11 @@ const iconsMap = { } as const const descriptionMap = { - "01-printer-application": "Explore how Printer Applications simplify and enhance printing in Linux.", - "02-designing-printer-drivers": "Learn the essentials of building reliable and efficient printer drivers.", - "03-designing-scanner-drivers": "Guidelines and best practices for creating scanner drivers.", - "04-packaging-drivers": "Step-by-step guide to package your drivers and publish to the Snap Store.", - "05-User-Manual": "Comprehensive user manual for Printer Applications.", + "01-printer-application": "Overview of Printer Applications", + "02-designing-printer-drivers": "Creating your first Printer Driver", + "03-designing-scanner-drivers": "Scanner driver architecture and guidelines", + "04-packaging-drivers": "Packaging and publishing drivers", + "05-User-Manual": "Printer Application refernce", } as const export default async function DocumentationPage() { From 8274781a9c3916036432266b84ea3d46358f0955 Mon Sep 17 00:00:00 2001 From: rizzhal Date: Fri, 14 Aug 2026 00:34:23 +0530 Subject: [PATCH 3/3] Fix: sentence styles for headings --- contents/documentation/02-designing-printer-drivers.md | 2 +- contents/documentation/03-designing-scanner-drivers.md | 2 +- contents/documentation/04-packaging-drivers.md | 2 +- contents/documentation/05-User-Manual.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contents/documentation/02-designing-printer-drivers.md b/contents/documentation/02-designing-printer-drivers.md index 124cf48c..1aee2d81 100644 --- a/contents/documentation/02-designing-printer-drivers.md +++ b/contents/documentation/02-designing-printer-drivers.md @@ -1,5 +1,5 @@ --- -title: Designing Printer Drivers +title: Designing printer drivers toc: true toc_sticky: true h_range: [1,2] diff --git a/contents/documentation/03-designing-scanner-drivers.md b/contents/documentation/03-designing-scanner-drivers.md index e700de4b..2ab892b8 100644 --- a/contents/documentation/03-designing-scanner-drivers.md +++ b/contents/documentation/03-designing-scanner-drivers.md @@ -1,5 +1,5 @@ --- -title: Designing Scanner Drivers +title: Designing scanner drivers toc: true toc_sticky: true h_range: [1,3] diff --git a/contents/documentation/04-packaging-drivers.md b/contents/documentation/04-packaging-drivers.md index 128c120d..63fd3f5b 100644 --- a/contents/documentation/04-packaging-drivers.md +++ b/contents/documentation/04-packaging-drivers.md @@ -1,5 +1,5 @@ --- -title: Packaging Drivers and Release them to the Snap Store +title: Packaging drivers and release them to the Snap Store toc: true toc_sticky: true h_range: [1,3] diff --git a/contents/documentation/05-User-Manual.md b/contents/documentation/05-User-Manual.md index db755169..59e8d644 100644 --- a/contents/documentation/05-User-Manual.md +++ b/contents/documentation/05-User-Manual.md @@ -1,5 +1,5 @@ --- -title: User Manual for Printer Applications +title: User manual for Printer Applications toc: true toc_sticky: true h_range: [1,3]