Skip to content

Commit 37ba483

Browse files
committed
Sidebar & misc .md link updates
Updates to reflect changes in directory names (generate-docs.js and astro.config.mjs) while being mindful of astro component names (SLuaEvents.astro, etc). Ideally, publicly visible labels should show Lua, even if backend functions currently retain the older names. Also updated CLAUDE.md, taxonomy.md & CONTRIBUTING.md for SLua terms & links.
1 parent 20e8416 commit 37ba483

5 files changed

Lines changed: 61 additions & 61 deletions

File tree

‎CLAUDE.md‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ All commands use pnpm:
1515
- `pnpm build` - Build production site to ./dist/
1616
- `pnpm preview` - Preview production build locally
1717
- `pnpm astro check` - Run TypeScript type checking
18-
- `pnpm generate:docs` - Generate all reference pages (functions, events, and constants) for both LSL and SLua from src/definitions/lsl_definitions.yaml
18+
- `pnpm generate:docs` - Generate all reference pages (functions, events, and constants) for both LSL and Lua from src/definitions/lsl_definitions.yaml
1919

2020
## Architecture
2121

@@ -30,8 +30,8 @@ Documentation lives in `src/content/docs/` with two main areas:
3030
**script/** - Scripting documentation (primary focus: LSL portal)
3131
- `script/guides/` - Scripting guides
3232
- `script/lsl-reference/` - LSL language reference
33-
- `script/slua-reference/` - SLua reference
34-
- `script/learn-slua/` - SLua learning materials
33+
- `script/lua-reference/` - Lua reference
34+
- `script/learn-lua/` - Lua learning materials
3535

3636
Files are `.md` or `.mdx` format. Routes auto-generate from file paths (e.g., `docs/script/lsl-reference/example.md` → `/script/lsl-reference/example/`).
3737

@@ -71,13 +71,13 @@ All documentation should use a balanced and pragmatic tone that:
7171
- Use "you" to address the reader directly
7272
- Be clear and precise without being overly formal
7373
- Explain the "why" behind concepts, not just the "what"
74-
- Anticipate common confusion points (especially for LSL-to-SLua migration)
74+
- Anticipate common confusion points (especially for LSL-to-Lua migration)
7575
- Use code examples to illustrate concepts
7676
- Avoid excessive enthusiasm or marketing language
7777
- Don't oversimplify or condescend to the reader
7878

7979
**Example of preferred tone:**
80-
> "Tables are SLua's most powerful data structure. Unlike LSL's separate `list` type, tables serve two purposes: they work as both arrays (like LSL lists) and dictionaries/maps (which LSL doesn't have)."
80+
> "Tables are Lua's most powerful data structure. Unlike LSL's separate `list` type, tables serve two purposes: they work as both arrays (like LSL lists) and dictionaries/maps (which LSL doesn't have)."
8181
8282
## Adding Documentation
8383

@@ -104,7 +104,7 @@ All documentation should use a balanced and pragmatic tone that:
104104

105105
The repository includes reference materials in the `context/` directory (gitignored):
106106

107-
**context/lsl_definitions.yaml** - Comprehensive language definitions for both LSL and SLua, including:
107+
**context/lsl_definitions.yaml** - Comprehensive language definitions for both LSL and Lua, including:
108108
- Constants with types, values, and tooltips
109109
- Functions with signatures, parameters, return types, and descriptions
110110
- Events and their parameters
@@ -117,22 +117,22 @@ The repository includes reference materials in the `context/` directory (gitigno
117117
- `flow-control/` - Control flow documentation
118118
- `lsl-portal/` - General LSL portal pages, tutorials, protocols, examples
119119

120-
**context/slua-guide/** - Suzanna's SLua Guide (https://suzanna-linn.github.io/slua/):
121-
- Comprehensive educational resource for the SLua language
120+
**context/lua-guide/** - Suzanna's SLua Guide (https://suzanna-linn.github.io/slua/):
121+
- Comprehensive educational resource for the Lua language
122122
- Jekyll-based documentation with markdown files in `docs/` directory
123123
- Content includes:
124124
- Language fundamentals: `language1.md`, `language2.md`
125125
- Migration guides for LSL scripters: `moving-*.md` files covering datatypes, events, functions, operators, lists, strings, control flow, and libraries
126126
- Practical examples: `scripts-*.md` files with working examples (coroutines, enums, floating texts, sets, web integration)
127127
- Reference materials: `classes.md`, `transpiler.md`, `beta.md`, `future.md`, `history.md`
128128
- Licensed under Creative Commons Attribution 4.0 (text) and MIT License (code examples)
129-
- Use as reference for SLua language documentation and migration patterns
129+
- Use as reference for Lua language documentation and migration patterns
130130

131131
**context/taxonomy.md** - Proposed site architecture and content taxonomy:
132132
- Scripting portal structure with sections for Getting Started, Features, Guides, and Recipes
133-
- Planned organization for SLua/LSL language documentation
133+
- Planned organization for Lua/LSL language documentation
134134
- Standard library/reference organization patterns
135-
- Site-wide SLua/LSL toggle considerations
135+
- Site-wide Lua/LSL toggle considerations
136136

137137
These files are reference materials for building the new documentation. They should be transformed into clean, modern Markdown/MDX format in `src/content/docs/`.
138138

@@ -153,20 +153,20 @@ When building documentation, use `context/lsl_definitions.yaml` as the authorita
153153

154154
## Reference Page Generation
155155

156-
The project includes an automated generator for creating LSL and SLua reference pages for functions, events, and constants:
156+
The project includes an automated generator for creating LSL and Lua reference pages for functions, events, and constants:
157157

158158
**Generator Script:** `scripts/generate-docs.js`
159159
- Parses `src/definitions/lsl_definitions.yaml` to extract definitions
160-
- Supports both LSL and SLua/Luau generation
161-
- Creates MDX pages with appropriate components (LSLFunction/SLuaFunction, LSLEvent/SLuaEvent, LSLConstant/SLuaConstant)
160+
- Supports both LSL and Lua/Luau generation
161+
- Creates MDX pages with appropriate components (LSLFunction/LuaFunction, LSLEvent/LuaEvent, LSLConstant/LuaConstant)
162162
- Run with: `pnpm generate:docs`
163163
- Generates pages in:
164164
- LSL functions: `src/content/docs/script/lsl-reference/functions/`
165-
- SLua functions: `src/content/docs/script/slua-reference/functions/`
165+
- Lua functions: `src/content/docs/script/lua-reference/functions/`
166166
- LSL events: `src/content/docs/script/lsl-reference/events/`
167-
- SLua events: `src/content/docs/script/slua-reference/events/`
167+
- Lua events: `src/content/docs/script/lua-reference/events/`
168168
- LSL constants: `src/content/docs/script/lsl-reference/constants/`
169-
- SLua constants: `src/content/docs/script/slua-reference/constants/`
169+
- Lua constants: `src/content/docs/script/lua-reference/constants/`
170170

171171
**Custom Content Preservation:**
172172
Generated pages support custom content that persists across regenerations. Any content after the component tag (e.g., `<LSLFunction />`, `<LSLEvent />`, `<LSLConstant />`) and before the optional attribution footer will be preserved when re-running the generator. This allows you to:
@@ -178,7 +178,7 @@ Generated pages support custom content that persists across regenerations. Any c
178178
**Generated Page Structure:**
179179
1. Frontmatter with title and description
180180
2. Component import statements
181-
3. Reference component tag (LSLFunction/SLuaFunction, LSLEvent/SLuaEvent, or LSLConstant/SLuaConstant)
181+
3. Reference component tag (LSLFunction/LuaFunction, LSLEvent/LuaEvent, or LSLConstant/LuaConstant)
182182
4. Custom content marker comment: `{/* DO NOT EDIT ABOVE THIS LINE */}`
183183
5. Custom content section for examples, notes, and related links
184184
6. Optional WikiAttribution footer (for LSL pages)
@@ -188,17 +188,17 @@ Generated pages support custom content that persists across regenerations. Any c
188188
Functions:
189189
- `src/components/FunctionReference.astro` - Base function reference component
190190
- `src/components/LSLFunction.astro` - LSL function wrapper
191-
- `src/components/SLuaFunction.astro` - SLua function wrapper
191+
- `src/components/SLuaFunction.astro` - Lua function wrapper
192192

193193
Events:
194194
- `src/components/EventReference.astro` - Base event reference component
195195
- `src/components/LSLEvent.astro` - LSL event wrapper
196-
- `src/components/SLuaEvent.astro` - SLua event wrapper
196+
- `src/components/SLuaEvent.astro` - Lua event wrapper
197197

198198
Constants:
199199
- `src/components/ConstantReference.astro` - Base constant reference component
200200
- `src/components/LSLConstant.astro` - LSL constant wrapper
201-
- `src/components/SLuaConstant.astro` - SLua constant wrapper
201+
- `src/components/SLuaConstant.astro` - Lua constant wrapper
202202

203203
These components dynamically load data from `src/definitions/lsl_definitions.yaml` at build time, requiring only the name as a prop. All metadata (signatures, parameters, types, values, energy costs, sleep times, badges) is loaded from the YAML file.
204204

‎CONTRIBUTING.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ Visit http://localhost:4321 to see your changes.
4444
The project auto-generates function and event reference pages from LSL definitions:
4545

4646
```bash
47-
# Fetch latest LSL/SLua definitions from GitHub
47+
# Fetch latest LSL/Lua definitions from GitHub
4848
pnpm fetch:definitions
4949

