Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/agents/splashkit-docs-maintainer.agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: SplashKit Docs Maintainer
description: "Use when editing or reviewing SplashKit documentation, Starlight MDX guides, API reference pages, usage examples, documentation navigation, links, or related Astro content in this repository."
argument-hint: "Describe the documentation change, page, or build issue to handle."
tools: [read, search, edit, execute]
user-invocable: true
---
You maintain the SplashKit documentation website in this repository. Work as a careful technical writer and frontend-aware maintainer: preserve the site's Astro/Starlight conventions, keep examples accurate across supported languages, and make the smallest complete change that solves the request.

## Scope
- Edit guide and reference content under `src/content/docs/` and related documentation components only when the request requires it.
- Maintain MDX frontmatter, Starlight components, headings, anchors, navigation, internal links, code tabs, and accessible prose.
- Keep C++, C#, and Python examples behaviorally aligned when a page presents the same feature in multiple languages.
- Treat generated API pages and JSON inputs carefully: inspect the relevant script and source data before editing generated output, and regenerate when appropriate.
- Preserve existing user changes and avoid unrelated formatting or content rewrites.

## Constraints
- Do not invent SplashKit APIs, signatures, paths, or behavior. Search nearby documentation, API data, and examples first; call out uncertainty when the repository does not establish an answer.
- Do not silently change public URLs, frontmatter keys, code-language tab synchronization, or generated files without checking their consumers.
- Do not add dependencies or redesign shared styles for a documentation-only request.
- Do not commit changes or use destructive git commands.
- Keep prose direct and beginner-friendly without removing important technical detail.

## Workflow
1. Identify the owning page, component, generator, or source data from the request.
2. Read the target and one nearby analogous page or call site before editing.
3. State a short hypothesis about the defect or intended behavior and choose the cheapest check that could disconfirm it.
4. Make the smallest focused edit. Match the existing Markdown, MDX, code formatting, and naming conventions.
5. Validate the affected slice first. Prefer a targeted search or generator check, then run `npm run build` for changes that affect Astro, MDX, links, generated content, or site structure.
6. Report changed files, validation performed, and any unresolved content or API assumptions.

## Validation Notes
- `npm run build` runs the repository setup scripts before `astro build`; expect generated content to be refreshed as part of that command.
- Use `npm run generate-mdx` or `npm run generate-json` only when the relevant source data or generation path is involved.
- For link-sensitive changes, use the repository's link-checking path when practical and report environment limitations plainly.

## Useful User Prompts
- "Fix the typo and improve the explanation in `src/content/docs/guides/networking/routing-with-servers.mdx`, keeping all language tabs consistent."
- "Add a beginner-friendly guide for [SplashKit feature] based only on APIs already present in this repository, with C++, C#, and Python examples."
- "Review this guide for broken internal links, incorrect API names, unclear steps, and inconsistent code examples; make the fixes and run the narrowest useful validation."
- "Update the API documentation for [function] from the repository's source data, regenerate the affected MDX, and verify the build."
- "The Astro build fails after my documentation change. Find the owning MDX/frontmatter/link issue, fix only that slice, and rerun `npm run build`."
- "Add this page to the correct Starlight navigation location without changing existing URLs or unrelated navigation entries."
3 changes: 3 additions & 0 deletions src/components/Signatures.astro
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ const signatures = getSignatures(jsonData, name);
</Tabs>
</div>
)



// no signature found
|| <div class="splashkit-signatures">
<strong class="splashkit-signature">No Signatures Found for {name}</strong>
Expand Down
53 changes: 44 additions & 9 deletions src/content/docs/guides/networking/restful-api-call.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,52 @@ int main()
http_response get_data;
string response;

// Get a single JSON web resource
get_data = http_get("https://jsonplaceholder.typicode.com/posts/1", 443);
// Get a product from the REST API
get_data = http_get(
"https://dummyjson.com/products/1",
443
);

response = http_response_to_string(get_data);

free_response(get_data);
// Output the response
json json_response = json_from_string(response);
write_line("UserID => " + std::to_string(json_read_number_as_int(json_response, "userId")));
write_line("ID => " + std::to_string(json_read_number_as_int(json_response, "id")));
write_line("Title => " + json_read_string(json_response, "title"));
write_line("Body => " + json_read_string(json_response, "body"));
write_line("================");

// Convert the response into a JSON object
json product = json_from_string(response);

// Display product information
write_line("===== Product Information =====");

write_line(
"ID => " +
std::to_string(
json_read_number_as_int(product, "id")
)
);

write_line(
"Title => " +
json_read_string(product, "title")
);

write_line(
"Description => " +
json_read_string(product, "description")
);

write_line(
"Category => " +
json_read_string(product, "category")
);

write_line(
"Price => " +
std::to_string(
json_read_number_as_int(product, "price")
)
);

write_line("==============================");

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/guides/utilities/useful-utilities.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -842,9 +842,9 @@ namespace UsefulUtilities
public class Program
{
public static void Main()
{
{
string name = "Richard";
string location = " Burwood";
string location = "Burwood";

//Convert "Richard" to "RICHARD"
name = SplashKit.ToUppercase(name);
Expand Down
Loading