Allow default theme to be customized from config file (#292)
* feat: customize default theme Co-authored-by: llovvoll <Rick.Jiang@aol.com>
This commit is contained in:
parent
b1f07e6215
commit
e48573e2bf
@ -4,6 +4,7 @@ const siteMetadata = {
|
||||
headerTitle: 'TailwindBlog',
|
||||
description: 'A blog created with Next.js and Tailwind.css',
|
||||
language: 'en-us',
|
||||
theme: 'system', // system, dark or light
|
||||
siteUrl: 'https://tailwind-nextjs-starter-blog.vercel.app',
|
||||
siteRepo: 'https://github.com/timlrx/tailwind-nextjs-starter-blog',
|
||||
siteLogo: '/static/images/logo.png',
|
||||
|
@ -4,6 +4,7 @@ import '@/css/prism.css'
|
||||
import { ThemeProvider } from 'next-themes'
|
||||
import Head from 'next/head'
|
||||
|
||||
import siteMetadata from '@/data/siteMetadata'
|
||||
import Analytics from '@/components/analytics'
|
||||
import LayoutWrapper from '@/components/LayoutWrapper'
|
||||
import { ClientReload } from '@/components/ClientReload'
|
||||
@ -13,7 +14,7 @@ const isSocket = process.env.SOCKET
|
||||
|
||||
export default function App({ Component, pageProps }) {
|
||||
return (
|
||||
<ThemeProvider attribute="class">
|
||||
<ThemeProvider attribute="class" defaultTheme={siteMetadata.theme}>
|
||||
<Head>
|
||||
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
||||
</Head>
|
||||
|
Loading…
x
Reference in New Issue
Block a user