Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(docs): add llms.md #1023

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

/static/llms.md
4 changes: 0 additions & 4 deletions docs/docs/09-commands-and-tools/_category_.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Command-line tools
# CLI

`templ` provides a command line interface. Most users will only need to run the `templ generate` command to generate Go code from `*.templ` files.

Expand Down
13 changes: 13 additions & 0 deletions docs/docs/09-developer-tools/05-llm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Coding assistants / LLMs

To provide AI coding assistants such as Github Copilot, Cursor or similar with help on how to write templ code, the templ project maintains a single file containing documentation for LLMs to read.

You can find the file at `https://templ.guide/llms.md`.

## LLM tools

### https://github.com/CopilotC-Nvim/CopilotChat.nvim

CopilotChat is a plugin for Neovim that provides a chat interface for Github Copilot. It allows you to ask Copilot questions and get responses in real-time.

Use the URL feature to load `https://templ.guide/llms.md`.
4 changes: 4 additions & 0 deletions docs/docs/09-developer-tools/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"position": 9,
"label": "Developer tools"
}
7 changes: 4 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"start": "npm run generate-llms-md && docusaurus start",
"build": "npm run generate-llms-md && docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids"
"write-heading-ids": "docusaurus write-heading-ids",
"generate-llms-md": "find docs | grep '.*md$' | xargs cat > ./static/llms.md"
},
"dependencies": {
"@docusaurus/core": "^3.5.2",
Expand Down
Loading