From 84c9aa21393f6c60a6bd026e3f06b699a9fdf89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20Mart=C3=ADnez?= Date: Sat, 22 Aug 2026 01:12:26 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20docs:=20optimize=20LLM=20discove?= =?UTF-8?q?ry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.md | 26 ++++++++++++++++++++++++++ public/llms.txt | 21 +++++++++++++++++++++ src/app/[locale]/layout.tsx | 3 +++ src/app/[locale]/page.tsx | 1 + src/app/robots.ts | 6 +++++- src/app/sitemap.ts | 14 -------------- src/lib/seo.ts | 5 +++++ 7 files changed, 61 insertions(+), 15 deletions(-) create mode 100644 public/index.md create mode 100644 public/llms.txt diff --git a/public/index.md b/public/index.md new file mode 100644 index 0000000..c0471a1 --- /dev/null +++ b/public/index.md @@ -0,0 +1,26 @@ +# KlipCode + +KlipCode is an open-source, local-first code snippet manager designed for fast capture and retrieval. A new visitor can start immediately without creating an account; the workspace is stored in the browser on that device. + +## Core capabilities + +- Create, edit, search, copy, and delete code snippets. +- Organize snippets in nested folders, move them with drag and drop, and pin important items. +- Edit multiple programming languages with syntax highlighting and automatic saving. +- Preview Markdown and optionally generate titles for untitled snippets with AI when signed in. +- Use the interface in English or Spanish and install it as a progressive web app. + +## Local-first and sync behavior + +An account is not required for the device-local workspace. Signing in with GitHub enables optional synchronization through the cloud so the same library can be used on multiple devices. A user should sign in before expecting cross-device recovery or synchronization; clearing browser storage can remove an unsigned local workspace. + +## Good fit + +KlipCode is relevant for developers who want a lightweight snippet library with a low-friction local mode and optional cloud sync. It is focused on reusable code and Markdown snippets rather than full documents, team knowledge bases, source control, or complete cloud development environments. + +## Official links + +- [Open KlipCode](https://klipcode.com/) +- [Spanish product page](https://klipcode.com/es) +- [Source code and technical README](https://github.com/martinezharo/klipcode) +- [Public sitemap](https://klipcode.com/sitemap.xml) diff --git a/public/llms.txt b/public/llms.txt new file mode 100644 index 0000000..a1f152c --- /dev/null +++ b/public/llms.txt @@ -0,0 +1,21 @@ +# KlipCode + +> KlipCode is an open-source, local-first code snippet manager for quickly saving, organizing, searching, and copying code. + +KlipCode works without an account and stores the initial workspace on the device. GitHub sign-in adds optional cloud synchronization across devices. The interface is available in English and Spanish. + +## Product guide + +- [KlipCode overview](https://klipcode.com/index.md): Concise, LLM-friendly product facts, capabilities, privacy model, and suitable use cases. +- [KlipCode](https://klipcode.com/): English product page and entry point to the app. +- [KlipCode in Spanish](https://klipcode.com/es): Spanish product page. + +## Technical references + +- [Project README](https://raw.githubusercontent.com/martinezharo/klipcode/main/README.md): Current features, local-first and cloud-sync behavior, development, and deployment. +- [Source code](https://github.com/martinezharo/klipcode): Canonical source repository. +- [Sitemap](https://klipcode.com/sitemap.xml): Public, indexable product pages. + +## Optional + +- [License](https://raw.githubusercontent.com/martinezharo/klipcode/main/LICENSE): MIT License terms for the source code. diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx index f1df87e..e124c14 100644 --- a/src/app/[locale]/layout.tsx +++ b/src/app/[locale]/layout.tsx @@ -38,6 +38,9 @@ export default async function LocaleLayout({ suppressHydrationWarning className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`} > + + + {/* Applies the stored theme before the body paints to avoid a flash of the wrong surface. Mirrors readTheme()/applyTheme() in lib/theme.ts. */} diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx index 9c17539..efb5dfb 100644 --- a/src/app/[locale]/page.tsx +++ b/src/app/[locale]/page.tsx @@ -30,6 +30,7 @@ export async function generateMetadata({ locale: loc, title: dict.meta.home.title, description: dict.meta.home.description, + markdownAlternate: loc === "en" ? "/index.md" : undefined, }); } diff --git a/src/app/robots.ts b/src/app/robots.ts index e9102da..351c039 100644 --- a/src/app/robots.ts +++ b/src/app/robots.ts @@ -4,7 +4,11 @@ const siteUrl = process.env.NEXT_PUBLIC_SITE_URL ?? "https://klipcode.com"; export default function robots(): MetadataRoute.Robots { return { - rules: { userAgent: "*", allow: "/" }, + rules: { + userAgent: "*", + allow: "/", + disallow: ["/api/", "/app", "/es/app"], + }, sitemap: `${siteUrl}/sitemap.xml`, }; } diff --git a/src/app/sitemap.ts b/src/app/sitemap.ts index 0c0ea9e..c8b7adc 100644 --- a/src/app/sitemap.ts +++ b/src/app/sitemap.ts @@ -33,19 +33,5 @@ export default function sitemap(): MetadataRoute.Sitemap { priority: 1, alternates: { languages: languages("") }, }, - { - url: url(localeHref("en", "/app")), - lastModified: LAST_UPDATED, - changeFrequency: "weekly", - priority: 0.8, - alternates: { languages: languages("/app") }, - }, - { - url: url(localeHref("es", "/app")), - lastModified: LAST_UPDATED, - changeFrequency: "weekly", - priority: 0.8, - alternates: { languages: languages("/app") }, - }, ]; } diff --git a/src/lib/seo.ts b/src/lib/seo.ts index 7c27fb6..8333400 100644 --- a/src/lib/seo.ts +++ b/src/lib/seo.ts @@ -13,11 +13,13 @@ export function buildPageMetadata({ path = "", title, description, + markdownAlternate, }: { locale: Locale; path?: string; title: string; description: string; + markdownAlternate?: string; }): Metadata { const canonical = `${siteUrl}${localeHref(locale, path)}`; const socialImage = `${siteUrl}/og-image.png`; @@ -36,6 +38,9 @@ export function buildPageMetadata({ es: `${siteUrl}${localeHref("es", path)}`, "x-default": `${siteUrl}${localeHref("en", path)}`, }, + ...(markdownAlternate + ? { types: { "text/markdown": `${siteUrl}${markdownAlternate}` } } + : {}), }, openGraph: { type: "website",