From 02113fa738cf366529aecc3af27f4d919cf2834b Mon Sep 17 00:00:00 2001 From: SandObserver <260779319+SandObserver@users.noreply.github.com> Date: Thu, 8 Oct 2026 01:10:35 -0400 Subject: [PATCH] Replace the landing page closing band with Get started - Add a Get started section with an install method picker, the install file, the start command and two next steps. - Read the Compose and docker run blocks from the Docker install page at build time. - Remember the chosen method, announce changes and fall back to selecting text when copying is refused. --- src/pages/index.astro | 294 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 277 insertions(+), 17 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index be0bec3..4303049 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,8 +1,33 @@ --- +import { readFileSync } from 'node:fs'; +import { resolve } from 'node:path'; +import { iconSprite } from '../lib/icon-set'; import { readAppVersion } from '../lib/repo'; const version = readAppVersion(); +const guide = readFileSync(resolve(process.cwd(), 'src/content/docs/docs/installation/docker.mdx'), 'utf8'); +const composeBlock = guide.match(/## Compose\n+```yaml\n([\s\S]*?)\n```\n+```sh\n([\s\S]*?)\n```/); +const runBlock = guide.match(/## docker run\n+```sh\n([\s\S]*?)\n```/); +if (!composeBlock || !runBlock) throw new Error('docker.mdx: the Compose or docker run block moved. Update the Get started parser.'); +const esc = (t: string) => t.replace(/[&<>"]/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"' })[c]!); +const markValues = (t: string) => esc(t) + .replace(/(?<="|-p )8700(?=:80)/g, '8700') + .replace(/\.\/(data|icons)(?=:\/)/g, './$1'); +const install = { + compose: { fname: 'compose.yml', code: markValues(composeBlock[1]), start: esc(composeBlock[2]) }, + run: { fname: 'Terminal', code: markValues(runBlock[1]), start: '' }, + unraid: { fname: 'Unraid', code: esc('Apps tab › search "Stackyard" › Install'), start: '' }, +}; +const sprite = await iconSprite(['external', 'general']); +const iconMasks = sprite.match(/([\s\S]*?)<\/defs>/)?.[1] ?? ''; +const stepIcon = (id: string) => { + const body = sprite.match(new RegExp(`([\\s\\S]*?)`))?.[1] ?? ''; + return ``; +}; +const icons = { external: stepIcon('external'), general: stepIcon('general') }; +const installJson = JSON.stringify({ install, icons }).replace(/ -
-
-
Your homelab deserves better
-

Set it up in minutes. Check it every day.

- Start building your dashboard +
+ +
+
+

Get started

+

Free and open source. Runs in Docker on 64-bit Intel, AMD and ARM.

+
+
+

I run containers with .

+
{install.compose.fname}
+
Start it
+
    +
  • Open http://<server-ip>:8700You can set a password on the first visit, or skip it.
  • +
  • Set it up in SettingsAdd apps, folders, badges and widgets, or import a backup or another dashboard's config.
  • +
+

Variables, reverse proxies and backups: Full setup guide

+
+

+