feat: upgrade packages

This commit is contained in:
swve
2026-03-12 23:59:19 +01:00
parent a2d079c1a9
commit c6ffd76538
42 changed files with 5566 additions and 4099 deletions

View File

@@ -0,0 +1,22 @@
import { generateStaticParamsFor, importPage } from 'nextra/pages'
import { useMDXComponents as getMDXComponents } from '../../mdx-components'
export const generateStaticParams = generateStaticParamsFor('mdxPath')
export async function generateMetadata(props) {
const params = await props.params
const { metadata } = await importPage(params.mdxPath)
return metadata
}
const Wrapper = getMDXComponents().wrapper
export default async function Page(props) {
const params = await props.params
const { default: MDXContent, toc, metadata } = await importPage(params.mdxPath)
return (
<Wrapper toc={toc} metadata={metadata}>
<MDXContent {...props} params={params} />
</Wrapper>
)
}

65
app/layout.jsx Normal file
View File

@@ -0,0 +1,65 @@
import { Footer, Layout, Navbar } from 'nextra-theme-docs'
import { Head } from 'nextra/components'
import { getPageMap } from 'nextra/page-map'
import 'nextra-theme-docs/style.css'
import { Analytics } from '@vercel/analytics/react'
import Logo from '../components/Logo/Logo'
export const metadata = {
title: {
default: 'LearnHouse Docs',
template: '%s – LearnHouse Docs',
},
description: 'The next-gen open source learning software',
metadataBase: new URL('https://docs.learnhouse.app'),
openGraph: {
type: 'website',
locale: 'en_US',
url: 'https://docs.learnhouse.app',
siteName: 'LearnHouse Docs',
images: [
{
url: 'https://docs.learnhouse.app/img/og.png',
alt: 'LearnHouse Docs',
width: 1512,
height: 687,
},
],
},
twitter: {
creator: '@getlearnhouse',
site: '@getlearnhouse',
card: 'summary_large_image',
},
icons: {
icon: [
{ url: '/favicons/favicon-32x32.png', sizes: '32x32', type: 'image/png' },
{ url: '/favicons/favicon-16x16.png', sizes: '16x16', type: 'image/png' },
],
apple: '/favicons/apple-touch-icon.png',
},
manifest: '/favicons/site.webmanifest',
}
const navbar = <Navbar logo={<Logo />} projectLink="https://github.com/learnhouse/learnhouse" chatLink="https://discord.gg/CMyZjjYZ6x" />
const footer = <Footer>MIT {new Date().getFullYear()} © LearnHouse.</Footer>
export default async function RootLayout({ children }) {
return (
<html lang="en" dir="ltr" suppressHydrationWarning>
<Head />
<body>
<Layout
navbar={navbar}
footer={footer}
pageMap={await getPageMap()}
docsRepositoryBase="https://github.com/learnhouse/docs/tree/main"
sidebar={{ defaultMenuCollapseLevel: 2 }}
>
{children}
</Layout>
<Analytics />
</body>
</html>
)
}

View File

@@ -1,3 +1,5 @@
'use client'
import Image from "next/image";
import React from "react";

View File

@@ -1,4 +1,4 @@
import { Callout } from "nextra-theme-docs";
import { Callout } from 'nextra/components';
import Image from "next/image";
# Infrastructure Overview

View File

@@ -1,5 +1,5 @@
import Image from 'next/image'
import { Callout } from 'nextra-theme-docs'
import { Callout } from 'nextra/components'
# Collections

View File

