import { fileURLToPath } from 'node:url' import { resolve } from 'pathe' import { defineNuxtConfig } from 'nuxt' const themeDir = fileURLToPath(new URL('./', import.meta.url)) const resolveThemeDir = (path: string) => resolve(themeDir, path) const config = defineNuxtConfig({ extends: ['@nuxt-themes/docus'], theme: { title: 'Nuxt 3', description: 'The Hybrid Vue Framework', url: 'https://v3.nuxtjs.org', credits: false, layout: 'docs', twitter: 'nuxt_js', socials: { twitter: 'nuxt_js', github: 'nuxt/framework' } }, app: { head: { link: [ { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&family=DM+Serif+Display:ital@0;1&display=swap' }, { rel: 'preconnect', href: 'https://fonts.gstatic.com' } ], meta: [ { hid: 'og:video', name: 'og:video', content: 'https://res.cloudinary.com/nuxt/video/upload/v1634114611/nuxt3-beta_sznsf8.mp4' } ] } }, css: [resolveThemeDir('./assets/nuxt.css')], components: [ { prefix: '', path: resolveThemeDir('./components'), global: true }, { prefix: '', path: resolveThemeDir('./components/icons'), global: true }, { prefix: '', path: resolveThemeDir('./components/logo'), global: true } ], modules: [ '@nuxtlabs/github-module' // 'vue-plausible', // '@nuxtjs/algolia' ], publicRuntimeConfig: { plausible: { domain: process.env.PLAUSIBLE_DOMAIN } }, github: { repo: 'nuxt/framework', branch: 'main', dir: 'docs', token: process.env.GITHUB_TOKEN }, tailwindcss: { config: { safelist: ['h-32', 'lg:h-48'] } }, algolia: { applicationId: '1V8G7N9GF0', apiKey: '60a01900a4b726d667eab75b6f337592', docSearch: { indexName: 'nuxtjs', facetFilters: ['tags:v3'] } } }) // Use Github driver to grab content from `nuxt/framework/docs/content` if (process.env.THEME_DEV) { config.content = { sources: [ { name: 'nuxt3-docs', driver: 'github', repo: 'nuxt/framework', branch: 'feat/docus-docs', dir: 'docs/content', token: process.env.GITHUB_TOKEN } ] } } export default config