Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
231633b
Implemented reference documentation for ably-cli tool
sacOO7 Apr 1, 2026
ef019c9
Added NODE_OPTIONS: --max-old-space-size=8192 to the build job's envi…
sacOO7 Apr 2, 2026
7e09b7d
- Implemented proper navigation links to CLI reference
sacOO7 Apr 5, 2026
5883c5d
Updated ably-cli tool page to have explicit sections for auto-complet…
sacOO7 Apr 6, 2026
1159ee1
Added cli commands to nav bar entries for proper navigation
sacOO7 Apr 7, 2026
e747bf6
Refactored and reordered headings for channels, rooms and spaces sub-…
sacOO7 Apr 7, 2026
5c05a16
- Added output format for apps and accounts
sacOO7 Apr 7, 2026
98459da
Added output to channels publish and subscribe commands for CLI tool …
sacOO7 Apr 7, 2026
6f7e276
Merge remote-tracking branch 'origin/main' into feature/ably-cli-refe…
sacOO7 Apr 7, 2026
ec81ef5
Added missing synopsis to commands similar to aws CLI
sacOO7 Apr 13, 2026
2467604
- Removed unnecessary description for CLI command arguments and flags
sacOO7 Apr 14, 2026
6cf5963
Moved Required marker from CLI command description to flag headers
sacOO7 Apr 14, 2026
45455e1
Marked necessary CLI command arguments as required in the doc
sacOO7 Apr 14, 2026
ad28978
Added missing examples to cli reference commands doc
sacOO7 Apr 14, 2026
19bcb80
Renamed command arguments to their context specific naming convention
sacOO7 Apr 14, 2026
a00f71e
- Fixed nav bar config. for commands overview section and nested comm…
sacOO7 Apr 14, 2026
07ea7e8
Fix Prettier formatting and replace generic Subcommands headings
sacOO7 Apr 14, 2026
02faa67
Highlighted that json mode is recommended for programmatic usage
sacOO7 Apr 14, 2026
ef05b6b
fix(cli-docs): update --channel flag and add --message flag to push p…
maratal Apr 16, 2026
c71335d
Fix wording about realtime message to avoid confusion.
maratal Apr 16, 2026
d5cf34a
Fix wording for `--message` flag for complete description.
maratal Apr 16, 2026
c0f2566
Merge pull request #3341 from ably/fix/push-publish-message-flag
sacOO7 Apr 16, 2026
55693f9
Replaced integration-id with rule-id for consistency
sacOO7 Apr 17, 2026
16bd2a9
- Added global flags brief section to main tools/cli page
sacOO7 Apr 20, 2026
6ea4158
Implemented RequiredBadge component for the cli documentation, added …
sacOO7 Apr 20, 2026
70fb57d
Increased --max-old-space-size since build is failing
sacOO7 Apr 21, 2026
2629b4b
Updated command arguments and key capability examples as per updated PRs
sacOO7 Apr 21, 2026
0a9baae
Replaced all dummy message-serial with "msg-serial" for better readab…
sacOO7 Apr 21, 2026
5772ae6
Rearranged commands in accordance with their use-case in both nav-bar…
sacOO7 Apr 21, 2026
0681a08
Added comprehensive types for channels annotations type
sacOO7 Apr 21, 2026
0e2ccd5
Rename "flags" to "options" and inline global options across all CLI …
sacOO7 Apr 21, 2026
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
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
environment:
ASSET_COMPRESSION_ITERATIONS: 1
COMPRESS_MAX_THREADS: 4
NODE_OPTIONS: --max-old-space-size=12288
executor:
name: default
resource_class: xlarge
Expand Down
22 changes: 22 additions & 0 deletions data/onPostBuild/transpileMdxToMarkdown.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
removeAnchorTags,
removeJsxComments,
convertMethodSignatureToCode,
convertRequiredBadgeToText,
convertImagePathsToGitHub,
convertDocsLinksToMarkdown,
convertJsxLinkProps,
Expand Down Expand Up @@ -410,6 +411,27 @@ import Baz from 'qux';
});
});

describe('convertRequiredBadgeToText', () => {
it('should convert RequiredBadge to bold text', () => {
const input = '### `channel` <RequiredBadge />';
const output = convertRequiredBadgeToText(input);
expect(output).toBe('### `channel` **(Required)**');
});

it('should handle multiple RequiredBadge instances', () => {
const input = '### `channel` <RequiredBadge />\n\nDescription\n\n### `message` <RequiredBadge />';
const output = convertRequiredBadgeToText(input);
expect(output).toContain('### `channel` **(Required)**');
expect(output).toContain('### `message` **(Required)**');
});

it('should preserve RequiredBadge in code blocks', () => {
const input = '```jsx\n<RequiredBadge />\n```';
const output = convertRequiredBadgeToText(input);
expect(output).toContain('<RequiredBadge />');
});
});

