Skip to content

Commit

Permalink
allow dynamic title and description
Browse files Browse the repository at this point in the history
  • Loading branch information
luludotdev committed Feb 1, 2024
1 parent 9884554 commit ae52dce
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import React from 'react'
import { useConfig } from 'nextra-theme-docs'
import type { DocsThemeConfig } from 'nextra-theme-docs'

const siteName = 'Dreamlab Docs'
const defaultDescription = 'Create multiplayer games fast!'

const config: DocsThemeConfig = {
logo: <b>Dreamlab Documentation</b>,
head: () => {
const config = useConfig()
const siteName = 'Dreamlab Docs'
const frontmatter = config.frontMatter

const title = `${config.title} - ${siteName}`
const description = 'Create multiplayer games fast!'
const description = frontmatter.description ?? defaultDescription

return (
<>
Expand Down

0 comments on commit ae52dce

Please sign in to comment.