50-
# Generate all documentation (LSL + SLua functions and events)
50+
# Generate all documentation (LSL + Lua functions and events)
5151
pnpm generate:docs
5252
```
5353

@@ -58,7 +58,7 @@ pnpm generate:docs
5858
All documentation lives in `src/content/docs/` as Markdown (`.md`) or MDX (`.mdx`) files:
5959

6060
- `script/lsl-reference/` - LSL language reference
61-
- `script/slua-reference/` - SLua language reference
61+
- `script/lua-reference/` - Lua language reference
6262
- `script/guides/` - Scripting tutorials and guides
6363
- `build/` - Building and construction documentation
6464

@@ -73,7 +73,7 @@ Use a **balanced, pragmatic tone**:
7373
- Avoid marketing language or excessive enthusiasm
7474

7575
**Example:**
76-
> "Tables are SLua's most powerful data structure. Unlike LSL's separate `list` type, tables serve two purposes: they work as both arrays (like LSL lists) and dictionaries/maps (which LSL doesn't have)."
76+
> "Tables are Lua's most powerful data structure. Unlike LSL's separate `list` type, tables serve two purposes: they work as both arrays (like LSL lists) and dictionaries/maps (which LSL doesn't have)."
7777
7878
### Adding New Pages
7979

@@ -123,7 +123,7 @@ default {
123123
```
124124
````
125125

