Skip to content

Commit

Permalink
website: update docpress (#2173)
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout authored Feb 12, 2025
1 parent 489ecf6 commit 55b80f8
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 45 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"typecheck": "tsc --noEmit --watch"
},
"dependencies": {
"@brillout/docpress": "^0.10.25",
"@brillout/docpress": "^0.11.2",
"@types/react": "^19.0.2",
"@types/react-dom": "^19.0.2",
"react": "^19.0.0",
Expand Down
32 changes: 16 additions & 16 deletions docs/pages/data/+Page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,31 +114,31 @@ you can tell Vike to load and execute `data()` also on the client-side:

React + JavaScript:

- <Link href='/boilerplates/boilerplate-react/pages/star-wars/index/+data.js' />
- <Link href='/boilerplates/boilerplate-react/pages/star-wars/index/+Page.jsx' /> (`useData()` usage)
- <Link href='/boilerplates/boilerplate-react/pages/star-wars/@id/+data.js' />
- <Link href='/boilerplates/boilerplate-react/pages/star-wars/@id/+Page.jsx' /> (`useData()` usage)
- <RepoLink path='/boilerplates/boilerplate-react/pages/star-wars/index/+data.js' />
- <RepoLink path='/boilerplates/boilerplate-react/pages/star-wars/index/+Page.jsx' /> (`useData()` usage)
- <RepoLink path='/boilerplates/boilerplate-react/pages/star-wars/@id/+data.js' />
- <RepoLink path='/boilerplates/boilerplate-react/pages/star-wars/@id/+Page.jsx' /> (`useData()` usage)

React + TypeScript:

- <Link href='/boilerplates/boilerplate-react-ts/pages/star-wars/index/+data.ts' />
- <Link href='/boilerplates/boilerplate-react-ts/pages/star-wars/index/+Page.tsx' /> (`useData()` usage)
- <Link href='/boilerplates/boilerplate-react-ts/pages/star-wars/@id/+data.ts' />
- <Link href='/boilerplates/boilerplate-react-ts/pages/star-wars/@id/+Page.tsx' /> (`useData()` usage)
- <RepoLink path='/boilerplates/boilerplate-react-ts/pages/star-wars/index/+data.ts' />
- <RepoLink path='/boilerplates/boilerplate-react-ts/pages/star-wars/index/+Page.tsx' /> (`useData()` usage)
- <RepoLink path='/boilerplates/boilerplate-react-ts/pages/star-wars/@id/+data.ts' />
- <RepoLink path='/boilerplates/boilerplate-react-ts/pages/star-wars/@id/+Page.tsx' /> (`useData()` usage)

Vue + JavaScript:

- <Link href='/boilerplates/boilerplate-vue/pages/star-wars/index/+data.js' />
- <Link href='/boilerplates/boilerplate-vue/pages/star-wars/index/+Page.vue' /> (`useData()` usage)
- <Link href='/boilerplates/boilerplate-vue/pages/star-wars/@id/+data.js' />
- <Link href='/boilerplates/boilerplate-vue/pages/star-wars/@id/+Page.vue' /> (`useData()` usage)
- <RepoLink path='/boilerplates/boilerplate-vue/pages/star-wars/index/+data.js' />
- <RepoLink path='/boilerplates/boilerplate-vue/pages/star-wars/index/+Page.vue' /> (`useData()` usage)
- <RepoLink path='/boilerplates/boilerplate-vue/pages/star-wars/@id/+data.js' />
- <RepoLink path='/boilerplates/boilerplate-vue/pages/star-wars/@id/+Page.vue' /> (`useData()` usage)

Vue + TypeScript:

- <Link href='/boilerplates/boilerplate-vue-ts/pages/star-wars/index/+data.ts' />
- <Link href='/boilerplates/boilerplate-vue-ts/pages/star-wars/index/+Page.vue' /> (`useData()` usage)
- <Link href='/boilerplates/boilerplate-vue-ts/pages/star-wars/@id/+data.ts' />
- <Link href='/boilerplates/boilerplate-vue-ts/pages/star-wars/@id/+Page.vue' /> (`useData()` usage)
- <RepoLink path='/boilerplates/boilerplate-vue-ts/pages/star-wars/index/+data.ts' />
- <RepoLink path='/boilerplates/boilerplate-vue-ts/pages/star-wars/index/+Page.vue' /> (`useData()` usage)
- <RepoLink path='/boilerplates/boilerplate-vue-ts/pages/star-wars/@id/+data.ts' />
- <RepoLink path='/boilerplates/boilerplate-vue-ts/pages/star-wars/@id/+Page.vue' /> (`useData()` usage)


## TypeScript
Expand Down
6 changes: 3 additions & 3 deletions docs/pages/injectFilter/+Page.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link, Warning } from '@brillout/docpress'
import { Link, Warning, RepoLink } from '@brillout/docpress'

The `injectFilter()` hook allows you to control where and what tags Vike injects in the HTML, most notably <Link href="/preloading">preload</Link> tags.

Expand All @@ -9,8 +9,8 @@ The `injectFilter()` hook allows you to control where and what tags Vike injects

## Examples

- <Link href="/examples/custom-preload/renderer/+onRenderHtml.tsx" />
- <Link href="/test/preload/renderer/+onRenderHtml.tsx" />
- <RepoLink path="/examples/custom-preload/renderer/+onRenderHtml.tsx" />
- <RepoLink path="/test/preload/renderer/+onRenderHtml.tsx" />


## Usage
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/onBeforeRoute/+Page.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { HookTypeScriptHints } from '../../components'
import { Link, Warning } from '@brillout/docpress'
import { Link, Warning, RepoLink } from '@brillout/docpress'

The `onBeforeRoute()` hook provides full control over routing.

Expand All @@ -24,7 +24,7 @@ We can also use it to [implement a custom router](https://github.com/vikejs/vike
<Warning>For use cases other than i18n, open a GitHub ticket or reach out on Discord: `onBeforeRoute()` is purposely limited but the limitations can be lifted in order to unlock new capabilities.</Warning>

Example:
- <Link href='/examples/i18n/renderer/+onBeforeRoute.js' />
- <RepoLink path='/examples/i18n/renderer/+onBeforeRoute.js' />

## TypeScript

Expand Down
8 changes: 4 additions & 4 deletions docs/pages/react/+Page.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from '@brillout/docpress'
import { Link, RepoLink } from '@brillout/docpress'
import { Example, UseBati, CustomIntegrationWarning } from '../../components'

## `vike-react`
Expand All @@ -17,10 +17,10 @@ Instead of using <Link href="/vike-react">`vike-react`</Link>, you can implement
<CustomIntegrationWarning list={['vike-react']} />

Official examples:
- <Link href="/boilerplates/boilerplate-react-ts" /> - Classic integration, using <Link href="/client-routing">Client Routing</Link>.
- <Link href="/examples/react-minimal" /> - Minimalistic integration, using <Link href="/server-routing">Server Routing</Link>.
- <RepoLink path="/boilerplates/boilerplate-react-ts" /> - Classic integration, using <Link href="/client-routing">Client Routing</Link>.
- <RepoLink path="/examples/react-minimal" /> - Minimalistic integration, using <Link href="/server-routing">Server Routing</Link>.
- [`vike-react` source code](https://github.com/vikejs/vike-react/tree/main/packages/vike-react) - Full-featured integration.
- <Link href="/examples/render-modes" /> - Integration supporting all <Link href="/render-modes">render modes</Link> (SSR, SPA, and HTML-only).
- <RepoLink path="/examples/render-modes" /> - Integration supporting all <Link href="/render-modes">render modes</Link> (SSR, SPA, and HTML-only).

> For more official examples, see [GitHub > `vikejs/vike` > `examples/`](https://github.com/vikejs/vike/tree/main/examples).
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/render-modes/+Page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ async function onRenderClient(pageContext) {
}
```

React example: <Link href="/examples/render-modes/" />.
React example: <RepoLink path="/examples/render-modes/" />.
- Server-side hook: <RepoLink path="/examples/render-modes/renderer/+onRenderHtml.jsx" />
- Client-side hook: <RepoLink path="/examples/render-modes/renderer/+onRenderClient.jsx" />
- Custom `renderMode` config: <RepoLink path="/examples/render-modes/renderer/+config.ts" />
Expand Down
10 changes: 5 additions & 5 deletions docs/pages/useData/+Page.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from '@brillout/docpress'
import { Link, RepoLink } from '@brillout/docpress'
import { UiFrameworkExtension } from '../../components'

Environment: server, client.
Expand Down Expand Up @@ -95,10 +95,10 @@ In case you don't use a <UiFrameworkExtension />, you can implement `useData()`
> In general, for improved DX, we recommend using a `useData()` implementation. But you don't have to as shown at <Link href="/data#without-vike-react-vue-solid" doNotInferSectionTitle />.
Examples:
- <Link href='/boilerplates/boilerplate-react/renderer/useData.js' /> (React + JavaScript)
- <Link href='/boilerplates/boilerplate-react-ts/renderer/useData.ts' /> (React + TypeScript)
- <Link href='/boilerplates/boilerplate-vue/renderer/useData.js' /> (Vue + JavaScript)
- <Link href='/boilerplates/boilerplate-vue-ts/renderer/useData.ts' /> (Vue + TypeScript)
- <RepoLink path='/boilerplates/boilerplate-react/renderer/useData.js' /> (React + JavaScript)
- <RepoLink path='/boilerplates/boilerplate-react-ts/renderer/useData.ts' /> (React + TypeScript)
- <RepoLink path='/boilerplates/boilerplate-vue/renderer/useData.js' /> (Vue + JavaScript)
- <RepoLink path='/boilerplates/boilerplate-vue-ts/renderer/useData.ts' /> (Vue + TypeScript)
- [`vike-react` > /hooks/useData.tsx](https://github.com/vikejs/vike-react/blob/main/packages/vike-react/src/hooks/useData.tsx)
- [`vike-vue` > /hooks/useData.ts](https://github.com/vikejs/vike-vue/blob/main/packages/vike-vue/src/hooks/useData.ts)
- [`vike-solid` > /hooks/useData.tsx](https://github.com/vikejs/vike-solid/blob/main/vike-solid/hooks/useData.tsx)
Expand Down
6 changes: 3 additions & 3 deletions docs/pages/vue/+Page.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link } from '@brillout/docpress'
import { Link, RepoLink } from '@brillout/docpress'
import { Example, UseBati, CustomIntegrationWarning } from '../../components'

## `vike-vue`
Expand All @@ -17,8 +17,8 @@ Instead of using <Link href="/vike-vue">`vike-vue`</Link>, you can implement you
<CustomIntegrationWarning list={['vike-vue']} />

Official examples:
- <Link href="/boilerplates/boilerplate-vue-ts" /> - Classic integration, using <Link href="/client-routing">Client Routing</Link>.
- <Link href="/examples/vue-minimal" /> - Minimalistic integration, using <Link href="/server-routing">Server Routing</Link>.
- <RepoLink path="/boilerplates/boilerplate-vue-ts" /> - Classic integration, using <Link href="/client-routing">Client Routing</Link>.
- <RepoLink path="/examples/vue-minimal" /> - Minimalistic integration, using <Link href="/server-routing">Server Routing</Link>.
- [`vike-vue` source code](https://github.com/vikejs/vike-vue/tree/main/packages/vike-vue) - Full-featured integration.

> For more official examples, see [GitHub > `vikejs/vike` > `examples/`](https://github.com/vikejs/vike/tree/main/examples).
Expand Down
3 changes: 0 additions & 3 deletions docs/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import docpressConfig from '@brillout/docpress/vite-config'
import svgr from 'vite-plugin-svgr'
import type { UserConfig } from 'vite'

export default {
...docpressConfig,
plugins: [
...docpressConfig.plugins!,
// Used by the landing page, see `.svg?react` imports
svgr()
]
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 55b80f8

Please sign in to comment.