From 5672ee8bc8867d3dcf073e04850ba6086c212734 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 9 Dec 2024 19:58:53 +0100 Subject: [PATCH] chore: docs updates --- docs/.vitepress/config.ts | 17 +++++++------ docs/index.md | 30 ++++++++++++++--------- docs/{markdown-examples.md => install.md} | 0 docs/{api-examples.md => intro.md} | 0 src/https.ts | 4 +-- 5 files changed, 30 insertions(+), 21 deletions(-) rename docs/{markdown-examples.md => install.md} (100%) rename docs/{api-examples.md => intro.md} (100%) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index b54daf9..3e24c14 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,6 +1,5 @@ import { defineConfig } from 'vitepress' -// https://vitepress.dev/reference/site-config export default defineConfig({ title: 'Reverse Proxy', description: 'A better developer environment.', @@ -8,20 +7,24 @@ export default defineConfig({ themeConfig: { // https://vitepress.dev/reference/default-theme-config nav: [ - { text: 'Home', link: '/' }, - { text: 'Examples', link: '/markdown-examples' }, + { text: 'Docs', link: '/intro' }, + { text: 'Install', link: '/install' }, ], sidebar: [ { - text: 'Examples', + text: 'Get Started', items: [ - { text: 'Markdown Examples', link: '/markdown-examples' }, - { text: 'Runtime API Examples', link: '/api-examples' }, + { text: 'Introduction', link: '/intro' }, + { text: 'Install', link: '/install' }, ], }, ], - socialLinks: [{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }], + socialLinks: [ + { icon: 'github', link: 'https://github.com/stacksjs/rpx' }, + { icon: 'bluesky', link: 'https://bsky.app/profile/chrisbreuer.dev' }, + { icon: 'twitter', link: 'https://twitter.com/stacksjs' }, + ], }, }) diff --git a/docs/index.md b/docs/index.md index c7a7353..a129365 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,21 +4,27 @@ layout: home hero: name: "Reverse Proxy" - text: "A better developer environment." - tagline: My great project tagline + text: "Modern, fast reverse proxy." + tagline: "For a better local development environment." actions: - theme: brand - text: Markdown Examples - link: /markdown-examples + text: Documentation + link: /intro - theme: alt - text: API Examples - link: /api-examples + text: View on GitHub + link: https://github.com/stacksjs/rpx features: - - title: Feature A - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - - title: Feature B - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - - title: Feature C - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: "Smart Reverse Proxy" + icon: "🔀" + details: "Pretty development URLs for your local environment." + - title: "HTTPS Support" + icon: "🔒" + details: "Automatic, and configurable, HTTPS support." + - title: "`/etc/hosts` Management" + icon: "📝" + details: "Self-cleans your `/etc/hosts` file." + - title: "CLI & Library" + icon: "🛠" + details: "Use the CLI or the library in your own project." --- diff --git a/docs/markdown-examples.md b/docs/install.md similarity index 100% rename from docs/markdown-examples.md rename to docs/install.md diff --git a/docs/api-examples.md b/docs/intro.md similarity index 100% rename from docs/api-examples.md rename to docs/intro.md diff --git a/src/https.ts b/src/https.ts index 36d16f1..967da07 100644 --- a/src/https.ts +++ b/src/https.ts @@ -29,8 +29,8 @@ export function resolveSSLPaths(options: ReverseProxyConfigs, defaultConfig: typ }) // Filter out undefined values from arrays - const altNameIPs = options.https.altNameIPs?.filter((ip): ip is string => ip !== undefined) || baseConfig.altNameIPs - const altNameURIs = options.https.altNameURIs?.filter((uri): uri is string => uri !== undefined) || baseConfig.altNameURIs + const altNameIPs = options.https.altNameIPs?.filter((ip: any): ip is string => ip !== undefined) || baseConfig.altNameIPs + const altNameURIs = options.https.altNameURIs?.filter((uri: any): uri is string => uri !== undefined) || baseConfig.altNameURIs // Override with provided paths return {