diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 2724a48..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,16 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file - -version: 2 -updates: - - package-ecosystem: "npm" # See documentation for possible values - directory: "/" # Location of package manifests - labels: - - "dependencies" - - "npm" - reviewers: - - "swve" - schedule: - interval: "monthly" diff --git a/.github/images/learnhouse-github.png b/.github/images/learnhouse-github.png new file mode 100644 index 0000000..a0007b5 Binary files /dev/null and b/.github/images/learnhouse-github.png differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..3668f27 --- /dev/null +++ b/README.md @@ -0,0 +1,58 @@ +

+ + LearnHouse + +

+ +

+ LearnHouse Documentation +

+ +

+ Official documentation for LearnHouse, the open-source learning management system. +

+ +

+ docs.learnhouse.app +

+ +--- + +## Local Development + +**Prerequisites:** [Bun](https://bun.sh) installed. + +```bash +# Install dependencies +bun install + +# Start the dev server +bun dev +``` + +The site will be available at `http://localhost:3000`. + +## Project Structure + +``` +content/ # MDX documentation pages + getting-started/ + platform/ + self-hosting/ + developers/ + enterprise/ +app/ # Next.js App Router +components/ # React components +public/ # Static assets +scripts/ # Build scripts +``` + +## Built With + +- [Next.js](https://nextjs.org) +- [Nextra](https://nextra.site) +- [Tailwind CSS](https://tailwindcss.com) + +## License + +MIT - see [LICENSE](LICENSE) for details. diff --git a/app/[[...mdxPath]]/page.jsx b/app/[[...mdxPath]]/page.jsx index 9655fb2..b6928f2 100644 --- a/app/[[...mdxPath]]/page.jsx +++ b/app/[[...mdxPath]]/page.jsx @@ -3,10 +3,18 @@ import { useMDXComponents as getMDXComponents } from '../../mdx-components' export const generateStaticParams = generateStaticParamsFor('mdxPath') +const SITE_URL = 'https://docs.learnhouse.app' + export async function generateMetadata(props) { const params = await props.params const { metadata } = await importPage(params.mdxPath) - return metadata + const path = params.mdxPath ? `/${params.mdxPath.join('/')}` : '' + return { + ...metadata, + alternates: { + canonical: `${SITE_URL}${path}`, + }, + } } const Wrapper = getMDXComponents().wrapper @@ -14,9 +22,33 @@ const Wrapper = getMDXComponents().wrapper export default async function Page(props) { const params = await props.params const { default: MDXContent, toc, metadata } = await importPage(params.mdxPath) + const path = params.mdxPath ? `/${params.mdxPath.join('/')}` : '' + + const articleJsonLd = { + '@context': 'https://schema.org', + '@type': 'TechArticle', + headline: metadata.title || 'LearnHouse Docs', + url: `${SITE_URL}${path}`, + publisher: { + '@type': 'Organization', + name: 'LearnHouse', + url: 'https://learnhouse.app', + }, + isPartOf: { + '@type': 'WebSite', + url: SITE_URL, + }, + } + return ( - - - + <> +