Fixup README

This commit is contained in:
2025-10-18 02:20:30 -04:00
parent 42d2b88e79
commit 3e77ef3370
4 changed files with 10 additions and 38 deletions

View File

@@ -3,7 +3,6 @@ APP=relibre-app
.PHONY: deps run build clean .PHONY: deps run build clean
deps: deps:
# Add dependency and generate go.sum
go get github.com/webview/webview_go@v0.1.1 go get github.com/webview/webview_go@v0.1.1
go mod tidy go mod tidy

View File

@@ -39,7 +39,6 @@ package() {
"${pkgdir}/usr/share/applications/com.circlewithadot.Relibre.desktop" "${pkgdir}/usr/share/applications/com.circlewithadot.Relibre.desktop"
fi fi
# Icon: reuse the Flatpak icon (must be a square 512×512 PNG)
if [[ -f dist/com.circlewithadot.Relibre.png ]]; then if [[ -f dist/com.circlewithadot.Relibre.png ]]; then
install -Dm644 dist/com.circlewithadot.Relibre.png \ install -Dm644 dist/com.circlewithadot.Relibre.png \
"${pkgdir}/usr/share/icons/hicolor/512x512/apps/com.circlewithadot.Relibre.png" "${pkgdir}/usr/share/icons/hicolor/512x512/apps/com.circlewithadot.Relibre.png"

View File

@@ -3,7 +3,7 @@
Relibre is a simple, free, and open-source landing-page generator—an alternative to HyperFollow—that produces a **single self-contained HTML file** you can host anywhere. Relibre is a simple, free, and open-source landing-page generator—an alternative to HyperFollow—that produces a **single self-contained HTML file** you can host anywhere.
**Try the generator →** [`https://`](https://relibre.site) **Try the generator →** [`https://relibre.site`](https://relibre.site)
--- ---
@@ -15,43 +15,21 @@ Relibre is a simple, free, and open-source landing-page generator—an alternati
--- ---
## Quick start (static site)
Open locally:
```bash
# simple Python server
python3 -m http.server 8080
# → http://localhost:8080
```
---
## Launch / self-host with Docker or Podman ## Launch / self-host with Docker or Podman
Relibre ships multiple compose variants so you can choose your reverse proxy. All of them:
- build an internal `web` container that serves the static files
- expose a `proxy` on **localhost:8080** (HAProxy, Caddy, Apache httpd, or Nginx)
**Files:**
- `docker-compose.yml.haproxy`
- `docker-compose.yml.caddy`
- `docker-compose.yml.apache`
- `docker-compose.yml.nginx`
- `proxy/`
- `Dockerfile`
```bash ```bash
docker compose pull
docker compose up -d
```
--- ---
## Native desktop build (Go webview app) ## Native desktop build (Go webview app)
Builds a single executable that opens Relibre inside the OS webview. The app runs a tiny localhost server and can save the generated HTML directly to your **Downloads** folder. Builds a single executable that opens Relibre inside the OS webview. The app runs a tiny localhost server and can save the generated HTML directly to your **Downloads** folder.
### Prereqs
**Arch:**
sudo pacman -S --needed base-devel go webkit2gtk gtk3 pkgconf
### Build ### Build
```bash
make deps make deps
make build make build
./relibre-app ./relibre-app
@@ -61,7 +39,9 @@ make build
## Arch Linux (AUR) packaging ## Arch Linux (AUR) packaging
- **`relibre`** builds from source ```bash
makepkg -si
```
--- ---
@@ -69,9 +49,9 @@ make build
Relibre works well as a Flatpak using the GNOME runtime (WebKitGTK included). Relibre works well as a Flatpak using the GNOME runtime (WebKitGTK included).
Build & run locally: Build & run locally:
```bash ```bash
flatpak install -y org.gnome.Platform//46 org.gnome.Sdk//46 flatpak install -y org.gnome.Platform//46 org.gnome.Sdk//46
flatpak-builder --user --install --force-clean build-dir com.circlewithadot.Relibre.yml flatpak-builder --user --install --force-clean build-dir com.circlewithadot.Relibre.yml
flatpak run com.circlewithadot.Relibre flatpak run com.circlewithadot.Relibre
```

View File

@@ -21,7 +21,6 @@ import (
webview "github.com/webview/webview_go" webview "github.com/webview/webview_go"
) )
//go:embed index.html ui/* images/*
var content embed.FS var content embed.FS
type saveReq struct { type saveReq struct {
@@ -34,7 +33,6 @@ type saveResp struct {
} }
func main() { func main() {
// Static files
subFS, err := fs.Sub(content, ".") subFS, err := fs.Sub(content, ".")
if err != nil { if err != nil {
log.Fatalf("fs.Sub error: %v", err) log.Fatalf("fs.Sub error: %v", err)
@@ -42,7 +40,6 @@ func main() {
mux := http.NewServeMux() mux := http.NewServeMux()
mux.Handle("/", http.FileServer(http.FS(subFS))) mux.Handle("/", http.FileServer(http.FS(subFS)))
// /save endpoint writes to Downloads
mux.HandleFunc("/save", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/save", func(w http.ResponseWriter, r *http.Request) {
start := time.Now() start := time.Now()
defer func() { log.Printf("%s %s %s", r.Method, r.URL.Path, time.Since(start)) }() defer func() { log.Printf("%s %s %s", r.Method, r.URL.Path, time.Since(start)) }()
@@ -77,14 +74,12 @@ func main() {
_ = json.NewEncoder(w).Encode(saveResp{Path: path}) _ = json.NewEncoder(w).Encode(saveResp{Path: path})
}) })
// Simple request logger
handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
start := time.Now() start := time.Now()
mux.ServeHTTP(w, r) mux.ServeHTTP(w, r)
log.Printf("%s %s %s", r.Method, r.URL.Path, time.Since(start)) log.Printf("%s %s %s", r.Method, r.URL.Path, time.Since(start))
}) })
// Start server on ephemeral port
ln, err := net.Listen("tcp", "127.0.0.1:0") ln, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil { if err != nil {
log.Fatalf("listen: %v", err) log.Fatalf("listen: %v", err)
@@ -99,7 +94,6 @@ func main() {
} }
}() }()
// Native webview window (debug true for dev tools/log signals)
debug := true debug := true
w := webview.New(debug) w := webview.New(debug)
defer w.Destroy() defer w.Destroy()