126-
### SLua Code Blocks
126+
### Lua Code Blocks
127127

128128
Use `luau` (not `lua`) and **always include type annotations**:
129129

@@ -135,7 +135,7 @@ end)
135135
```
136136
````
137137

138-
See [SLUA_REFERENCE.md](SLUA_REFERENCE.md) for detailed SLua documentation guidelines.
138+
See [LUA_REFERENCE.md](src/content/docs/script/lua-reference/index.mdx) for detailed Lua documentation guidelines.
139139

140140
## Internationalization
141141

@@ -156,7 +156,7 @@ The site supports additional languages. To add translated content:
156156
│ ├── components/ # Astro components
157157
│ ├── content/
158158
│ │ └── docs/ # Documentation content (Markdown/MDX)
159-
│ ├── definitions/ # LSL/SLua language definitions (YAML)
159+
│ ├── definitions/ # LSL/Lua language definitions (YAML)
160160
│ └── styles/ # Custom CSS
161161
├── astro.config.mjs # Astro configuration
162162
└── CLAUDE.md # Detailed project guidance
@@ -173,7 +173,7 @@ This repository uses different licenses for different types of content:
173173
- **Legacy wiki content** (pages with `<WikiAttribution>` component) remains under [CC-BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)
174174

175175
**Code Examples:**
176-
- **All code examples** (LSL, SLua, JavaScript, etc.) must be contributed under [CC0 1.0 (Public Domain)](https://creativecommons.org/publicdomain/zero/1.0/)
176+
- **All code examples** (LSL, Lua, JavaScript, etc.) must be contributed under [CC0 1.0 (Public Domain)](https://creativecommons.org/publicdomain/zero/1.0/)
177177
- This means anyone can use your code examples freely without attribution requirements
178178

179179
### What This Means for Contributors

‎astro.config.mjs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ export default defineConfig({
6868
// autogenerate: { directory: 'script/recipes' },
6969
// },
7070
{
71-
label: 'Learn SLua',
71+
label: 'Learn Lua',
7272
collapsed: true,
73-
autogenerate: { directory: 'script/learn-slua' },
73+
autogenerate: { directory: 'script/learn-lua' },
7474
},
7575
{
7676
label: 'Reference',
@@ -81,9 +81,9 @@ export default defineConfig({
8181
autogenerate: { directory: 'script/lsl-reference' },
8282
},
8383
{
84-
label: 'SLua',
84+
label: 'Lua',
8585
collapsed: true,
86-
autogenerate: { directory: 'script/slua-reference' },
86+
autogenerate: { directory: 'script/lua-reference' },
8787
},
8888
],
8989
},

‎scripts/generate-docs.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env node
22

3-
// Generates documentation pages for LSL/SLua functions, events, and constants
3+
// Generates documentation pages for LSL/Lua functions, events, and constants
44
// based on the lsl_definitions.yaml file located in src/definitions.
55

66
import { readFile } from 'fs/promises';
@@ -81,7 +81,7 @@ async function generateDocs() {
8181
const events = Object.keys(lslDefs.events);
8282
const constants = Object.keys(lslDefs.constants);
8383

84-
// Events that are LSL-specific and should not be included in SLua documentation
84+
// Events that are LSL-specific and should not be included in Lua documentation
8585
const lslOnlyEvents = ['state_entry', 'state_exit'];
8686

8787
for (const funcName of functions) {
@@ -90,25 +90,25 @@ async function generateDocs() {
9090
continue;
9191
}
9292
generateFor(funcName, lslDefs.functions[funcName]?.tooltip, 'LSLFunction', '../src/content/docs/script/lsl-reference/functions');
93-
generateFor(funcName, lslDefs.functions[funcName]?.tooltip, 'SLuaFunction', '../src/content/docs/script/slua-reference/functions');
93+
generateFor(funcName, lslDefs.functions[funcName]?.tooltip, 'SLuaFunction', '../src/content/docs/script/lua-reference/functions');
9494
}
9595
console.log(`✅ Generated ${Object.keys(lslDefs.functions).length*2} doc pages for ${Object.keys(lslDefs.functions).length} functions.`);
9696

9797
let sluaEventCount = 0;
9898
for (const eventName of events) {
9999
generateFor(eventName, lslDefs.events[eventName]?.tooltip, 'LSLEvent', '../src/content/docs/script/lsl-reference/events');
100-
// Skip LSL-only events when generating SLua documentation
100+
// Skip LSL-only events when generating Lua documentation
101101
if (!lslOnlyEvents.includes(eventName)) {
102-
generateFor(eventName, lslDefs.events[eventName]?.tooltip, 'SLuaEvent', '../src/content/docs/script/slua-reference/events');
102+
generateFor(eventName, lslDefs.events[eventName]?.tooltip, 'SLuaEvent', '../src/content/docs/script/lua-reference/events');
103103
sluaEventCount++;
104104
}
105105
}
106106
const totalEvents = events.length;
107-
console.log(`✅ Generated ${totalEvents} LSL event pages and ${sluaEventCount} SLua event pages for ${totalEvents} events.`);
107+
console.log(`✅ Generated ${totalEvents} LSL event pages and ${sluaEventCount} Lua event pages for ${totalEvents} events.`);
108108

109109
for (const constantName of constants) {
110110
generateFor(constantName, lslDefs.constants[constantName]?.tooltip, 'LSLConstant', '../src/content/docs/script/lsl-reference/constants');
111-
generateFor(constantName, lslDefs.constants[constantName]?.tooltip, 'SLuaConstant', '../src/content/docs/script/slua-reference/constants');
111+
generateFor(constantName, lslDefs.constants[constantName]?.tooltip, 'SLuaConstant', '../src/content/docs/script/lua-reference/constants');
112112
}
113113
console.log(`✅ Generated ${Object.keys(lslDefs.constants).length*2} doc pages for ${Object.keys(lslDefs.constants).length} constants.`);
114114
}

0 commit comments

Comments
 (0)