Skip to content

Commit 46099f0

Browse files
authored
next -> main (#374)
1 parent 037a021 commit 46099f0

File tree

5 files changed

+45
-6
lines changed

5 files changed

+45
-6
lines changed

api/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ENV __BUILD_SHA=$BUILD_SHA
2020

2121
WORKDIR /opt/app
2222
COPY . .
23-
RUN bun install --frozen-lockfile --production
23+
RUN bun install --frozen-lockfile
2424

2525
WORKDIR /opt/app/api
2626

bun.lockb

2.17 KB
Binary file not shown.

docs.json

+4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@
8080
"group": "Components",
8181
"tab": "components",
8282
"pages": [
83+
{
84+
"title": "Getting Started",
85+
"href": "/components"
86+
},
8387
{
8488
"title": "Accordion",
8589
"href": "/components/accordion",

docs/components/index.mdx

+37-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
11
---
2-
redirect: /components/accordion
3-
---
2+
title: Components
3+
description: Enhance your documentation with components powered by MDX.
4+
---
5+
6+
Alongside regular Markdown, docs.page supports [MDX](https://mdxjs.com/), a format that allows you to use JSX components within your documentation.
7+
8+
Components enable you to enhance your documentation, providing a more interactive and engaging experience for your readers over what is possible with standard Markdown.
9+
10+
## Using Components
11+
12+
To use components in your documentation, you can either use standard Markdown syntax, or the `<Component>` syntax. For example, the `<Info>` component can be used to display an informational message more visible to users:
13+
14+
<Info>This draws attention to useful page information.</Info>
15+
16+
```jsx
17+
<Info>This draws attention to useful page information.</Info>
18+
```
19+
20+
Components also take "props", which are attributes that can be passed to the component to customize its behavior, for example:
21+
22+
```jsx
23+
<Tweet id="1513662173796605958" />
24+
```
25+
26+
## HTML Overrides
27+
28+
Typical markdown syntax supports both markdown tags and also HTML tags. In some scenarios, docs.page will override the HTML tags to render the component instead. For example image markup in markdown (e.g. `![alt text](image.png)`) will be overridden to render the `<Image>` component instead.
29+
30+
Please note that rendering HTML directly in your markdown will not be overridden, and will be rendered as standard HTML. For example an `<img>` tag will not be overridden to render the `<Image>` component.
31+
32+
## Invalid Components
33+
34+
If you attempt to use a component that does not exist, or has a required property which is missing, docs.page will render a red block with a message informing you to take action.
35+
For example:
36+
37+
<ComponentWhichDoesNotExist />
38+

website/app/components/Footer.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ export function Footer() {
3535
const sorted = socials.sort(([a], [b]) => a.localeCompare(b));
3636

3737
return (
38-
<footer className="flex items-center gap-12 pb-12">
39-
<div className="text-sm flex gap-1">
38+
<footer className="md:flex items-center gap-12 pb-12 space-y-3 md:space-y-0">
39+
<div className="text-sm flex items-center justify-center md:justify-start gap-1">
4040
<span>Powered by</span>
4141
<span></span>
4242
<code>
4343
<a href="https://invertase.io">invertase</a>/
4444
<a href="https://docs.page">docs.page</a>
4545
</code>
4646
</div>
47-
<div className="flex-1 flex flex-wrap items-center justify-end gap-5">
47+
<div className="flex-1 flex flex-wrap items-center justify-center md:justify-end gap-5">
4848
{sorted.map(([name, url]) => (
4949
<div key={name}>
5050
<a

0 commit comments

Comments
 (0)