describe('convertImagePathsToGitHub', () => {
const githubBase = 'https://raw.githubusercontent.com/ably/docs/main/src';

Expand Down
32 changes: 22 additions & 10 deletions data/onPostBuild/transpileMdxToMarkdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,14 @@ function convertMethodSignatureToCode(content: string): string {
);
}

/**
* Convert RequiredBadge components to bold text for markdown output
* <RequiredBadge /> → **(Required)**
*/
function convertRequiredBadgeToText(content: string): string {
return transformNonCodeBlocks(content, (text) => text.replace(/<RequiredBadge\s*\/>/g, '**(Required)**'));
}

/**
* Convert image paths to GitHub raw URLs
* Handles relative (../), absolute (/images/), and direct (images/) paths
Expand Down Expand Up @@ -581,34 +589,37 @@ function transformMdxToMarkdown(
// Stage 6: Convert MethodSignature components to inline code
content = convertMethodSignatureToCode(content);

// Stage 7: Strip hidden attribute from tables (makes them visible in markdown)
// Stage 7: Convert RequiredBadge components to bold text
content = convertRequiredBadgeToText(content);

// Stage 8: Strip hidden attribute from tables (makes them visible in markdown)
content = stripHiddenFromTables(content);

// Stage 8: Convert image paths to GitHub URLs
// Stage 9: Convert image paths to GitHub URLs
content = convertImagePathsToGitHub(content);

// Stage 9: Convert relative URLs to absolute URLs
// Stage 10: Convert relative URLs to absolute URLs
content = convertRelativeUrls(content, siteUrl);

// Stage 10: Convert quoted /docs/ URLs to markdown links (for JSX props like link: '/docs/...')
// Stage 11: Convert quoted /docs/ URLs to markdown links (for JSX props like link: '/docs/...')
content = convertJsxLinkProps(content, siteUrl);

// Stage 11: Convert /docs/ links to .md extension and remove ?lang= params
// Stage 12: Convert /docs/ links to .md extension and remove ?lang= params
content = convertDocsLinksToMarkdown(content);

// Stage 12: Replace template variables
// Stage 13: Replace template variables
content = replaceTemplateVariables(content);

// Stage 13: Strip code fence meta strings (e.g. highlight="2,8") to keep markdown clean for LLMs
// Stage 14: Strip code fence meta strings (e.g. highlight="2,8") to keep markdown clean for LLMs
content = stripCodeFenceMeta(content);

// Stage 14: Add language subheadings to code blocks within <Code> tags
// Stage 15: Add language subheadings to code blocks within <Code> tags
content = addLanguageSubheadingsToCodeBlocks(content);

// Stage 15: Prepend title as markdown heading
// Stage 16: Prepend title as markdown heading
let finalContent = `# ${title}\n\n${intro ? `${intro}\n\n` : ''}${content}`;

// Stage 16: Append navigation footer (after all transformations to avoid double-processing)
// Stage 17: Append navigation footer (after all transformations to avoid double-processing)
if (navContext) {
finalContent += generateNavigationFooter(navContext, siteUrl);
}
Expand Down Expand Up @@ -744,6 +755,7 @@ export {
removeAnchorTags,
removeJsxComments,
convertMethodSignatureToCode,
convertRequiredBadgeToText,
stripHiddenFromTables,
convertImagePathsToGitHub,
convertDocsLinksToMarkdown,
Expand Down
2 changes: 2 additions & 0 deletions src/components/Layout/MDXWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { PageHeader } from './mdx/PageHeader';
import Admonition from './mdx/Admonition';
import { MethodSignature } from './mdx/MethodSignature';
import { Tabs, Tab } from './mdx/Tabs';
import RequiredBadge from './mdx/RequiredBadge';

import { Frontmatter, PageContextType } from './Layout';
import { ActivePage } from './utils/nav';
Expand Down Expand Up @@ -342,6 +343,7 @@ const MDXWrapper: React.FC<MDXWrapperProps> = ({ children, pageContext, location
MethodSignature,
Tabs,
Tab,
RequiredBadge,
}}
>
<PageHeader title={title} intro={intro} />
Expand Down
10 changes: 10 additions & 0 deletions src/components/Layout/mdx/RequiredBadge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import Badge from '@ably/ui/core/Badge';

const RequiredBadge: React.FC = () => (
<Badge color="orange" size="md" className="ml-2 align-text-bottom">
Required
</Badge>
);

export default RequiredBadge;
Loading