Skip to content

feat: Exposes Vocs Hooks #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions playgrounds/custom-layout/docs/components/CustomHero/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { useConfig } from '../../../../../src/hooks.js'

const CustomHero = () => {
const config = useConfig()

return (
<section>
<h1>
<b>Config Title:</b> {config?.title ?? ''}
</h1>
</section>
)
}

export default CustomHero
6 changes: 5 additions & 1 deletion playgrounds/custom-layout/docs/pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import CustomHero from '../components/CustomHero';

<CustomHero />

# Overview

Example overview page with custome layout.

## Example Section

Hello there.
Hello there
1 change: 1 addition & 0 deletions src/hooks.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { useConfig } from './app/hooks/useConfig.js'
16 changes: 3 additions & 13 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
".": "./_lib/index.js",
"./components": "./_lib/components.js",
"./head": "./_lib/head.js",
"./hooks": "./_lib/hooks.js",
"./mdx-react": "./_lib/mdx-react.js"
},
"peerDependencies": {
Expand Down Expand Up @@ -90,23 +91,12 @@
"license": "MIT",
"homepage": "https://vocs.dev",
"repository": "wevm/vocs",
"authors": [
"awkweb.eth",
"jxom.eth"
],
"authors": ["awkweb.eth", "jxom.eth"],
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/wevm"
}
],
"keywords": [
"react",
"static",
"docs",
"generator",
"vite",
"documentation",
"mdx"
]
"keywords": ["react", "static", "docs", "generator", "vite", "documentation", "mdx"]
}