From 3e77ef337047c1cd8835dfee74afa9ac033d47ae Mon Sep 17 00:00:00 2001 From: James Osborne Date: Sat, 18 Oct 2025 02:20:30 -0400 Subject: [PATCH] Fixup README --- Makefile | 1 - PKGBUILD | 1 - README.md | 40 ++++++++++------------------------------ main.go | 6 ------ 4 files changed, 10 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index fd53847..399784d 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ APP=relibre-app .PHONY: deps run build clean deps: - # Add dependency and generate go.sum go get github.com/webview/webview_go@v0.1.1 go mod tidy diff --git a/PKGBUILD b/PKGBUILD index c075ab4..bd1606c 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -39,7 +39,6 @@ package() { "${pkgdir}/usr/share/applications/com.circlewithadot.Relibre.desktop" fi - # Icon: reuse the Flatpak icon (must be a square 512×512 PNG) if [[ -f dist/com.circlewithadot.Relibre.png ]]; then install -Dm644 dist/com.circlewithadot.Relibre.png \ "${pkgdir}/usr/share/icons/hicolor/512x512/apps/com.circlewithadot.Relibre.png" diff --git a/README.md b/README.md index fbfb8a8..73bd0c8 100644 --- a/README.md +++ b/README.md @@ -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. -**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 -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 +docker compose pull +docker compose up -d +``` + --- ## 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. -### Prereqs -**Arch:** -sudo pacman -S --needed base-devel go webkit2gtk gtk3 pkgconf - ### Build +```bash make deps make build ./relibre-app @@ -61,7 +39,9 @@ make build ## 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). - Build & run locally: ```bash flatpak install -y org.gnome.Platform//46 org.gnome.Sdk//46 flatpak-builder --user --install --force-clean build-dir com.circlewithadot.Relibre.yml flatpak run com.circlewithadot.Relibre +``` diff --git a/main.go b/main.go index 5c2a237..534bf63 100644 --- a/main.go +++ b/main.go @@ -21,7 +21,6 @@ import ( webview "github.com/webview/webview_go" ) -//go:embed index.html ui/* images/* var content embed.FS type saveReq struct { @@ -34,7 +33,6 @@ type saveResp struct { } func main() { - // Static files subFS, err := fs.Sub(content, ".") if err != nil { log.Fatalf("fs.Sub error: %v", err) @@ -42,7 +40,6 @@ func main() { mux := http.NewServeMux() mux.Handle("/", http.FileServer(http.FS(subFS))) - // /save endpoint writes to Downloads mux.HandleFunc("/save", func(w http.ResponseWriter, r *http.Request) { start := time.Now() 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}) }) - // Simple request logger handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { start := time.Now() mux.ServeHTTP(w, r) 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") if err != nil { log.Fatalf("listen: %v", err) @@ -99,7 +94,6 @@ func main() { } }() - // Native webview window (debug true for dev tools/log signals) debug := true w := webview.New(debug) defer w.Destroy()