added quartz wiki
This commit is contained in:
4
quartz-setup/.dockerignore
Executable file
4
quartz-setup/.dockerignore
Executable file
@@ -0,0 +1,4 @@
|
||||
node_modules
|
||||
.next
|
||||
.git
|
||||
|
||||
36
quartz-setup/Dockerfile
Executable file
36
quartz-setup/Dockerfile
Executable file
@@ -0,0 +1,36 @@
|
||||
FROM node:22-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install git (needed for cloning Quartz)
|
||||
RUN apk add --no-cache git
|
||||
|
||||
# Update npm to latest version
|
||||
RUN npm install -g npm@latest
|
||||
|
||||
# Clone Quartz repository
|
||||
RUN git clone https://github.com/jackyzha0/quartz.git quartz-repo
|
||||
|
||||
# Move into Quartz directory
|
||||
WORKDIR /app/quartz-repo
|
||||
|
||||
# Install Quartz dependencies
|
||||
RUN npm install
|
||||
|
||||
# Install serve for static file serving
|
||||
RUN npm install -g serve
|
||||
|
||||
# Create directories for content and output
|
||||
RUN mkdir -p /app/content /app/public
|
||||
|
||||
# Copy entrypoint script
|
||||
COPY entrypoint.sh /app/entrypoint.sh
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8080
|
||||
|
||||
# Set working directory back to app root
|
||||
WORKDIR /app
|
||||
|
||||
CMD ["/app/entrypoint.sh"]
|
||||
145
quartz-setup/entrypoint.sh
Executable file
145
quartz-setup/entrypoint.sh
Executable file
@@ -0,0 +1,145 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Starting Quartz Wiki..."
|
||||
|
||||
# Check if content directory has files
|
||||
if [ -z "$(ls -A /app/content 2>/dev/null)" ]; then
|
||||
echo "Warning: Content directory is empty!"
|
||||
# Create a default index page
|
||||
mkdir -p /app/content
|
||||
echo "# Wiki Home
|
||||
|
||||
Willkommen im doing-it Wiki!
|
||||
|
||||
Dieses Wiki wird mit Obsidian Quartz betrieben.
|
||||
" > /app/content/index.md
|
||||
fi
|
||||
|
||||
# Copy content to Quartz content directory
|
||||
echo "Copying vault content to Quartz..."
|
||||
mkdir -p /app/quartz-repo/content
|
||||
cp -r /app/content/* /app/quartz-repo/content/ 2>/dev/null || true
|
||||
|
||||
# Build Quartz
|
||||
echo "Building Quartz site..."
|
||||
cd /app/quartz-repo
|
||||
|
||||
# Build the site with default Quartz setup
|
||||
npx quartz build 2>&1 || {
|
||||
echo "Default Quartz build failed, trying alternative method..."
|
||||
# Try building with explicit paths
|
||||
npx quartz build --contentDir ./content --outputDir /app/public 2>&1 || {
|
||||
echo "Default build also failed, creating fallback static site..."
|
||||
|
||||
# Create fallback static site
|
||||
mkdir -p /app/public
|
||||
cd /app/content
|
||||
|
||||
# Create index.html
|
||||
cat > /app/public/index.html << 'EOFHTML'
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>doing-it Wiki</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
|
||||
background: #161618;
|
||||
color: #ebebec;
|
||||
line-height: 1.6;
|
||||
padding: 40px 20px;
|
||||
}
|
||||
.container {
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
h1 {
|
||||
font-size: 48px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 20px;
|
||||
color: #ebebec;
|
||||
}
|
||||
h2 {
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
margin: 40px 0 20px;
|
||||
color: #ebebec;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
margin: 15px 0;
|
||||
}
|
||||
a {
|
||||
color: #ff3b30;
|
||||
text-decoration: none;
|
||||
font-size: 18px;
|
||||
transition: color 0.3s;
|
||||
display: inline-block;
|
||||
}
|
||||
a:hover {
|
||||
color: #ff453a;
|
||||
}
|
||||
.intro {
|
||||
font-size: 20px;
|
||||
color: #d4d4d4;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.content-preview {
|
||||
background: #1c1c1e;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>doing-it Wiki</h1>
|
||||
<p class="intro">Willkommen im doing-it Wiki! Hier finden Sie nützliche Informationen rund um IT-Weiterbildung und Schulungen.</p>
|
||||
<h2>Inhalte</h2>
|
||||
<ul id="content-list">
|
||||
EOFHTML
|
||||
|
||||
# Find all markdown files and create links
|
||||
find /app/content -name "*.md" -type f | while read file; do
|
||||
title=$(basename "$file" .md)
|
||||
relative_path=$(echo "$file" | sed "s|/app/content/||")
|
||||
echo " <li><a href=\"/$relative_path\">$title</a></li>" >> /app/public/index.html
|
||||
done
|
||||
|
||||
echo " </ul>" >> /app/public/index.html
|
||||
echo " </div>" >> /app/public/index.html
|
||||
echo "</body>" >> /app/public/index.html
|
||||
echo "</html>" >> /app/public/index.html
|
||||
|
||||
# Copy markdown files to public
|
||||
cp -r /app/content/* /app/public/ 2>/dev/null || true
|
||||
}
|
||||
}
|
||||
|
||||
# If Quartz build succeeded, check if public directory exists
|
||||
if [ -d "/app/quartz-repo/public" ] && [ -n "$(ls -A /app/quartz-repo/public 2>/dev/null)" ]; then
|
||||
echo "Copying Quartz output to public directory..."
|
||||
cp -r /app/quartz-repo/public/* /app/public/ 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Ensure public directory exists
|
||||
if [ ! -d "/app/public" ] || [ -z "$(ls -A /app/public 2>/dev/null)" ]; then
|
||||
echo "Error: Public directory is empty, creating minimal site..."
|
||||
mkdir -p /app/public
|
||||
echo "<!DOCTYPE html><html><head><meta charset='UTF-8'><title>doing-it Wiki</title></head><body><h1>doing-it Wiki</h1><p>Wiki wird geladen...</p></body></html>" > /app/public/index.html
|
||||
fi
|
||||
|
||||
echo "Build complete. Starting server on port 8080..."
|
||||
cd /app
|
||||
serve -s public -l 8080
|
||||
18
quartz-setup/init-quartz.sh
Executable file
18
quartz-setup/init-quartz.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Initialize Quartz
|
||||
echo "Initializing Quartz..."
|
||||
npx @jackyzha0/quartz create --help
|
||||
|
||||
# Copy vault content to content directory
|
||||
if [ -d "/vault" ]; then
|
||||
echo "Copying vault content..."
|
||||
cp -r /vault/* ./content/ 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Build Quartz
|
||||
echo "Building Quartz site..."
|
||||
npx quartz build
|
||||
|
||||
echo "Quartz build complete!"
|
||||
|
||||
21
quartz-setup/nginx.conf
Executable file
21
quartz-setup/nginx.conf
Executable file
@@ -0,0 +1,21 @@
|
||||
server {
|
||||
listen 8080;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ $uri.html /index.html;
|
||||
}
|
||||
|
||||
# Enable gzip compression
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# Cache static assets
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
|
||||
16
quartz-setup/package.json
Executable file
16
quartz-setup/package.json
Executable file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"name": "quartz-wiki",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "quartz build",
|
||||
"watch": "quartz watch",
|
||||
"sync": "quartz sync"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jackyzha0/quartz": "^4.4.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"serve": "^14.2.1"
|
||||
}
|
||||
}
|
||||
12
quartz-setup/public/Home.md
Executable file
12
quartz-setup/public/Home.md
Executable file
@@ -0,0 +1,12 @@
|
||||
# Wiki Home
|
||||
|
||||
Willkommen im doing-it Wiki!
|
||||
|
||||
Dieses Wiki enthält nützliche Informationen rund um IT-Weiterbildung, Schulungen und mehr.
|
||||
|
||||
## Übersicht
|
||||
|
||||
- [[IT-Grundlagen]]
|
||||
- [[Schulungsmethoden]]
|
||||
- [[Ressourcen]]
|
||||
|
||||
23
quartz-setup/public/IT-Grundlagen.md
Executable file
23
quartz-setup/public/IT-Grundlagen.md
Executable file
@@ -0,0 +1,23 @@
|
||||
# IT-Grundlagen
|
||||
|
||||
## Einführung
|
||||
|
||||
Hier finden Sie grundlegende Informationen zu IT-Konzepten und Technologien.
|
||||
|
||||
## Themenbereiche
|
||||
|
||||
### Netzwerke
|
||||
- Grundlagen der Netzwerkarchitektur
|
||||
- TCP/IP Protokolle
|
||||
- Firewall-Konfiguration
|
||||
|
||||
### Betriebssysteme
|
||||
- Linux
|
||||
- Windows Server
|
||||
- Virtualisierung
|
||||
|
||||
## Weiterführende Links
|
||||
|
||||
- [[Home]]
|
||||
- [[Ressourcen]]
|
||||
|
||||
24
quartz-setup/public/Ressourcen.md
Executable file
24
quartz-setup/public/Ressourcen.md
Executable file
@@ -0,0 +1,24 @@
|
||||
# Ressourcen
|
||||
|
||||
## Lernmaterialien
|
||||
|
||||
### Bücher
|
||||
- Empfohlene Fachliteratur
|
||||
- Online-Ressourcen
|
||||
|
||||
### Tools
|
||||
- Software für IT-Schulungen
|
||||
- Virtualisierungstools
|
||||
- Entwicklungsumgebungen
|
||||
|
||||
### Community
|
||||
- Foren und Diskussionsgruppen
|
||||
- Online-Kurse
|
||||
- Zertifizierungen
|
||||
|
||||
## Siehe auch
|
||||
|
||||
- [[IT-Grundlagen]]
|
||||
- [[Schulungsmethoden]]
|
||||
- [[Home]]
|
||||
|
||||
22
quartz-setup/public/Schulungsmethoden.md
Executable file
22
quartz-setup/public/Schulungsmethoden.md
Executable file
@@ -0,0 +1,22 @@
|
||||
# Schulungsmethoden
|
||||
|
||||
## Moderne Ansätze der IT-Schulung
|
||||
|
||||
### Praxisorientierte Schulungen
|
||||
- Hands-on Workshops
|
||||
- Real-world Szenarien
|
||||
- Projektbasierter Unterricht
|
||||
|
||||
### Blended Learning
|
||||
- Online-Materialien
|
||||
- Präsenzveranstaltungen
|
||||
- Selbstlernphasen
|
||||
|
||||
## Vorteile
|
||||
|
||||
1. Bessere Wissensretention
|
||||
2. Praktische Anwendbarkeit
|
||||
3. Flexibilität für Teilnehmer
|
||||
|
||||
[[Home]]
|
||||
|
||||
79
quartz-setup/public/index.html
Executable file
79
quartz-setup/public/index.html
Executable file
@@ -0,0 +1,79 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>doing-it Wiki</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
|
||||
background: #161618;
|
||||
color: #ebebec;
|
||||
line-height: 1.6;
|
||||
padding: 40px 20px;
|
||||
}
|
||||
.container {
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
h1 {
|
||||
font-size: 48px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 20px;
|
||||
color: #ebebec;
|
||||
}
|
||||
h2 {
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
margin: 40px 0 20px;
|
||||
color: #ebebec;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
margin: 15px 0;
|
||||
}
|
||||
a {
|
||||
color: #ff3b30;
|
||||
text-decoration: none;
|
||||
font-size: 18px;
|
||||
transition: color 0.3s;
|
||||
display: inline-block;
|
||||
}
|
||||
a:hover {
|
||||
color: #ff453a;
|
||||
}
|
||||
.intro {
|
||||
font-size: 20px;
|
||||
color: #d4d4d4;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.content-preview {
|
||||
background: #1c1c1e;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>doing-it Wiki</h1>
|
||||
<p class="intro">Willkommen im doing-it Wiki! Hier finden Sie nützliche Informationen rund um IT-Weiterbildung und Schulungen.</p>
|
||||
<h2>Inhalte</h2>
|
||||
<ul id="content-list">
|
||||
<li><a href="/Home.md">Home</a></li>
|
||||
<li><a href="/IT-Grundlagen.md">IT-Grundlagen</a></li>
|
||||
<li><a href="/Ressourcen.md">Ressourcen</a></li>
|
||||
<li><a href="/Schulungsmethoden.md">Schulungsmethoden</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
89
quartz-setup/quartz.config.ts
Executable file
89
quartz-setup/quartz.config.ts
Executable file
@@ -0,0 +1,89 @@
|
||||
import { QuartzConfig } from "./quartz/cfg"
|
||||
import * as Plugin from "./quartz/plugins"
|
||||
|
||||
/**
|
||||
* Quartz 4.0 Configuration
|
||||
*
|
||||
* See https://quartz.jzhao.xyz/configuration for more information.
|
||||
*/
|
||||
const config: QuartzConfig = {
|
||||
configuration: {
|
||||
pageTitle: "doing-it Wiki",
|
||||
enableSPA: true,
|
||||
enablePopovers: true,
|
||||
analytics: null,
|
||||
locale: "de-DE",
|
||||
baseUrl: "wiki",
|
||||
ignorePatterns: ["private", "templates", ".obsidian"],
|
||||
defaultDateType: "created",
|
||||
theme: {
|
||||
fontOrigin: "googleFonts",
|
||||
cdnCaching: true,
|
||||
typography: {
|
||||
header: "Schibsted Grotesk",
|
||||
body: "Source Sans Pro",
|
||||
code: "IBM Plex Mono",
|
||||
},
|
||||
colors: {
|
||||
lightMode: {
|
||||
light: "#faf8f8",
|
||||
lightgray: "#e5e5e5",
|
||||
gray: "#b8b8b8",
|
||||
darkgray: "#4e4e4e",
|
||||
dark: "#2b2b2b",
|
||||
secondary: "#284b63",
|
||||
tertiary: "#84a59d",
|
||||
highlight: "rgba(143, 159, 169, 0.15)",
|
||||
},
|
||||
darkMode: {
|
||||
light: "#161618",
|
||||
lightgray: "#393639",
|
||||
gray: "#646464",
|
||||
darkgray: "#d4d4d4",
|
||||
dark: "#ebebec",
|
||||
secondary: "#7b97aa",
|
||||
tertiary: "#84a59d",
|
||||
highlight: "rgba(143, 159, 169, 0.15)",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
transformers: [
|
||||
Plugin.FrontMatter({ delimiters: "---" }),
|
||||
Plugin.CreatedModifiedDate({
|
||||
priority: ["frontmatter", "filesystem"],
|
||||
}),
|
||||
Plugin.SyntaxHighlighting({
|
||||
theme: {
|
||||
light: "github-light",
|
||||
dark: "github-dark",
|
||||
},
|
||||
keepBackground: false,
|
||||
}),
|
||||
Plugin.ObsidianFlavoredMarkdown({ enableInHtmlEmbed: false }),
|
||||
Plugin.GitHubFlavoredMarkdown(),
|
||||
Plugin.CrawlLinks({ markdownLinkResolution: "shortest" }),
|
||||
Plugin.Latex({ renderEngine: "katex" }),
|
||||
Plugin.Description(),
|
||||
],
|
||||
filters: [Plugin.RemoveDrafts()],
|
||||
emitters: [
|
||||
Plugin.AliasRedirects(),
|
||||
Plugin.ComponentResources(),
|
||||
Plugin.ContentPage(),
|
||||
Plugin.FolderPage(),
|
||||
Plugin.TagPage(),
|
||||
Plugin.ContentIndex({
|
||||
enableSiteMap: true,
|
||||
enableRSS: true,
|
||||
}),
|
||||
Plugin.Assets(),
|
||||
Plugin.Static(),
|
||||
Plugin.NotFoundPage(),
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
export default config
|
||||
|
||||
Reference in New Issue
Block a user