mirror of
https://github.com/pockethost/pockethost.git
synced 2025-11-23 22:15:49 +00:00
feat(Docs): enhance documentation with metadata, descriptions for better SEO
This commit is contained in:
parent
0c06d34632
commit
edd0eef3a9
@ -1,12 +1,11 @@
|
||||
<script>
|
||||
// Define the width of the sidebar
|
||||
const sidebarWidth = '300px'
|
||||
import { page } from '$app/stores'
|
||||
import BlurBg from '$components/BlurBg.svelte'
|
||||
import Logo from '$src/routes/Navbar/Logo.svelte'
|
||||
import DocLink from './DocLink.svelte'
|
||||
|
||||
import { onMount } from 'svelte'
|
||||
export let data;
|
||||
|
||||
let sidebarOpen = false
|
||||
let windowWidth = 0
|
||||
@ -26,7 +25,35 @@
|
||||
if (windowWidth < 768) sidebarOpen = false
|
||||
}
|
||||
|
||||
const { title, description, ogImage } = data.meta;
|
||||
|
||||
</script>
|
||||
<svelte:head>
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={description} />
|
||||
|
||||
<meta property="og:url" content={data.url} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content={title} />
|
||||
{#if description}
|
||||
<meta property="og:description" content={description} />
|
||||
{/if}
|
||||
|
||||
{#if ogImage}
|
||||
<meta property="og:image" content={ogImage} />
|
||||
{/if}
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:url" content={data.url} />
|
||||
<meta name="twitter:title" content={title} />
|
||||
{#if description}
|
||||
<meta name="twitter:description" content={description} />
|
||||
{/if}
|
||||
|
||||
{#if ogImage}
|
||||
<meta name="twitter:image" content={ogImage} />
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
<BlurBg className="opacity-20 blur-2xl" />
|
||||
|
||||
|
||||
27
packages/dashboard/src/routes/(static)/docs/+layout.ts
Normal file
27
packages/dashboard/src/routes/(static)/docs/+layout.ts
Normal file
@ -0,0 +1,27 @@
|
||||
// src/routes/docs/+layout.ts
|
||||
import type { LayoutLoad } from './$types';
|
||||
import { getDocData } from './docs-data';
|
||||
|
||||
export const load: LayoutLoad = async ({ url }) => {
|
||||
const slug = url.pathname.split('/').slice(-1)[0] as string;
|
||||
const frontmatter = getDocData(slug);
|
||||
|
||||
let title = 'Docs';
|
||||
let ogImage = '';
|
||||
let description = '';
|
||||
|
||||
if (frontmatter) {
|
||||
title = frontmatter.title || 'Docs';
|
||||
description = frontmatter.description || '';
|
||||
ogImage = `${url.origin}${frontmatter.ogImage}` || '';
|
||||
}
|
||||
|
||||
return {
|
||||
url: url.href,
|
||||
meta: {
|
||||
title,
|
||||
ogImage,
|
||||
description
|
||||
}
|
||||
};
|
||||
};
|
||||
@ -1,3 +1,8 @@
|
||||
---
|
||||
title: Accessing an Instance
|
||||
description: Learn how to access your PocketBase instance managed by PocketHost
|
||||
ogImage: /docs/accessing.png
|
||||
---
|
||||
# Accessing an Instance
|
||||
|
||||
Your PocketBase instance managed by PocketHost can be accessed in several ways:
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Account Creation
|
||||
description: How to create your PocketHost account to deploy and manage your PocketBase instances
|
||||
---
|
||||
# Account Creation
|
||||
|
||||
Create your PocketHost account to deploy and manage your PocketBase instances.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Admin Sync
|
||||
description: Learn how Admin Sync works to keep your PocketBase admin account in sync with your pockethost.io credentials
|
||||
---
|
||||
# Admin Sync
|
||||
|
||||
Admin Sync ensures that your instance always has an admin account that matches the login credentials of your pockethost.io account.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Backup and Restore
|
||||
description: Learn how to back up and restore your PocketBase instance
|
||||
---
|
||||
# Backing Up and Restoring
|
||||
|
||||
PocketBase offers built-in backup and restore features, making it easy to secure your data and recover from potential issues. However, there are important considerations and alternative methods to ensure your backups are safe and reliable.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Creating an Instance
|
||||
description: Learn how to create a new PocketBase instance
|
||||
---
|
||||
# Creating an Instance
|
||||
|
||||

|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Custom Binaries
|
||||
description: Custom Binaries are not supported due to security concerns
|
||||
---
|
||||
# Custom Binaries
|
||||
|
||||
Custom PocketBase binaries are currently not supported due to security concerns.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Custom Domain
|
||||
description: Learn how to set up a custom domain for your PocketHost instance
|
||||
---
|
||||
# Custom Domain
|
||||
|
||||
PocketHost instances can use a custom domain instead of the default `*.pockethost.io` subdomain.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Deleting an Instance
|
||||
description: Learn how to delete a PocketBase instance
|
||||
---
|
||||
# Deleting an Instance
|
||||
|
||||
Deleting an instance will immediately power it down and permanently remove all associated data.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Dev Mode
|
||||
description: Learn how to enable Dev Mode for your PocketBase instance
|
||||
---
|
||||
# Dev Mode
|
||||
|
||||

|
||||
|
||||
14
packages/dashboard/src/routes/(static)/docs/docs-data.ts
Normal file
14
packages/dashboard/src/routes/(static)/docs/docs-data.ts
Normal file
@ -0,0 +1,14 @@
|
||||
// src/routes/docs/docs-data.ts
|
||||
const docs = import.meta.glob('./*/+page.md', { eager: true });
|
||||
|
||||
const docData = Object.entries(docs).map(([path, module]:any) => {
|
||||
const slug = path.split('/').slice(-2, -1)[0];
|
||||
return {
|
||||
slug,
|
||||
metadata: module.metadata,
|
||||
};
|
||||
});
|
||||
|
||||
export const getDocData = (slug: string) => {
|
||||
return docData.find(doc => doc.slug === slug)?.metadata;
|
||||
};
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: FAQ
|
||||
description: Frequently Asked Questions about PocketHost
|
||||
---
|
||||
# FAQ
|
||||
|
||||
## About
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
# FTP Access
|
||||
---
|
||||
title: FTP Access
|
||||
description: Learn how to access your PocketBase files via FTP
|
||||
---
|
||||
# FTP Access
|
||||
|
||||
PocketHost provides Secure FTP (FTPS) access to all your PocketBase files.
|
||||
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Getting Started
|
||||
description: A step-by-step guide to getting started with PocketHost
|
||||
---
|
||||
# Getting Started with PocketHost
|
||||
|
||||
Welcome to PocketHost! This guide will help you set up your first PocketBase instance and get you familiar with the basics of our platform. Let's dive in!
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
---
|
||||
title: Setting up a new email domain in Google Suite
|
||||
description: Learn how to set up an email domain in Google Suite
|
||||
---
|
||||
|
||||
# Setting up a new email domain in Google Suite
|
||||
|
||||
The process of setting up a new email domain in Google Suite involves several steps. In this guide, we will walk you through the process, from adding the domain to activating Gmail and setting up a catch-all email. By following these steps, you'll be able to configure your email domain effectively and ensure smooth communication within your organization. Let's get started!
|
||||
|
||||
@ -1,12 +1,8 @@
|
||||
---
|
||||
title: Instance Details
|
||||
category: usage
|
||||
subcategory: instances
|
||||
description: Learn how to manage your PocketHost instance with our comprehensive
|
||||
guide, covering on-demand execution, usage metering, versioning, secrets, and
|
||||
admin access. Master the nuances of using PocketHost and get your PocketBase
|
||||
projects up and running in no time. Essential reading for web & node.js
|
||||
developers.
|
||||
admin access.
|
||||
---
|
||||
|
||||
PocketHost provides a simple dashboard where you can manage your instance.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Introduction
|
||||
description: An introduction to PocketHost, a cloud hosting platform for PocketBase that simplifies backend setup and management
|
||||
---
|
||||
# 👋 Welcome to PocketHost
|
||||
|
||||
## Overview
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Extending PocketBase via JavaScript
|
||||
description: Learn how to extend PocketBase via JavaScript using the PocketBase JSVM environment, including its differences from typical JavaScript environments
|
||||
---
|
||||
# Extending PocketBase via JavaScript
|
||||
|
||||
PocketBase can be [extended via JavaScript](https://pocketbase.io/docs/js-overview/) using server-side scripts that allow you to customize and enhance the functionality of your application. These scripts are executed within the PocketBase server using a JavaScript Virtual Machine (JSVM) powered by [Goja](https://github.com/dop251/goja), a JavaScript interpreter written in Go.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Limits
|
||||
description: Learn about the limits enforced by PocketHost, including rate limiting, hibernation, usage limits, and prohibited content
|
||||
---
|
||||
# Limits
|
||||
|
||||
PocketHost enforces several limits to ensure a fair and reliable experience for all users. Below are the key limitations and guidelines for usage.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Logging
|
||||
description: Learn how to view live logs from your PocketHost instance and access console output from pb_hooks scripts
|
||||
---
|
||||
# Logging
|
||||
|
||||
You can view live logs while your PocketHost instance is running. `console.log` output from `pb_hooks` scripts will also appear in these logs.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Power
|
||||
description: Learn how to power on and off your PocketBase instance using the PocketHost management console
|
||||
---
|
||||
# Power
|
||||
|
||||
## Power On
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Pricing Ethos
|
||||
description: Understand PocketHost's simple and transparent pricing model, including instance plans, lifetime offers, and our Fair Use policy
|
||||
---
|
||||
# Pricing Ethos
|
||||
|
||||
At PocketHost, we believe in keeping things simple and transparent. Our pricing is designed to support indie hackers, makers, and small businesses. We offer flexible plans to suit your needs, based on the number of instances you want to run. We also offer limited Lifetime Offers during our bootstrapping phase.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Extending PocketBase with JSVM
|
||||
description: Learn how to extend PocketBase with JSVM, plugins, and server-side rendering using PocketPages
|
||||
---
|
||||
# Programming and Extending PocketBase with JSVM
|
||||
|
||||
PocketBase is not just a simple backend solution—it offers powerful capabilities for extending its functionality through JavaScript, specifically using the **Goja engine** and its **JSVM** (JavaScript Virtual Machine). This allows developers to add custom logic, plugins, and server-side rendering to their applications, making PocketBase a highly versatile platform.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Rename an Instance
|
||||
description: Learn how to rename your PocketHost instance subdomain
|
||||
---
|
||||
# Rename an Instance
|
||||
|
||||
PocketHost instances can always be accessed via their permanent link, such as `https://mfsicdp6ia1zpiu.pockethost.io`, but you can also access them through a convenient subdomain like `https://harvest.pockethost.io`.
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
---
|
||||
title: S3 Storage
|
||||
description: Learn how to integrate S3-compatible storage with PocketBase to handle backups, restores, and file uploads while conserving local resources
|
||||
---
|
||||
|
||||
# S3 Storage and PocketBase
|
||||
|
||||
Using S3-compatible storage for PocketBase can help optimize your instance's resource management and portability. Here’s what you need to know about integrating S3 storage with PocketBase.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Secrets
|
||||
description: Use PocketHost Secrets to securely store API keys and sensitive data in your PocketBase runtime environment
|
||||
---
|
||||
# Secrets
|
||||
|
||||
Secrets are created through the PocketHost instance dashboard and are automatically made available in the PocketBase runtime environment, including `pb_hooks`. Use secrets to securely store API keys and other sensitive information that should not be embedded in your source code.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Self Hosting
|
||||
description: Learn how to self-host PocketHost
|
||||
---
|
||||
# Self Hosting
|
||||
|
||||
PocketHost is designed to run full stack on your local development machine.
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
---
|
||||
title: Server-Side PocketBase is an Anti-Pattern
|
||||
category: programming
|
||||
description: Using PocketBase from SvelteKit or Next.js server files is generally an antipattern.
|
||||
---
|
||||
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Setting Up AWS SES
|
||||
description: Speedrun guide to setting up AWS SES for sending emails from your PocketBase instance using Google Suite as your email provider
|
||||
---
|
||||
# Speedrun: Setting Up Email with Google Suite and AWS SES
|
||||
|
||||
<!-- @import "[TOC]" {cmd="toc" depthFrom=2 depthTo=6 orderedList=false} -->
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Outgoing Email in PocketBase
|
||||
description: Learn how to configure outgoing email in PocketBase using Amazon SES or Google Suite for reliable delivery
|
||||
---
|
||||
# Outgoing Email in PocketBase
|
||||
|
||||
Reliable outgoing email is crucial for many applications, and PocketBase provides flexible options for sending emails. However, ensuring consistent and reliable email delivery can be complex due to factors like spam filters, sender reputation, and email authentication. This guide will help you navigate these challenges and recommend two trusted solutions: **Amazon SES** and **Google Suite**.
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Usage Limits
|
||||
description: PocketHost provides generous free resources under a Fair Use policy, ensuring balanced storage, bandwidth, and CPU for all apps
|
||||
---
|
||||
PocketHost offers generous free projects, storage, bandwidth, and CPU on a Fair Use basis.
|
||||
|
||||
## What is 'Fair'?
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
---
|
||||
title: Changing PocketBase Versions
|
||||
description: Learn how to upgrade and downgrade your Pocketbase version in Pockethost
|
||||
---
|
||||
# Changing PocketBase Versions
|
||||
|
||||
PocketHost supports the latest minor release of each PocketBase version (e.g., `0.16.*`), and you can update your instance to stay on the latest release. When changing PocketBase versions, whether upgrading or downgrading, it’s important to take precautions to ensure the stability of your instance and the integrity of your data.
|
||||
|
||||
@ -1,3 +1,8 @@
|
||||
---
|
||||
title: Webhooks
|
||||
description: Learn how to use Pockethost webhooks to schedule reliable API calls without external cron jobs. Automate tasks like backups, data cleanup, notifications, and integrations—even when your instance is hibernated
|
||||
---
|
||||
|
||||
# Webhooks
|
||||
|
||||
Webhooks allow you to schedule API calls to your PocketBase instance at specific times, replacing the need for external cron job schedulers. This feature enables automated tasks like data cleanup, backups, notifications, and integrations with external services.
|
||||
|
||||
BIN
packages/dashboard/static/docs/accessing.png
Normal file
BIN
packages/dashboard/static/docs/accessing.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 434 KiB |
Loading…
x
Reference in New Issue
Block a user