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,37 +1,36 @@
|
||||
---
|
||||
export const prerender = true;
|
||||
import { getCollection } from "astro:content"
|
||||
import PageLayout from "@layouts/PageLayout.astro"
|
||||
import TopLayout from "@layouts/TopLayout.astro"
|
||||
import BottomLayout from "@layouts/BottomLayout.astro"
|
||||
import { formatDate } from "@lib/utils"
|
||||
import { SITE } from "@consts"
|
||||
import { getLegalDocuments } from "@lib/appwrite-service"
|
||||
|
||||
// Get the requested legal doc (simplified approach)
|
||||
const legalDocs = await getLegalDocuments()
|
||||
const doc = legalDocs.find(d => d.$id === Astro.params.slug) || null
|
||||
|
||||
if (!doc) {
|
||||
// Handle case where document is not found
|
||||
return new Response("Not Found", { status: 404 })
|
||||
export async function getStaticPaths() {
|
||||
const entries = await getCollection("legal")
|
||||
return entries.map((entry) => ({
|
||||
params: { slug: entry.id },
|
||||
props: { entry },
|
||||
}))
|
||||
}
|
||||
|
||||
// Skip render() call since we're using Appwrite data directly
|
||||
// const { Content } = await doc.render();
|
||||
|
||||
const { entry } = Astro.props
|
||||
const doc = entry
|
||||
---
|
||||
|
||||
<PageLayout title={doc.title} description={`${doc.title} for ${SITE.TITLE}`}>
|
||||
<PageLayout title={doc.data.title} description={`${doc.data.title} for ${SITE.TITLE}`}>
|
||||
<TopLayout>
|
||||
<div class="animate">
|
||||
<div class="page-heading">
|
||||
{doc.title}
|
||||
{doc.data.title}
|
||||
</div>
|
||||
<p class="font-normal opacity-75">
|
||||
Last updated: {formatDate(doc.date)}
|
||||
Last updated: {formatDate(doc.data.date)}
|
||||
</p>
|
||||
</div>
|
||||
</TopLayout>
|
||||
<BottomLayout>
|
||||
<article class="animate prose dark:prose-invert text-spaghetti-brown/100 dark:text-spaghetti-cream" set:html={doc.contentHtml}></article>
|
||||
<article class="animate prose dark:prose-invert text-spaghetti-brown/100 dark:text-spaghetti-cream" set:html={doc.rendered?.html}></article>
|
||||
</BottomLayout>
|
||||
</PageLayout>
|
||||
Reference in new issue
Block a user