chore: migrate hosting documentation from Appwrite to self-hosted
Update README.md and astro.config.mjs to reflect the migration from Appwrite to self-hosted infrastructure. Remove Appwrite-specific environment variable schema from Astro config. Add .clinerules and .cline to .gitignore.
This commit is contained in:
1 parent
d86f78fead
commit
ac545c4668
53 files changed
+4109
-5117
No files matched your search
@@ -1,33 +1,25 @@
|
||||
---
|
||||
import { getCollection } from "astro:content"
|
||||
import PageLayout from "@layouts/PageLayout.astro"
|
||||
import TopLayout from "@layouts/TopLayout.astro"
|
||||
import BottomLayout from "@layouts/BottomLayout.astro"
|
||||
import Projects from "@components/Projects"
|
||||
import { PROJECTS } from "@consts"
|
||||
import { getProjectsPaginated } from "@lib/appwrite-service"
|
||||
|
||||
|
||||
// Get page and limit from URL parameters
|
||||
const url = new URL(typeof window !== 'undefined' ? window.location.href : 'https://home.spaghet.io')
|
||||
const pageParam = url.searchParams.get('page') || '1'
|
||||
const limitParam = url.searchParams.get('limit') || '10'
|
||||
const page = parseInt(pageParam)
|
||||
const limit = parseInt(limitParam)
|
||||
|
||||
// Fetch paginated projects
|
||||
const { posts } = await getProjectsPaginated(page, limit)
|
||||
.then(result => {
|
||||
console.log(result)
|
||||
return result;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("Error fetching projects:", error);
|
||||
return { posts: [], total: 0 };
|
||||
})
|
||||
|
||||
// Get all tags for filtering
|
||||
const tags = [...new Set(posts.flatMap(project => project.tags))]
|
||||
.sort((a, b) => a.localeCompare(b))
|
||||
const entries = await getCollection("projects", ({ data }) => !data.draft)
|
||||
const posts = entries.map((entry) => ({
|
||||
id: entry.id,
|
||||
slug: entry.id,
|
||||
title: entry.data.title,
|
||||
summary: entry.data.summary,
|
||||
date: entry.data.date.toISOString(),
|
||||
tags: entry.data.tags,
|
||||
draft: entry.data.draft,
|
||||
content: entry.body ?? "",
|
||||
demoUrl: entry.data.demoUrl,
|
||||
repoUrl: entry.data.repoUrl,
|
||||
}))
|
||||
const tags = Array.from(new Set(posts.flatMap((p) => p.tags)))
|
||||
---
|
||||
|
||||
<PageLayout title={PROJECTS.TITLE} description={PROJECTS.DESCRIPTION}>
|
||||
|
||||
Reference in new issue
Block a user