Skip to content

Commit f6dfaab

Browse files
docs: updated readme
1 parent 67d7f88 commit f6dfaab

File tree

1 file changed

+102
-3
lines changed

1 file changed

+102
-3
lines changed

README.md

Lines changed: 102 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# MDX.org.ai
2-
31
## [`mdxai`](./packages/mdxai) - Generate & Edit Markdown & MDX
42

53
```bash
@@ -24,8 +22,109 @@ for (const title of titles) {
2422

2523
## [`mdxld`](./packages/mdxld) - Linked Data for Markdown & MDX
2624

25+
MDXLD builds upon the foundations of Linked Data like (JSON-LD and YAML-LD) with ontologies like [schema.org](https://schema.org), to create a powerful integration between structured data and content.
26+
27+
```mdx
28+
---
29+
$id: https://example.com
30+
$type: https://schema.org/WebSite
31+
title: Example Domain
32+
description: This domain is for use in illustrative examples in documents
33+
---
34+
35+
# Example Domain
36+
37+
This domain is for use in illustrative examples in documents. You may use this
38+
domain in literature without prior coordination or asking for permission.
39+
40+
[More information...](https://www.iana.org/domains/example)
41+
```
42+
2743
## [`mdxe`](./packages/mdxe) - Build, Execute, Test, & Deploy Code in Markdown & MDX
2844

45+
MDXE is a zero-config CLI that allows you to build, execute, test, and deploy code in Markdown & MDX files. It uses MDX, ESBuild, ESLint, Next.js, React, Velite, and Vitest under the hood to rapidly develop apps and sites.
46+
47+
```markdown
48+
# Addition
49+
50+
Sometimes you need to `sum` two numbers:
51+
52+
\`\`\`typescript
53+
/**
54+
* Returns the sum of two numbers.
55+
* @param {number} a - The first number to add
56+
* @param {number} b - The second number to add
57+
* @returns {number} The sum of a and b
58+
* @example
59+
* sum(2, 3)
60+
* // returns 5
61+
*/
62+
export function sum(a: number, b: number): number {
63+
return a + b
64+
}
65+
\`\`\`
66+
67+
and make sure it works:
68+
69+
\`\`\`typescript
70+
describe('sum', () => {
71+
it('returns the sum of two positive numbers', () => {
72+
expect(sum(2, 3)).toBe(5)
73+
})
74+
75+
it('returns the sum of two negative numbers', () => {
76+
expect(sum(-2, -3)).toBe(-5)
77+
})
78+
79+
it('returns the sum when one number is zero', () => {
80+
expect(sum(0, 4)).toBe(4)
81+
expect(sum(7, 0)).toBe(7)
82+
})
83+
84+
it('handles mixed positive and negative numbers', () => {
85+
expect(sum(-2, 3)).toBe(1)
86+
expect(sum(5, -8)).toBe(-3)
87+
})
88+
})
89+
\`\`\`
90+
```
91+
92+
And you can execute the tests:
93+
94+
```bash
95+
mdxe test
96+
```
97+
98+
and run the app which uses:
99+
100+
```bash
101+
mdxe dev
102+
103+
# next dev --turbopack --port 3000
104+
105+
# ▲ Next.js 15.3.0 (Turbopack)
106+
# - Local: http://localhost:3000
107+
# - Network: http://192.168.6.6:3000
108+
109+
# ✓ Starting...
110+
# ✓ Ready in 1995ms
111+
```
112+
113+
And you can develop and deploy entire projects with `mdxe`:
114+
115+
```json
116+
// package.json
117+
{
118+
"scripts": {
119+
"dev": "mdxe dev",
120+
"build": "mdxe build",
121+
"start": "mdxe start",
122+
"test": "mdxe test",
123+
"lint": "mdxe lint"
124+
}
125+
}
126+
```
127+
29128
## [`mdxui`](./packages/mdxui) - UI Component Library for MDX
30129

31130
All of the `mdxui` components are available automatically in `mdxe`
@@ -42,4 +141,4 @@ The components can also be used in any React/Next.js application:
42141
```tsx
43142
// mdx-components.tsx
44143
export { useMDXComponents } from 'mdxui'
45-
```
144+
```

0 commit comments

Comments
 (0)