π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Prune docs tooling comments
Manav Rathie610eb7cf601
diff --git a/docs/.gitignore b/docs/.gitignoreindex 3026e9d994..fce5a6dc72 100644--- a/docs/.gitignore+++ b/docs/.gitignore@@ -1,4 +1,2 @@-# VitePress dev server cache/docs/.vitepress/cache/-# VitePress production build/docs/.vitepress/dist/diff --git a/docs/docs/.vitepress/config.ts b/docs/docs/.vitepress/config.tsindex 9e85062904..b1447de2d5 100644--- a/docs/docs/.vitepress/config.ts+++ b/docs/docs/.vitepress/config.ts@@ -3,12 +3,10 @@ import { sidebar } from "./sidebar";const docsBaseUrl = "https://ente.com/help";-// Pages with noindex in frontmatter, collected during build to exclude from sitemapconst noindexPages = new Set<string>();-// https://vitepress.dev/reference/site-configexport default defineConfig({- base: "/help/", // Serve under /help path+ base: "/help/",title: "Ente Help",description: "Documentation and help for Ente's products",head: [@@ -19,8 +17,6 @@ export default defineConfig({sitemap: {hostname: `${docsBaseUrl}/`,transformItems: (items) => {- // Remove trailing slashes for consistency (cleanUrls is enabled)- // and deduplicate URLsconst seen = new Set();return items.map((item) => ({@@ -41,7 +37,6 @@ export default defineConfig({},},transformPageData(pageData) {- // Track noindex pages for sitemap exclusionconst head = pageData.frontmatter.head;if (Array.isArray(head)) {for (const tag of head) {@@ -60,7 +55,6 @@ export default defineConfig({}}- // Add canonical URL to all pagesconst canonicalUrl = `${docsBaseUrl}/${pageData.relativePath}`.replace(/index\.md$/, "").replace(/\.md$/, "");@@ -75,12 +69,10 @@ export default defineConfig({const description =pageData.frontmatter.description ||"Documentation and help for Ente's products";- const ogImage = `${docsBaseUrl}/og-image.png`; // You can customize this per page if needed+ const ogImage = `${docsBaseUrl}/og-image.png`;- // Canonical URLhead.push(["link", { rel: "canonical", href: canonicalUrl }]);- // Open Graph tagshead.push(["meta", { property: "og:type", content: "website" }]);head.push(["meta", { property: "og:title", content: title }]);head.push([@@ -91,7 +83,6 @@ export default defineConfig({head.push(["meta", { property: "og:image", content: ogImage }]);head.push(["meta", { property: "og:site_name", content: "Ente Help" }]);- // Twitter Card tagshead.push(["meta",{ name: "twitter:card", content: "summary_large_image" },@@ -104,10 +95,8 @@ export default defineConfig({]);head.push(["meta", { name: "twitter:image", content: ogImage }]);- // Meta descriptionhead.push(["meta", { name: "description", content: description }]);- // Add FAQ Schema markup for FAQ pagesif (pageData.relativePath.includes("/faq/") &&pageData.relativePath !== "photos/faq/index.md"@@ -122,7 +111,6 @@ export default defineConfig({}}- // Add BreadcrumbList schema for better navigationconst breadcrumbSchema = generateBreadcrumbSchema(pageData);if (breadcrumbSchema) {head.push([@@ -135,10 +123,6 @@ export default defineConfig({return head;},themeConfig: {- // We use the default theme (with some CSS color overrides). This- // themeConfig block can be used to further customize the default theme.- //- // https://vitepress.dev/reference/default-theme-configlogo: "/logo.png",externalLinkIcon: true,editLink: {@@ -162,20 +146,17 @@ export default defineConfig({},});-// Generate FAQ Schema for FAQ pagesasync function generateFAQSchema(pageData: any) {try {const { readFile } = await import("fs/promises");const { join } = await import("path");- // Read the actual markdown fileconst filePath = join(process.cwd(), "docs", pageData.relativePath);const content = await readFile(filePath, "utf-8");const questions: any[] = [];- // Match headings with IDs (format: ### Question {#id})- // Updated regex to better match the content structure+ // FAQ entries use ### Question {#id} headings.const questionRegex =/###\s+(.+?)\s+\{#[^}]+\}\s*\n+([\s\S]*?)(?=\n###\s|\n##\s|$)/g;let match;@@ -184,21 +165,19 @@ async function generateFAQSchema(pageData: any) {const question = match[1].trim();let answer = match[2].trim()- // Remove markdown formatting- .replace(/\*\*([^*]+)\*\*/g, "$1") // Bold- .replace(/\[([^\]]+)\]\([^)]+\)/g, "$1") // Links- .replace(/`([^`]+)`/g, "$1") // Inline code+ .replace(/\*\*([^*]+)\*\*/g, "$1")+ .replace(/\[([^\]]+)\]\([^)]+\)/g, "$1")+ .replace(/`([^`]+)`/g, "$1").replace(/^\s*>\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*$/gim,"",- ) // GitHub alert labels- .replace(/^\s*>\s?/gm, "") // Blockquotes- .replace(/^[-*]\s+/gm, "") // List items- .replace(/\n+/g, " ") // Newlines to spaces- .replace(/\s+/g, " ") // Multiple spaces to single+ )+ .replace(/^\s*>\s?/gm, "")+ .replace(/^[-*]\s+/gm, "")+ .replace(/\n+/g, " ")+ .replace(/\s+/g, " ").trim();- // Limit answer length but try to end at a sentenceif (answer.length > 500) {answer = answer.substring(0, 500);const lastPeriod = answer.lastIndexOf(".");@@ -237,7 +216,6 @@ async function generateFAQSchema(pageData: any) {}}-// Generate Breadcrumb Schemafunction generateBreadcrumbSchema(pageData: any) {const path = pageData.relativePath.replace(/\.md$/, "")diff --git a/docs/docs/.vitepress/sidebar.ts b/docs/docs/.vitepress/sidebar.tsindex 23045f98a4..23d0064e51 100644--- a/docs/docs/.vitepress/sidebar.ts+++ b/docs/docs/.vitepress/sidebar.ts@@ -1,5 +1,4 @@-// When adding new pages, they need to be manually inserted into their-// appropriate place here.+// Add new pages to this sidebar manually.export const sidebar = [{diff --git a/docs/docs/.vitepress/theme/custom.css b/docs/docs/.vitepress/theme/custom.cssindex 94725e4abb..cfadcf6bd9 100644--- a/docs/docs/.vitepress/theme/custom.css+++ b/docs/docs/.vitepress/theme/custom.css@@ -18,7 +18,6 @@--docsearch-hit-active-color: #191919;}-/* Increase H3 spacing for better readability, especially in FAQ pages */.vp-doc h3 {margin-top: 48px;}