Skip to content

Commit

Permalink
simplify initial examples
Browse files Browse the repository at this point in the history
  • Loading branch information
souporserious committed Jan 4, 2025
1 parent d35013e commit 66e1392
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
5 changes: 2 additions & 3 deletions apps/site/app/(home)/QuickSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ const posts = new Directory({ path: 'posts' })`,
const posts = new Directory({ path: 'posts'})
export default async function Page({ params }: { params: Promise<{ slug: string }> }) {
const slug = (await params).slug
async function Page({ slug }: { slug: string }) {
const post = await posts.getFile(slug, 'mdx')
const Content = await post.getExportValue('default')
Expand All @@ -35,7 +34,7 @@ export default async function Page({ params }: { params: Promise<{ slug: string
content: `Select from a growing list of pre-built components to tailor your content and documentation to fit your unique needs and brand identity.`,
code: `import { CodeBlock, Tokens } from 'renoun/components'
export function Page() {
function Page() {
return (
<CodeBlock
language="tsx"
Expand Down
8 changes: 7 additions & 1 deletion apps/site/docs/02.getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ export const metadata = {

Designed for building content and documentation sites, renoun is a versatile toolkit. This guide will help you set up renoun and start using it in your project.

<Note>

The following getting started guide uses Next.js as an example, but renoun can be used with any framework or bundler that supports Server Components. Please see the [guides section](/guides) for more examples.

</Note>

## Installation

First, install renoun using your preferred package manager:
Expand All @@ -32,7 +38,7 @@ Then start the development server:
npm run dev
```

Prepending the renoun CLI ensures that the renoun process starts before your framework's server. The CLI starts a web socket server that will watch for changes to the file system and communicates with renoun components.
Prepending the renoun CLI ensures that the renoun process starts before your framework's server. The CLI starts a WebSocket server that will watch for changes to the file system and communicates with renoun components.

### Path Aliases

Expand Down
7 changes: 1 addition & 6 deletions packages/renoun/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,7 @@ import { Directory } from 'renoun/file-system'

const posts = new Directory({ path: 'posts' })

export default async function Page({
params,
}: {
params: Promise<{ slug: string }>
}) {
const slug = (await params).slug
async function Page({ slug }: { slug: string }) {
const post = await posts.getFile(slug, 'mdx')
const Content = await post.getExportValue('default')

Expand Down
7 changes: 1 addition & 6 deletions packages/renoun/src/file-system/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ const posts = new Directory({
},
})

export default async function Page({
params,
}: {
params: Promise<{ slug: string }>
}) {
const slug = (await params).slug
export default async function Page({ slug }: { slug: string }) {
const post = await posts.getFile(slug, 'mdx')
const Content = await post.getExportValue('default')

Expand Down

0 comments on commit 66e1392

Please sign in to comment.