-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): add nextra v4 support (#8289)
* feat(docs): add nextra v4 support * Resolve yarn.lock * fix next public env * fix types linting * fix types linting * fix types linting
- Loading branch information
1 parent
2bb7778
commit bd05a01
Showing
86 changed files
with
644 additions
and
788 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ coverage/ | |
!packages/vkui | ||
tmp/ | ||
storybook-static/ | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import Layout from './src/index'; | ||
import type { PartialDocsThemeConfig as DocsThemeConfig } from './src/types'; | ||
|
||
export { useFetch } from './src/hooks/useFetch'; | ||
export { StorybookIcon, GithubIcon, FigmaIcon } from './src/icons'; | ||
export { type DocsThemeConfig }; | ||
export default Layout; | ||
export { StorybookIcon, GithubIcon, FigmaIcon, LogoIcon } from './src/icons'; | ||
|
||
export { getStaticPathsTags } from './src/blog/tags'; | ||
|
||
export { TagTitle, TagName, getStaticPathsTags } from './src/blog/tags'; | ||
export { Head, Navbar } from './src/components'; | ||
export { Layout } from './src/layout'; | ||
export { getMdxComponents } from './src/mdx'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 13 additions & 6 deletions
19
packages/vkui-docs-theme/src/blog/components/PostHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export { PostsLayout } from './PostsLayout'; | ||
export { PostHeader } from './components/PostHeader'; | ||
export { getTags } from './tags'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,16 @@ | ||
import NextHead from 'next/head'; | ||
import { useMounted } from 'nextra/hooks'; | ||
import { useColorScheme, useThemeConfig } from '../contexts'; | ||
|
||
export function Head() { | ||
const themeConfig = useThemeConfig(); | ||
const { resolvedColorScheme } = useColorScheme(); | ||
const mounted = useMounted(); | ||
|
||
const ThemeConfigHead = themeConfig.head; | ||
const head = typeof ThemeConfigHead === 'function' ? <ThemeConfigHead /> : ThemeConfigHead; | ||
import * as React from 'react'; | ||
|
||
export function Head({ children }: React.PropsWithChildren) { | ||
return ( | ||
<NextHead> | ||
{mounted ? ( | ||
<meta name="theme-color" content={resolvedColorScheme === 'dark' ? '#111' : '#fff'} /> | ||
) : ( | ||
<> | ||
<meta name="theme-color" content="#fff" media="(prefers-color-scheme: light)" /> | ||
<meta name="theme-color" content="#111" media="(prefers-color-scheme: dark)" /> | ||
</> | ||
)} | ||
<head> | ||
{children} | ||
<meta name="theme-color" content="#fff" media="(prefers-color-scheme: light)" /> | ||
<meta name="theme-color" content="#111" media="(prefers-color-scheme: dark)" /> | ||
|
||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no, viewport-fit=cover" | ||
/> | ||
{head} | ||
</NextHead> | ||
</head> | ||
); | ||
} |
Oops, something went wrong.