mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +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());
|
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
|
// The HTML for the index page
|
||||||
let mut index_buf = String::new();
|
let mut index_buf = String::new();
|
||||||
|
|
||||||
push_html(
|
push_html(
|
||||||
&mut index_buf,
|
&mut index_buf,
|
||||||
"div",
|
"a",
|
||||||
[("class", "module-header-container")],
|
[
|
||||||
&header,
|
("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(
|
push_html(
|
||||||
|
|
|
@ -714,19 +714,8 @@ pre>samp {
|
||||||
line-height: 1.3em;
|
line-height: 1.3em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-header-container {
|
.ai-docs-link {
|
||||||
display: flex;
|
margin-bottom: 10px;
|
||||||
justify-content: space-between;
|
|
||||||
align-items: flex-end;
|
|
||||||
margin-bottom: 48px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.llm-prompt-link {
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.module-name {
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
@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>
|
<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>
|
</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}
|
## [REPL](#repl) {#repl}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue