forked from CWAD/relibre
Fixup README
This commit is contained in:
1
Makefile
1
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
|
||||
|
||||
|
||||
1
PKGBUILD
1
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"
|
||||
|
||||
40
README.md
40
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
|
||||
```
|
||||
|
||||
6
main.go
6
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()
|
||||
|
||||
Reference in New Issue
Block a user