mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 15:03:46 +00:00
llm docs improvements (#7726)
This commit is contained in:
parent
7e6d846ff6
commit
dd11c2cf9c
3 changed files with 18 additions and 42 deletions
|
@ -246,38 +246,25 @@ fn render_package_index(docs_by_module: &[(ModuleId, ModuleDocumentation)]) -> S
|
|||
push_html(&mut module_list_buf, "li", [], link_buf.as_str());
|
||||
}
|
||||
|
||||
let header = {
|
||||
let mut header_buf = String::new();
|
||||
|
||||
push_html(
|
||||
&mut header_buf,
|
||||
"h2",
|
||||
[("class", "module-name")],
|
||||
"Exposed Modules",
|
||||
);
|
||||
|
||||
push_html(
|
||||
&mut header_buf,
|
||||
"a",
|
||||
[
|
||||
("class", "llm-prompt-link"),
|
||||
("title", "Documentation in a LLM-friendly format"),
|
||||
("href", "llms.txt"),
|
||||
],
|
||||
"LLM docs",
|
||||
);
|
||||
|
||||
header_buf
|
||||
};
|
||||
|
||||
// The HTML for the index page
|
||||
let mut index_buf = String::new();
|
||||
|
||||
push_html(
|
||||
&mut index_buf,
|
||||
"div",
|
||||
[("class", "module-header-container")],
|
||||
&header,
|
||||
"a",
|
||||
[
|
||||
("class", "ai-docs-link"),
|
||||
("title", "Documentation in an AI-friendly format"),
|
||||
("href", "llms.txt"),
|
||||
],
|
||||
"<span style=\"vertical-align: 2px;\">🤖</span> AI docs",
|
||||
);
|
||||
|
||||
push_html(
|
||||
&mut index_buf,
|
||||
"h2",
|
||||
[("class", "module-name")],
|
||||
"Exposed Modules",
|
||||
);
|
||||
|
||||
push_html(
|
||||
|
|
|
@ -714,19 +714,8 @@ pre>samp {
|
|||
line-height: 1.3em;
|
||||
}
|
||||
|
||||
.module-header-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
margin-bottom: 48px;
|
||||
}
|
||||
|
||||
.llm-prompt-link {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.module-name {
|
||||
flex-grow: 1;
|
||||
.ai-docs-link {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue