--- // HomePage.astro // Premium homepage for LaForceIT tech blog import BaseLayout from '../layouts/BaseLayout.astro'; import Header from '../components/Header.astro'; import Footer from '../components/Footer.astro'; import Terminal from '../components/Terminal.astro'; import KnowledgeGraph from '../components/KnowledgeGraph.astro'; import { getCollection } from 'astro:content'; // Get all blog entries const allPosts = await getCollection('posts'); // Sort by publication date const sortedPosts = allPosts.sort((a, b) => { const dateA = a.data.pubDate ? new Date(a.data.pubDate) : new Date(0); const dateB = b.data.pubDate ? new Date(b.data.pubDate) : new Date(0); return dateB.getTime() - dateA.getTime(); }); // Get recent posts (latest 4) const recentPosts = sortedPosts.slice(0, 4); // Prepare terminal commands const terminalCommands = [ { prompt: "[laforceit@argobox]$ ", command: "ls -la ./infrastructure", output: [ "total 20", "drwxr-xr-x 5 laforceit users 4096 Apr 23 09:15 kubernetes/", "drwxr-xr-x 3 laforceit users 4096 Apr 20 17:22 docker/", "drwxr-xr-x 2 laforceit users 4096 Apr 19 14:30 networking/", "drwxr-xr-x 4 laforceit users 4096 Apr 22 21:10 monitoring/", "drwxr-xr-x 3 laforceit users 4096 Apr 21 16:45 storage/", ] }, { prompt: "[laforceit@argobox]$ ", command: "find ./posts -type f -name \"*.md\" | wc -l", output: [`${allPosts.length} posts found`] }, { prompt: "[laforceit@argobox]$ ", command: "kubectl get nodes", output: [ "NAME STATUS ROLES AGE VERSION", "argobox-cp1 Ready control-plane,master 92d v1.27.3", "argobox-cp2 Ready control-plane,master 92d v1.27.3", "argobox-cp3 Ready control-plane,master 92d v1.27.3", "argobox-node1 Ready worker 92d v1.27.3", "argobox-node2 Ready worker 92d v1.27.3" ] } ]; // Prepare graph data for knowledge map // Extract categories and tags from posts const categories = [...new Set(allPosts.map(post => post.data.category || 'Uncategorized'))]; const allTags = [...new Set(allPosts.flatMap(post => post.data.tags || []))]; // Prepare graph nodes (posts) const graphNodes = allPosts.map(post => ({ id: post.slug, label: post.data.title, category: post.data.category || 'Uncategorized', tags: post.data.tags || [] })); // Create edges between posts with similar tags or categories const graphEdges = []; for (let i = 0; i < graphNodes.length; i++) { const postA = graphNodes[i]; for (let j = i + 1; j < graphNodes.length; j++) { const postB = graphNodes[j]; // Create edge if posts share at least one tag or same category const sharedTags = postA.tags.filter(tag => postB.tags.includes(tag)); if (sharedTags.length > 0 || postA.category === postB.category) { graphEdges.push({ source: postA.id, target: postB.id, strength: sharedTags.length + (postA.category === postB.category ? 1 : 0) }); } } } const graphData = { nodes: graphNodes, edges: graphEdges }; // Featured services const services = [ { title: "Kubernetes Configurations", description: "Production-ready Kubernetes manifests for deploying applications at scale.", icon: "server", link: "/resources/kubernetes" }, { title: "Docker Compose Templates", description: "Ready-to-use compose files for quickly deploying services in your home lab.", icon: "box", link: "/resources/docker-compose" }, { title: "Infrastructure Guides", description: "Step-by-step tutorials for setting up enterprise-grade home infrastructure.", icon: "layers", link: "/resources/infrastructure" }, { title: "Monitoring Solutions", description: "End-to-end monitoring stacks for keeping an eye on your systems.", icon: "activity", link: "/resources/monitoring" } ]; // Tech stack items const techStack = [ { name: "Kubernetes", icon: "https://cdn.simpleicons.org/kubernetes/326CE5" }, { name: "Docker", icon: "https://cdn.simpleicons.org/docker/2496ED" }, { name: "Prometheus", icon: "https://cdn.simpleicons.org/prometheus/E6522C" }, { name: "Ansible", icon: "https://cdn.simpleicons.org/ansible/EE0000" }, { name: "Terraform", icon: "https://cdn.simpleicons.org/terraform/7B42BC" }, { name: "ArgoCD", icon: "https://cdn.simpleicons.org/argo/EF7B4D" }, { name: "GitHub", icon: "https://cdn.simpleicons.org/github/181717" }, { name: "Grafana", icon: "https://cdn.simpleicons.org/grafana/F46800" }, ]; ---
Technical Articles & Guides

Exploring advanced
infrastructure and automation

Dive into enterprise-grade home lab setups, Kubernetes deployments, and DevOps best practices for the modern tech enthusiast.

{techStack.map((tech) => (
{tech.name} {tech.name}
))} {/* Duplicate for infinite scrolling */} {techStack.map((tech) => (
{tech.name} {tech.name}
))}

Knowledge Graph

Explore connections between articles based on topics and categories

Ready to upgrade your home lab?

Get access to premium resources, configuration templates, and step-by-step guides to take your infrastructure to the next level.