@@ -1,5 +1,5 @@
import { Callout } from 'nextra-theme-docs'
import { Card, Cards } from 'nextra-theme-docs'
import { Callout } from 'nextra/components'
import { Cards } from 'nextra/components'
import Image from 'next/image'
# Courses
@@ -13,21 +13,21 @@ There is a wide variety of Activities types to choose from, and we are constantl
<Cards>
<Card icon={<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
<Cards.Card icon={<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9" />
</svg>
} title="Videos" href="/features/activities/videos">
</Card>
<Card icon={<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
</Cards.Card>
<Cards.Card icon={<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9" />
</svg>
} title="Dynamic Pages" href="/features/activities/dynamic-pages">
</Card>
<Card icon={<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
</Cards.Card>
<Cards.Card icon={<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
<path strokeLinecap="round" strokeLinejoin="round" d="M21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9" />
</svg>
} title="Documents" href="/features/activities/documents">
</Card>
</Cards.Card>
</Cards>
Courses can be part of a Collection, saving users time and effort by accessing all relevant courses in one place, instead of having to search for them individually. In addition, collections can serve as a tool for instructors and administrators to provide a more structured and coherent learning experience to their learners, by grouping courses in a logical and meaningful way.

View File

@@ -1,5 +1,5 @@
import { Callout } from 'nextra-theme-docs'
import { Card, Cards } from 'nextra-theme-docs'
import { Callout } from 'nextra/components'
import { Cards } from 'nextra/components'
import Image from 'next/image'
# Trails

View File

@@ -1,4 +1,4 @@
import { Callout } from 'nextra-theme-docs'
import { Callout } from 'nextra/components'
# S3

View File

@@ -1,4 +1,4 @@
import { Callout } from 'nextra-theme-docs'
import { Callout } from 'nextra/components'
# Self Hosting Guide

View File

@@ -1,4 +1,4 @@
import { Callout } from "nextra-theme-docs";
import { Callout } from 'nextra/components';
import Image from "next/image";
# Organization Hosting Modes

View File

@@ -1,5 +1,5 @@
import { Callout } from "nextra-theme-docs";
import { Steps } from "nextra-theme-docs";
import { Callout } from 'nextra/components';
import { Steps } from 'nextra/components';
# Setting up a Dev environment

8
mdx-components.jsx Normal file
View File

@@ -0,0 +1,8 @@
import { useMDXComponents as getDocsMDXComponents } from 'nextra-theme-docs'
export function useMDXComponents(components) {
return {
...getDocsMDXComponents(),
...components,
}
}

View File

@@ -1,9 +0,0 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.jsx',
})
module.exports = withNextra()
// If you have other Next.js configurations, you can pass them as the parameter:
// module.exports = withNextra({ /* other next.js config */ })

5
next.config.mjs Normal file
View File

@@ -0,0 +1,5 @@
import nextra from 'nextra'
const withNextra = nextra({})
export default withNextra({})

6007
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -9,17 +9,17 @@
"lint": "next lint"
},
"dependencies": {
"@react-aria/ssr": "^3.9.10",
"@vercel/analytics": "^1.6.1",
"next": "15.5.7",
"@vercel/analytics": "^2.0.1",
"next": "16.1.6",
"next-sitemap": "^4.2.3",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"nextra": "^4.6.1",
"nextra-theme-docs": "^4.6.1",
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
"devDependencies": {
"@types/node": "25.0.3",
"typescript": "5.8.2"
"@types/node": "25.5.0",
"@types/react": "19.2.14",
"typescript": "5.9.3"
}
}

View File

@@ -1,8 +0,0 @@
import { Analytics } from '@vercel/analytics/react';
export default function App({ Component, pageProps }) {
return <>
<Component {...pageProps} />
<Analytics />
</>
}

3415
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,57 +0,0 @@
import Logo from "./components/Logo/Logo";
export default {
logo: <Logo />,
project: {
link: "https://github.com/learnhouse/learnhouse",
},
docsRepositoryBase: "https://github.com/learnhouse/docs/tree/main",
chat: {
link: "https://discord.gg/CMyZjjYZ6x",
},
head: (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="LearnHouse Docs" />
<meta property="og:description" content="The next-gen open source learning software" />
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png" />
<link rel="manifest" href="/favicons/site.webmanifest" />
</>
),
footer: {
text: <span>{new Date().getFullYear()} © LearnHouse.</span>,
},
sidebar: {
defaultMenuCollapseLevel: 2,
},
useNextSeoProps() {
return {
titleTemplate: "%s – LearnHouse Docs",
canonical: "https://docs.learnhouse.app",
description: "The next-gen open source learning software",
openGraph: {
type: "website",
locale: "en_US",
url: "https://docs.learnhouse.app",
site_name: "LearnHouse Docs",
images: [
{
url: "https://docs.learnhouse.app/img/og.png",
alt: "LearnHouse Docs",
width: 1512,
height: 687,
},
],
},
twitter: {
handle: "@getlearnhouse",
site: "@getlearnhouse",
cardType: "summary_large_image",
},
};
},
};

View File

@@ -13,16 +13,23 @@
"incremental": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"target": "ES2017"
"jsx": "react-jsx",
"target": "ES2017",
"plugins": [
{
"name": "next"
}
]
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx"
"**/*.tsx",
".next/types/**/*.ts",
".next/dev/types/**/*.ts"
],
"exclude": [
"node_modules"