Skip to content

Commit 23cca2e

Browse files
authored
Merge branch 'main' into update-applies-to-docs
2 parents ae3efe7 + 9dddf81 commit 23cca2e

File tree

14 files changed

+237
-696
lines changed

14 files changed

+237
-696
lines changed

.github/workflows/deploy-api-lambda.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
uses: ./.github/workflows/build-api-lambda.yml
1616

1717
deploy:
18+
concurrency: ${{ github.workflow }}
1819
permissions:
1920
contents: read
2021
id-token: write

AGENTS.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# AI Assistant Guide for docs-builder
2+
3+
This file contains instructions and guidance for AIs when working with the docs-builder repository.
4+
5+
## Repository overview
6+
7+
This is Elastic's distributed documentation tooling system built on .NET 9, consisting of:
8+
9+
- **docs-builder**: CLI tool for building single documentation sets
10+
- **docs-assembler**: CLI tool for assembling multiple doc sets
11+
- Written in C# and F# with extensive Markdown processing capabilities
12+
13+
## Essential commands
14+
15+
### Development
16+
```bash
17+
# Ensure no compilation failures -- run this to confirm the absence of build errors.
18+
dotnet build
19+
20+
# Run docs-builder locally
21+
dotnet run --project src/tooling/docs-builder
22+
23+
# Run all the unit tests which complete fast.
24+
./build.sh unit-test
25+
26+
# Clean all the build artifacts located in .artifacts folder
27+
./build.sh clean
28+
29+
# Produce native binaries -- only call this if a change touches serialization and you are committing on behalf of the developer.
30+
./build.sh publishbinaries
31+
32+
```
33+
34+
### Linting and Code Quality
35+
36+
```bash
37+
# Format code. Always run this when output contains formatting errors.
38+
dotnet format
39+
40+
# Run specific test project
41+
dotnet test tests/Elastic.Markdown.Tests/
42+
43+
# Run tests with verbose output
44+
dotnet test --logger "console;verbosity=detailed"
45+
```
46+
47+
## Key architecture Points
48+
49+
### Main Projects
50+
51+
- `src/Elastic.Markdown/` - Core Markdown processing engine
52+
- `src/tooling/docs-builder/` - Main CLI application
53+
- `src/tooling/docs-assembler/` - Assembly tool
54+
- `src/Elastic.Documentation.Site/` - Web rendering components
55+
56+
### Testing Structure
57+
58+
- `tests/` - C# unit tests
59+
- `tests/authoring/` - F# authoring tests
60+
- `tests-integration/` - Integration tests
61+
62+
### Configuration
63+
64+
- `config/` - YAML configuration files
65+
- `Directory.Build.props` - MSBuild properties
66+
- `Directory.Packages.props` - Centralized package management
67+
68+
## Development guidelines
69+
70+
### Adding New Features
71+
72+
1. **Markdown Extensions**: Add to `src/Elastic.Markdown/Myst/`
73+
2. **CLI Commands**: Extend `src/tooling/docs-builder/Cli/` or `docs-assembler/Cli/`
74+
3. **Web Components**: Add to `src/Elastic.Documentation.Site/`
75+
4. **Configuration**: Modify `src/Elastic.Documentation.Configuration/`
76+
77+
### Code style
78+
79+
- Follow existing C# and F# conventions in the codebase
80+
- ...
81+
82+
### Testing requirements
83+
84+
- Add unit tests for new functionality
85+
- Use F# for authoring/documentation-specific tests
86+
- ...
87+
88+
### Common patterns
89+
90+
- ...
91+
92+
## Documentation
93+
94+
The repository is self-documenting:
95+
96+
- `/docs/` contains comprehensive documentation
97+
98+
You MUST update the documentation when there are changes in the markdown syntax or rendering behaviour.
99+
100+
## Useful file locations
101+
102+
- Entry points: `src/tooling/docs-builder/Program.cs`, `src/tooling/docs-assembler/Program.cs`
103+
- Markdown processing: `src/Elastic.Markdown/Myst/`
104+
- Web assets: `src/Elastic.Documentation.Site/Assets/`
105+
- Configuration schemas: `src/Elastic.Documentation.Configuration/`
106+
- Test helpers: `tests/Elastic.Markdown.Tests/TestHelpers.cs`

src/Elastic.Documentation.Site/Assets/web-components/SearchOrAskAi/Search/SearchResults.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ export const SearchResults = () => {
6868
<>
6969
<ul>
7070
{data.results.map((result) => (
71-
<SearchResultListItem item={result} />
71+
<SearchResultListItem
72+
item={result}
73+
key={result.url}
74+
/>
7275
))}
7376
</ul>
7477
<EuiSpacer size="m" />
@@ -118,7 +121,7 @@ function SearchResultListItem({ item: result }: SearchResultListItemProps) {
118121
highlightSearchTerms.push('.net')
119122
}
120123
return (
121-
<li key={result.url}>
124+
<li>
122125
<div
123126
tabIndex={0}
124127
css={css`

0 commit comments

Comments
 (0)