mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +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) {
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
<p>Roc doesn’t have a numbered release or an installer yet, but you can follow the install instructions for your OS<a href="/install/getting_started.html#installation"> here </a>. If you get stuck, friendly people will be happy to help if you open a topic in<a href="https://roc.zulipchat.com/#narrow/stream/231634-beginners"> #beginners </a>on<a href="https://roc.zulipchat.com/"> Roc Zulip Chat </a>and ask for assistance!</p>
|
||||
</section>
|
||||
|
||||
## [LLM Docs](#llm-docs) {#llm-docs}
|
||||
## [AI Docs](#ai-docs) {#ai-docs}
|
||||
|
||||
We have experimental LLM-friendly text files for our [tutorial](/llms.txt) and [standard library](/builtins/llms.txt) that you can use to prompt your favorite LLM to answer your questions about Roc!
|
||||
We have experimental AI-friendly text files for our [tutorial](/llms.txt) and [standard library](/builtins/llms.txt) that you can use to prompt your favorite large language model to answer your questions about Roc!
|
||||
|
||||
## [REPL](#repl) {#repl}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue