Skip to content

Commit 0357984

Browse files
Merge pull request #1 from Rareloop/feature/llms-txt-plugin
Implement llms.txt plugin for Docusaurus docs
2 parents badc5bb + 9e0ce48 commit 0357984

4 files changed

Lines changed: 496 additions & 0 deletions

File tree

GEMINI.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Project Overview
2+
3+
This repository contains the source code for the documentation website for **Lumberjack**, a framework designed to "Supercharge your WordPress Development". The site is built using **Docusaurus**, a modern static website generator based on React.
4+
5+
The project is configured with TypeScript and includes a versioning system to manage documentation for multiple releases of the Lumberjack framework.
6+
7+
## Key Technologies
8+
9+
- **Docusaurus:** Static site generator.
10+
- **React:** UI framework.
11+
- **TypeScript:** For type safety.
12+
- **Markdown (MDX):** For writing documentation content.
13+
- **GitHub Actions:** For CI/CD.
14+
- **Algolia:** For search functionality.
15+
16+
---
17+
18+
# Development Workflow
19+
20+
## Initial Setup
21+
22+
To get started, clone the repository and install the dependencies using npm.
23+
24+
```bash
25+
npm install
26+
```
27+
28+
## Running the Development Server
29+
30+
To preview your changes as you edit the files, you can run the local development server.
31+
32+
```bash
33+
npm start
34+
```
35+
36+
This command starts a local development server (usually on `http://localhost:3000`) and opens up a browser window. Most changes are reflected live without having to restart the server.
37+
38+
## Building the Site
39+
40+
To generate a static production build of the website, run the following command.
41+
42+
```bash
43+
npm run build
44+
```
45+
46+
This command generates static content into the `build/` directory.
47+
48+
## Linting and Type-Checking
49+
50+
The project uses ESLint for linting and TypeScript for type-checking. The CI pipeline runs these checks on every pull request.
51+
52+
```bash
53+
# Run the linter
54+
npm run lint
55+
56+
# Check for TypeScript errors
57+
npm run typecheck
58+
```
59+
60+
---
61+
62+
# Content and Versioning
63+
64+
## Content Directory
65+
66+
All documentation content is written in Markdown (`.md` or `.mdx`) and is located in the following directories:
67+
68+
- **`docs/`**: Contains the documentation for the _next_ or _unreleased_ version of Lumberjack.
69+
- **`versioned_docs/`**: Contains snapshots of the documentation for previous, tagged versions of Lumberjack (e.g., `version-v8`, `version-v7`).
70+
71+
## Sidebars
72+
73+
The navigation structure for the documentation is defined in these files:
74+
75+
- **`sidebars.ts`**: Defines the sidebar for the _next_ version.
76+
- **`versioned_sidebars/`**: Contains the sidebar configurations for each versioned documentation.
77+
78+
## Docusaurus Commands for Versioning and Maintenance
79+
80+
For Docusaurus-specific commands, we generally use the `npm run docusaurus` prefix.
81+
82+
To create a new version of the documentation (e.g., when a new version of Lumberjack is released), use the following Docusaurus command:
83+
84+
```bash
85+
npm run docusaurus docs:version <version_name>
86+
```
87+
88+
This will create a new versioned copy of the `docs/` and `sidebars.ts` files, making them specific to the new version.
89+
90+
Other useful `docusaurus` commands include:
91+
92+
- `npm run docusaurus deploy`: Deploys the site.
93+
- `npm run docusaurus clear`: Clears the build cache.
94+
- `npm run docusaurus serve`: Serves the built static site.
95+
- `npm run docusaurus write-translations`: Extracts text for internationalization.
96+
- `npm run docusaurus write-heading-ids`: Generates heading IDs for Markdown files.
97+
- `npm run docusaurus swizzle`: Ejects and customizes Docusaurus components.
98+
99+
---
100+
101+
# Deployment
102+
103+
The website is automatically deployed to GitHub Pages via a GitHub Actions workflow defined in `.github/workflows/main.yml`.
104+
105+
The workflow is triggered on every push to the `main` branch. It performs the following steps:
106+
107+
1. **Lint:** Runs `npm run lint` to check for code style issues.
108+
2. **Build:** Runs `npm run typecheck` and `npm run build` to ensure the project builds successfully.
109+
3. **Deploy:** Deploys the contents of the `build` directory to the `gh-pages` branch.
110+
4. **Algolia Crawl:** Triggers a new crawl in Algolia to update the search index with the latest content.

docusaurus.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ const config: Config = {
3535
locales: ["en"],
3636
},
3737

38+
plugins: ["@signalwire/docusaurus-plugin-llms-txt"],
39+
3840
presets: [
3941
[
4042
"classic",

0 commit comments

Comments
 (0)