Dev: heltec-tracker.l.warehack.ing Prod: heltec-tracker.warehack.ing SITE_URL is now env-driven so the same image builds correct canonical URLs for both environments.
112 lines
2.8 KiB
JavaScript
112 lines
2.8 KiB
JavaScript
// @ts-check
|
|
import { defineConfig } from 'astro/config';
|
|
import starlight from '@astrojs/starlight';
|
|
|
|
// https://astro.build/config
|
|
export default defineConfig({
|
|
site: process.env.SITE_URL || 'https://heltec-tracker.warehack.ing',
|
|
|
|
// Disable telemetry
|
|
telemetry: false,
|
|
|
|
// Disable devToolbar
|
|
devToolbar: { enabled: false },
|
|
|
|
integrations: [
|
|
starlight({
|
|
title: 'Heltec Wireless Tracker',
|
|
description: 'Documentation for the Heltec Wireless Tracker ESP32-S3FN8 development kit with LoRa, GNSS, and WiFi',
|
|
|
|
logo: {
|
|
src: './src/assets/tracker-icon.svg',
|
|
alt: 'Heltec Wireless Tracker',
|
|
},
|
|
|
|
social: [
|
|
{ icon: 'github', label: 'GitHub', href: 'https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series' },
|
|
{ icon: 'external', label: 'Heltec Wiki', href: 'https://wiki.heltec.org' },
|
|
],
|
|
|
|
head: [
|
|
{
|
|
tag: 'meta',
|
|
attrs: {
|
|
name: 'keywords',
|
|
content: 'ESP32-S3, LoRa, GNSS, GPS, Meshtastic, LoRaWAN, Heltec, Wireless Tracker',
|
|
},
|
|
},
|
|
],
|
|
|
|
sidebar: [
|
|
{
|
|
label: 'Getting Started',
|
|
items: [
|
|
{ label: 'Overview', slug: 'getting-started/overview' },
|
|
{ label: 'Hardware Versions', slug: 'getting-started/hardware-versions' },
|
|
{ label: 'Development Platforms', slug: 'getting-started/development-platforms' },
|
|
],
|
|
},
|
|
{
|
|
label: 'Hardware',
|
|
items: [
|
|
{ label: 'Specifications', slug: 'hardware/specifications' },
|
|
{ label: 'Pinout', slug: 'hardware/pinout' },
|
|
{ label: 'Power', slug: 'hardware/power' },
|
|
{ label: 'Schematic', slug: 'hardware/schematic' },
|
|
],
|
|
},
|
|
{
|
|
label: 'Guides',
|
|
items: [
|
|
{ label: 'Meshtastic Low Power', slug: 'guides/meshtastic-low-power' },
|
|
{ label: 'Heart Rate Monitor', slug: 'guides/heart-rate-monitor' },
|
|
{ label: 'LoRaWAN Setup', slug: 'guides/lorawan-setup' },
|
|
],
|
|
},
|
|
{
|
|
label: 'Reference',
|
|
items: [
|
|
{ label: 'GNSS Protocol', slug: 'reference/gnss-protocol' },
|
|
{ label: 'LoRa Frequencies', slug: 'reference/lora-frequencies' },
|
|
{ label: 'FAQ', slug: 'reference/faq' },
|
|
],
|
|
},
|
|
{
|
|
label: 'Resources',
|
|
items: [
|
|
{ label: 'Downloads', slug: 'resources/downloads' },
|
|
],
|
|
},
|
|
],
|
|
|
|
// Customize search
|
|
pagefind: true,
|
|
|
|
// Custom CSS
|
|
customCss: [
|
|
'./src/styles/custom.css',
|
|
],
|
|
|
|
// Components customization
|
|
components: {
|
|
// Override the page title to show hardware version warnings
|
|
},
|
|
}),
|
|
],
|
|
|
|
vite: {
|
|
server: {
|
|
host: '0.0.0.0',
|
|
// Only configure HMR for reverse proxy when explicitly set
|
|
// Without this, Vite auto-detects localhost settings correctly
|
|
...(process.env.VITE_HMR_HOST && {
|
|
hmr: {
|
|
host: process.env.VITE_HMR_HOST,
|
|
protocol: 'wss',
|
|
clientPort: 443,
|
|
},
|
|
}),
|
|
},
|
|
},
|
|
});
|