Repository navigation
Expand file tree
/
Copy pathllms-txt.config.mjs
More file actions
86 lines (83 loc) · 3.11 KB
/
Copy pathllms-txt.config.mjs
File metadata and controls
86 lines (83 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import { readFileSync } from 'node:fs';
import { fileURLToPath } from 'node:url';
const sections = [
'start',
'concept',
'security',
'develop',
'distribute',
'learn',
'plugin',
'about',
];
const referenceDescription =
'Auto-generated reference documentation for the JavaScript API, configuration schema, command line interface, and the permission system (ACL)';
function sectionDescription(section) {
const indexFile = fileURLToPath(
new URL(`./src/content/docs/${section}/index.mdx`, import.meta.url)
);
const frontmatter = readFileSync(indexFile, 'utf-8').match(/^---\r?\n([\s\S]*?)\r?\n---/)?.[1];
const description = frontmatter
?.match(/^description:\s*(.+?)\s*$/m)?.[1]
.replace(/^(['"])(.*)\1$/, '$2');
if (!description) {
throw Error(
`Missing or unparseable description frontmatter in ${section}/index.mdx (used to describe the section in llms.txt)`
);
}
return description;
}
export default {
projectName: 'Tauri',
description:
'Tauri is a framework for building tiny, fast binaries for all major desktop and mobile platforms. Developers can integrate any frontend framework that compiles to HTML, JavaScript, and CSS for building their user experience while leveraging languages such as Rust, Swift, and Kotlin for backend logic when needed.',
details: `
The documentation is organized into key sections:
${sections.map((section) => `- **${section}**: ${sectionDescription(section)}`).join('\n')}
- **reference**: ${referenceDescription}`,
customSets: [
{
label: 'Guides',
description:
'guides, concepts, and tutorials for developing and distributing Tauri applications',
paths: sections.map((section) => `${section}{,/**}`),
},
{
label: 'Reference',
description:
'reference documentation for the JavaScript API, configuration schema, command line interface, and the permission system (ACL)',
paths: ['reference{,/**}'],
},
],
optionalLinks: [
{
label: 'Tauri GitHub repository',
url: 'https://github.com/tauri-apps/tauri',
description: 'source code and issue tracker for the Tauri framework',
},
{
label: 'Awesome Tauri',
url: 'https://github.com/tauri-apps/awesome-tauri',
description: 'list of community plugins, templates, and resources',
},
],
// sort the getting-started content to the top of llms-full.txt and llms-small.txt
promote: ['index*', 'start{,/**}'],
// `exclude` only applies to llms-small.txt; `demote` sorts to the end of llms-full.txt
exclude: ['release/**', 'blog/**', 'contribute/**', '_fragments/**', '_it/**'],
demote: ['release/**', 'blog/**', '_fragments/**', '_it/**'],
customSelectors: {
all: [
// "Section titled …" heading anchor links
'.sl-anchor-link',
// homepage sponsor logo grid
'.sponsors',
// astro-d2 diagram images (render as broken image paths)
'img[src^="/d2/"]',
// features/community search and platform filter UI on the plugin page
'.pagefind-ui',
],
},
// keep `:::note` asides in llms-small.txt (tips are still stripped)
minify: { note: false },
};