[READ-ONLY] Mirror of https://github.com/flo-bit/dogumentation. Simple, minimalistic documentation template using astro flo-bit.dev/dogumentation/
0

Configure Feed

Select the types of activity you want to include in your feed.

fix deployment, warnings

Florian (Feb 23, 2025, 3:58 PM +0100) 73bcc7d0 62b8b34f

+13 -33
+4
pagefind.json
··· 1 + { 2 + "site": "dist", 3 + "vite_plugin_pagefind": {} 4 + }
+5 -3
src/components/sandbox/Sandbox.astro
··· 8 8 : `/src/examples/${folder}`; 9 9 10 10 // import as raw 11 - const files = import.meta.glob(`/src/examples/**`, { as: "raw" }); 11 + const files = import.meta.glob(`/src/examples/**`, { 12 + query: "?raw", 13 + import: "default", 14 + }); 12 15 13 16 let loadedFiles: Record<string, { code: string; active: boolean }> = {}; 14 17 15 18 for (const file of Object.keys(files)) { 16 19 if (!file.startsWith(actualFolder)) continue; 17 - console.log(file, active); 18 20 loadedFiles[file.replace(actualFolder, "")] = { 19 - code: await files[file](), 21 + code: (await files[file]()) as string, 20 22 active: file.endsWith(active), 21 23 }; 22 24 }
-6
src/components/sandbox/SandpackCodeEditor.tsx
··· 20 20 const [stylingFile, setStylingFile] = useState<string | null>(); 21 21 22 22 useEffect(() => { 23 - console.log("stylingFile", stylingFile); 24 - }, [stylingFile]); 25 - 26 - useEffect(() => { 27 23 // Initial theme check 28 24 const dark = document.documentElement.classList.contains("dark"); 29 - console.log("dark", dark); 30 25 setIsDark(dark); 31 26 setStylingFile(getStyling(dark)); 32 27 33 28 // Listen for theme changes 34 29 const handleThemeChange = (e: CustomEvent<{ darkMode: boolean }>) => { 35 - console.log("handleThemeChange", e.detail.darkMode); 36 30 setIsDark(e.detail.darkMode); 37 31 setStylingFile(getStyling(e.detail.darkMode)); 38 32 };
+2 -21
src/embeds/github/Github.astro
··· 1 1 --- 2 - import { load } from "cheerio"; 3 - 4 2 interface Props { 5 3 href: string; 6 4 src: string; ··· 10 8 class?: string; 11 9 } 12 10 13 - const { 14 - href, 15 - src, 16 - alt, 17 - class: className, 18 - target = "_blank", 19 - props, 20 - } = Astro.props; 11 + const { href, src, class: className, target = "_blank", props } = Astro.props; 21 12 22 - console.log(href, src); 13 + const url = href || src; 23 14 24 - const url = href || src; 25 - // get repo name from href 26 - // https://github.com/vitest-dev/vitest 27 - // get repo name and owner from href starting from beginning of href 28 15 const split = url.split("github.com/"); 29 16 const repoName = split[1].split("/")[1]; 30 17 const owner = split[1].split("/")[0]; 31 - console.log(repoName, owner); 32 18 const response = await fetch( 33 19 `https://api.github.com/repos/${owner}/${repoName}` 34 20 ); 35 21 const data = await response.json(); 36 22 37 - console.log(data); 38 - 39 23 const description = data.description; 40 - const stars = data.stargazers_count; 41 - const forks = data.forks_count; 42 - 43 24 const avatarUrl = data.owner?.avatar_url; 44 25 --- 45 26
-1
src/layouts/DocumentationLayout.astro
··· 1 1 --- 2 - import BaseHead from "../components/BaseHead.astro"; 3 2 import Sidebar from "../components/Sidebar.astro"; 4 3 import Header from "../components/Header.astro"; 5 4 import CommandPalette from "../components/search/CommandPalette.svelte";
+1 -1
src/pages/llm.txt.ts
··· 1 1 import type { APIRoute } from "astro"; 2 2 import config from "src/config"; 3 - import { getSortedDocs, getDocs } from "src/utils"; 3 + import { getDocs } from "src/utils"; 4 4 5 5 const docs = await getDocs(); 6 6
+1 -1
src/utils.ts
··· 47 47 48 48 export const getNextAndPreviousDocs = async (doc: any) => { 49 49 const docs = await getSortedDocs(); 50 - console.log(docs.map((d) => d.id)); 50 + 51 51 const index = docs.findIndex((d) => d.id === doc.id); 52 52 return { 53 53 previous: index > 0 ? docs[index - 1] : null,