一个非常轻量的类似 Homer 的导航主页,使用 Go + Svelte 实现。
/ 对应 home.yaml,/another 对应 another.yaml下载 Github release 最新版本:
wget https://github.com/inhere/go-homepagex/releases/latest/download/homepagex-linux-amd64
go-homepagex/
├── internal/ # Go 后端服务
│ ├── config.go # 配置加载
│ ├── page.go # 页面配置解析
│ ├── auth.go # Basic 认证
│ └── handlers.go # HTTP 处理器
├── frontend/ # 前端应用
│ └── build/ # 构建输出
│ ├── index.html
│ └── app.js
├── pages/ # 页面 YAML 配置
│ ├── home.yaml # 主页面配置
│ └── another.yaml
├── config.yaml # 后端配置
├── main.go # Go 入口文件
└── README.md
server:
port: "8090"
# Basic 认证配置
auth:
enabled: true
username: "admin"
password: "your-password"
# 页面配置文件存放目录
pages_dir: "./pages"
# 前端构建目录
frontend_dir: "./frontend/build"
title: "Home Dashboard"
subtitle: "Welcome to your dashboard"
logo: "logo.png"
theme: "default"
color: "blue"
style: "cards" # cards 或 list
columns: "3"
connectivity:
check_interval: 30000
mode: "ping"
services:
- name: "Media"
icon: "fas fa-play-circle"
items:
- name: "Plex"
logo: "https://example.com/plex.png"
subtitle: "Media server"
tags: ["app"]
url: "https://plex.example.com"
target: "_blank"
/ 路由对应 pages/home.yaml/another 路由对应 pages/another.yaml{name} -> {name}.yamlGo (1.21+):
# 下载并安装 Go
wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go mod tidy
go build -o homepagex
# 使用默认配置
./homepagex
# 或使用自定义配置文件
./homepagex /path/to/config.yaml
打开浏览器访问: http://localhost:8080
前端使用 Svelte 框架。
cd frontend
pnpm install
pnpm run dev
pnpm run build
支持 FontAwesome 图标:
fas fa-icon-name 格式MIT