Files
kb-anhonesthost/astro.config.mjs
T
AnHonestHost DevandClaude Opus 5 425f364f48 docs: add cPanel section; drop the outbound-filtering page
Adds a cPanel hosting section so cPanel customers have a correct
destination — previously this KB was WHP-only, so cPanel-specific
articles had nowhere to redirect to:

- cpanel/nameservers                        (WHMCS 5, 24k views)
- cpanel/free-ssl-certificate               (WHMCS 8, 18k views)
- cpanel/fix-a-403-error                    (WHMCS 6, 20k views)
- cpanel/wordpress-email-from-your-domain   (WHMCS 7, 25k views)

Rewritten rather than copied where the originals were wrong or thin:
- WordPress SMTP told customers to use port 25 unencrypted; now 587/TLS
  with 465 as the implicit-TLS alternative.
- The 403 article now says explicitly that loosening permissions to 777
  makes suEXEC refuse harder, since that's the instinctive wrong fix.
- AutoSSL gained the actual failure modes (CAA records, .htaccess
  redirects intercepting validation, domain not added to the account).

Also removes email/outbound-spam-filtering, added in the previous commit.
Outbound filtering via Baruwa has been disabled and Baruwa is being retired,
so the page describes a feature we no longer offer. It needs rewriting
around the Proxmox migration before it can ship.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 14:47:44 -07:00

111 lines
3.8 KiB
JavaScript

// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import sitemap from '@astrojs/sitemap';
import { fileURLToPath } from 'node:url';
// https://astro.build/config
export default defineConfig({
site: 'https://kb.anhonesthost.com',
// Send section-only URLs to the first article in that section. Without these,
// hitting e.g. /whp/admin/ would render the Apache directory listing because
// there is no index.html in that folder.
redirects: {
'/whp/': '/whp/getting-started/welcome/',
'/whp/getting-started/': '/whp/getting-started/welcome/',
'/whp/how-to/': '/whp/how-to/add-a-domain/',
'/whp/site-builder/': '/whp/site-builder/overview/',
'/whp/local-dev/': '/whp/local-dev/overview/',
'/whp/reference/': '/whp/reference/service-hostnames/',
'/whp/add-ons/': '/whp/add-ons/overview/',
'/whp/admin/': '/whp/admin/overview/',
'/domains/': '/domains/transferring-a-domain-to-us/',
'/support/': '/support/remote-support/',
'/cpanel/': '/cpanel/nameservers/',
},
vite: {
resolve: {
alias: {
// `~` resolves to /src so partial imports are depth-independent:
// import SignIn from '~/content/partials/signing-in.mdx';
'~': fileURLToPath(new URL('./src', import.meta.url)),
},
},
},
integrations: [
starlight({
title: 'AnHonestHost KB',
description: 'Customer documentation for WHP and other AnHonestHost services.',
components: {
// Inline-SVG brand mark + "Knowledge Base" label.
// Inlining lets the SVG's currentColor follow the active theme.
SiteTitle: './src/components/SiteTitle.astro',
// Wraps Starlight's default <Head> to add a click-to-zoom lightbox
// (medium-zoom) that targets article content images.
Head: './src/components/Head.astro',
},
customCss: [
'@fontsource-variable/inter',
'@fontsource-variable/jetbrains-mono',
'./src/styles/anhh-tokens.css',
],
editLink: {
baseUrl: 'https://repo.anhonesthost.net/cloud-hosting-platform/kb-anhonesthost/_edit/main/',
},
sidebar: [
{
label: 'WHP',
items: [
{
label: 'Getting started',
items: [{ autogenerate: { directory: 'whp/getting-started' } }],
},
{
label: 'How-to guides',
items: [{ autogenerate: { directory: 'whp/how-to' } }],
},
{
label: 'Site Builder',
badge: { text: 'Beta', variant: 'tip' },
items: [{ autogenerate: { directory: 'whp/site-builder' } }],
},
{
label: 'Local development',
items: [{ autogenerate: { directory: 'whp/local-dev' } }],
},
{
label: 'Reference',
items: [{ autogenerate: { directory: 'whp/reference' } }],
},
{
label: 'Add-ons',
items: [{ autogenerate: { directory: 'whp/add-ons' } }],
},
{
label: 'Admin',
// badge removed once content was verified against the real UI
items: [{ autogenerate: { directory: 'whp/admin' } }],
},
],
},
{
label: 'cPanel hosting',
items: [{ autogenerate: { directory: 'cpanel' } }],
},
{
label: 'Domains',
items: [{ autogenerate: { directory: 'domains' } }],
},
{
label: 'Support',
items: [{ autogenerate: { directory: 'support' } }],
},
// Future products only appear once they have content.
],
pagefind: true,
lastUpdated: true,
}),
sitemap(),
],
});