Skip to content

Commit

Permalink
Upgrade to Nextra v3 with all dependencies (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
catrielmuller authored Oct 2, 2024
1 parent 1daa3c2 commit ccb8f60
Show file tree
Hide file tree
Showing 12 changed files with 2,604 additions and 3,002 deletions.
9 changes: 4 additions & 5 deletions config/docs-theme.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react'
import { DocsThemeConfig } from 'nextra-theme-docs'
import { RedditIcon } from '../components/icons/reddit'
import { useSeoConfig } from './seo'
import { Footer } from './footer'
import { useHead } from './head'

const docsTheme: DocsThemeConfig = {
const docsTheme = {
faviconGlyph: '🇦🇷',
logo: <strong>DevsArg - FAQ</strong>,
head: useHead,
search: {
placeholder: 'Buscar...',
emptyResult: 'No se encontraron resultados',
Expand All @@ -29,12 +29,11 @@ const docsTheme: DocsThemeConfig = {

},
editLink: {
text: 'Colaborar ->',
content: 'Colaborar ->',
},
footer: {
component: Footer,
},
useNextSeoProps: useSeoConfig
}

export default docsTheme
14 changes: 14 additions & 0 deletions config/head.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { useConfig } from "nextra-theme-docs"

export const useHead = () => {
const config = useConfig()
const title = `${config.title} | DevsArg`
const description = config.frontMatter.description || ''
return (
<>
<title>{title}</title>
<meta property="og:title" content={title} />
<meta name="description" content={description} />
</>
)
}
7 changes: 0 additions & 7 deletions config/seo.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
15 changes: 0 additions & 15 deletions next.config.js

This file was deleted.

15 changes: 15 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import nextra from 'nextra'

const withNextra = nextra({
theme: 'nextra-theme-docs',
themeConfig: './config/docs-theme.tsx',
})

const isDev = process.env.NODE_ENV !== 'production';

export default withNextra({
images: {
unoptimized: true,
},
basePath: isDev ? '' : '/faq',
})
Loading

0 comments on commit ccb8f60

Please sign in to comment.