Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #37 from Dino-Kupinic/18-setup-documentation
Browse files Browse the repository at this point in the history
feat(wip): added index page for docs
  • Loading branch information
Dino-Kupinic authored Mar 18, 2024
2 parents 5c025f4 + 74f0386 commit 4ad6f9c
Show file tree
Hide file tree
Showing 28 changed files with 435 additions and 179 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ backend/.env
frontend/.env
/docs/.vitepress/cache/
/docs/.vitepress/dist/
/docs/node_modules
28 changes: 0 additions & 28 deletions docs/.vitepress/config.mts

This file was deleted.

12 changes: 12 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import {defineConfig} from "vitepress"
import {shared} from "./shared"
import {en} from "./en"
import {de} from "./de"

export default defineConfig({
...shared,
locales: {
root: {label: "English", ...en},
de: {label: "Deutsch", ...de},
},
})
117 changes: 117 additions & 0 deletions docs/.vitepress/de.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import {DefaultTheme, defineConfig} from "vitepress"
import {FooterTranslations} from "vitepress/types/local-search"

export const de = defineConfig({
lang: "de-DE",
description: "Offizielle Schulbuchaktion Dokumentation",
themeConfig: {
nav: nav(),
sidebar: {
"/de/users/": {
base: "/de/users/",
items: sidebarUsers(),
},
"/de/developers/": {
base: "/de/developers/",
items: sidebarDevelopers(),
},
},
footer: {
message: "Veröffentlicht unter der MIT Lizenz.",
copyright: "Copyright © 2024-jetzt Nixx Labs",
},
docFooter: {
prev: "Vorheriges",
next: "Nächstes",
},
},
})

function nav(): DefaultTheme.NavItem[] {
return [
{
text: "Home",
link: "/de/",
},
{
text: "Nutzer",
link: "/de/users/getting-started",
},
{
text: "Entwickler",
link: "/de/developers/setup",
},
]
}

function sidebarUsers(): DefaultTheme.SidebarItem[] {
return [
{
text: "Einführung",
collapsed: false,
items: [
{text: "Erste Schritte", link: "getting-started"},
{text: "Authentifizierung", link: "auth"},
{text: "Hilfe", link: "help"},
],
},
{
text: "Anpassung",
collapsed: false,
items: [
{
text: "Die Farben ändern",
link: "theme-colors",
},
{
text: "Zwischen Hell und Dunkel wechseln",
link: "light-dark-mode",
},
{
text: "Sprache",
link: "language-settings",
},
],
},
]
}

function sidebarDevelopers(): DefaultTheme.SidebarItem[] {
return [
{
text: "Authentifizierung",
collapsed: false,
items: [
{
text: "LDAP",
link: "ldap",
},
],
},
]
}

export const search: DefaultTheme.LocalSearchOptions["locales"] = {
de: {
translations: {
button: {
buttonText: "Suchen",
buttonAriaLabel: "Suchen",
},
modal: {
displayDetails: "Details anzeigen",
resetButtonTitle: "Zurücksetzen",
backButtonTitle: "Zurück",
noResultsText: "Keine Resultate",
footer: {
selectText: "Auswählen",
navigateText: "Navigieren",
navigateUpKeyAriaLabel: "Nach oben",
navigateDownKeyAriaLabel: "Nach unten",
closeText: "Schließen",
closeKeyAriaLabel: "Schließen",
},
},
},
},
}
87 changes: 87 additions & 0 deletions docs/.vitepress/en.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import {DefaultTheme, defineConfig} from "vitepress"

export const en = defineConfig({
lang: "en-US",
description: "Official Schulbuchaktion Documentation",
themeConfig: {
nav: nav(),
sidebar: {
"/users/": {
base: "/users/",
items: sidebarUsers(),
},
"/developers/": {
base: "/developers/",
items: sidebarDevelopers(),
},
},
footer: {
message: "Released under the MIT License.",
copyright: "Copyright © 2024-present Nixx Labs",
},
},
})

function nav(): DefaultTheme.NavItem[] {
return [
{
text: "Home",
link: "/",
},
{
text: "Users",
link: "/users/getting-started",
},
{
text: "Developers",
link: "/developers/setup",
},
]
}

function sidebarUsers(): DefaultTheme.SidebarItem[] {
return [
{
text: "Introduction",
collapsed: false,
items: [
{text: "Getting Started", link: "getting-started"},
{text: "Authentication", link: "auth"},
{text: "Getting help", link: "help"},
],
},
{
text: "Customization",
collapsed: false,
items: [
{
text: "Changing the theme colors",
link: "theme-colors",
},
{
text: "Altering between light and dark mode",
link: "light-dark-mode",
},
{
text: "Language",
link: "language-settings",
},
],
},
]
}

function sidebarDevelopers(): DefaultTheme.SidebarItem[] {
return [
{
text: "Authentication",
collapsed: false,
items: [
{
text: "LDAP",
link: "ldap",
},
],
},
]
}
33 changes: 33 additions & 0 deletions docs/.vitepress/shared.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {defineConfig} from "vitepress"
import {search as deSearch} from "./de"

export const shared = defineConfig({
title: "Schulbuchaktion",
sitemap: {
hostname: "https://schulbuchaktion-docs.vercel.app",
},
head: [
["meta", {property: "og:type", content: "website"}],
["meta", {property: "og:locale", content: "en"}],
["meta", {property: "og:title", content: "Schulbuchaktion | Official Schulbuchaktion Documentation"}],
["meta", {property: "og:site_name", content: "Schulbuchaktion"}],
["meta", {property: "og:url", content: "https://schulbuchaktion-docs.vercel.app/"}],
],
themeConfig: {
logo: {
src: "/assets/htl-logo.svg",
},
socialLinks: [
{
icon: "github",
link: "https://github.com/Dino-Kupinic/Schulbuchaktion.git",
},
],
search: {
provider: "local",
options: {
locales: {...deSearch},
},
},
},
})
49 changes: 0 additions & 49 deletions docs/api-examples.md

This file was deleted.

32 changes: 32 additions & 0 deletions docs/assets/htl-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/de/developers/ldap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# LDAP
Empty file added docs/de/developers/setup.md
Empty file.
Loading

0 comments on commit 4ad6f9c

Please sign in to comment.