Skip to content

Commit

Permalink
docs: init docs
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Feb 19, 2025
1 parent 5efdd46 commit c57c13f
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 49 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Changelog

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Nuxt Project

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
125 changes: 76 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,101 @@
<!--
Get your module up and running quickly.
Find and replace all on all files (CMD+SHIFT+F):
- Name: My Module
- Package name: my-module
- Description: My new Nuxt module
-->

# Nuxt LLMs

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]

My new Nuxt module for doing amazing things.
Nuxt LLMs generates [`llms.txt` markdown documentation](https://llmstxt.org/) for your Nuxt application. It provides runtime hooks to gather the content from your application and generate documentation in a text format.

- [&nbsp;Release Notes](/CHANGELOG.md)
<!-- - [🏀 Online playground](https://stackblitz.com/github/your-org/my-module?file=playground%2Fapp.vue) -->
<!-- - [📖 &nbsp;Documentation](https://example.com) -->

## Features

<!-- Highlight some of the features your module provide here -->
-&nbsp;Foo
- 🚠 &nbsp;Bar
- 🌲 &nbsp;Baz
- [**Nuxt 3**](https://nuxt.com) support
- Generate `llms.txt` and `llms_full.txt` documentation
- Customizable documentation sections

## Quick Setup

Install the module to your Nuxt application with one command:
Install module

```bash
npx nuxi module add my-module
npm i nuxt-llms
```

Then, add nuxt-llms to the modules section of your nuxt.config.ts

```ts
export default defineNuxtConfig({
modules: ['nuxt-llms']
})
```

Add application domain and provide information about the application

```ts
export default defineNuxtConfig({
modules: ['nuxt-llms'],
llms: {
domain: 'https://example.com',
title: 'My Application',
description: 'My Application Description',
sections: [
{
title: 'Section 1',
description: 'Section 1 Description',
links: [
{
title: 'Link 1',
description: 'Link 1 Description',
href: '/link-1',
},
{
title: 'Link 2',
description: 'Link 2 Description',
href: '/link-2',
},
],
},
],
},
})
```

That's it! You can now use My Module in your Nuxt app ✨


## Contribution

<details>
<summary>Local development</summary>

```bash
# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release
```

</details>
That's it! You can visit `/llms.txt` to see the generated documentation ✨

## Options

- `domain`(required): The domain of the application
- `title`: The title of the application, will be displayed at the top of the documentation
- `description`: The description of the application, will be displayed at the top of the documentation right after the title
- `sections`: The sections of the documentation.
Section are consisted of a title, one or more paragraphs of description and possibly a list of links.
Each section is an object with the following properties:
- `title`(required): The title of the section
- `description`: The description of the section
- `links`: The links of the section
- `title`(required): The title of the link
- `description`: The description of the link
- `href`(required): The href of the link
- `notes`: The notes of the documentation. Notes are a special section which always appears at the end of the documentation. Notes are usefull to add any information about the application or documentation itself.

## 💻 Development

- Clone repository
- Install dependencies using `pnpm install`
- Prepare using `pnpm dev:prepare`
- Build using `pnpm prepack`
- Try playground using `pnpm dev`
- Test using `pnpm test`

## License

[MIT License](LICENSE)

Copyright (c) NuxtLabs

<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=020420&colorB=00DC82
Expand Down

0 comments on commit c57c13f

Please sign in to comment.