Skip to content

Commit

Permalink
feat(docs): add llms.md (#1023)
Browse files Browse the repository at this point in the history
Co-authored-by: Adrian Hesketh <adrianhesketh@hushmail.com>
  • Loading branch information
joerdav and a-h authored Dec 24, 2024
1 parent c36a9e1 commit 1d87e1a
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 8 deletions.
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

0 comments on commit 1d87e1a

Please sign in to comment.