commit 07bba7b9d3726a95f9c17940b92bad337e304f46 equwal <truex@equwal.com> 2026-09-22 19:52:33 -0700 Move the site to sbmsync.com The preview image address now comes from SBM_URL, so that it moves with the server. Before, pages.html had the old host in it. The README gives sbmsync.com as the default server, and tells that the old address still works for the clients that use it.
README.md | 13 +++++++------ pages.html | 2 +- server_test.go | 10 ++++++++++ 3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md index 3ace8e7..9b9c855 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,14 @@ and the sbm add-on for Firefox and Chrome. The demo (80 seconds, also as [MP4](demo/sbm-demo.mp4)): bm adds a bookmark in a terminal. The add-on in the browser shows it, and adds the page that it shows. After `bm-sync`, bm has that bookmark too. All through -sbm.subread.space. +sbmsync.com. It is one small Go program. It keeps its data in plain files: no database. The only dependency is `golang.org/x/crypto` for bcrypt. -The clients use **https://sbm.subread.space** unless you set another -server. Sync on that server is free. You can also run your own server. +The clients use **https://sbmsync.com** unless you set another server. +Sync on that server is free. You can also run your own server. The old +address, sbm.subread.space, still works for the clients that use it. ## How sync works @@ -50,7 +51,7 @@ page does what bm does: - Search from the address bar of the browser: type sbm, a space and your words. Pages link to an OpenSearch description, `/opensearch.xml`, and the bookmarks page tells the address to add: - `https://sbm.subread.space/bookmarks?q=%s`. + `https://sbmsync.com/bookmarks?q=%s`. - Add a bookmark. A URL that is a bookmark already is refused. - Edit or delete a bookmark. - Edit the whole file, as `bm -e` does. @@ -101,9 +102,9 @@ The add-on opens the Stripe pages in a new tab. After them, Stripe shows the page `/done` of the server, which tells the user to go back to the add-on. - curl -d email=me@example.org --data-urlencode password=... https://sbm.subread.space/api/login + curl -d email=me@example.org --data-urlencode password=... https://sbmsync.com/api/login curl -H "Authorization: Bearer $token" --data-binary @bookmarks \ - "https://sbm.subread.space/api/sync?base=$version" + "https://sbmsync.com/api/sync?base=$version" ## Run your own server diff --git a/pages.html b/pages.html index 9a2e152..14b3dab 100644 --- a/pages.html +++ b/pages.html @@ -9,7 +9,7 @@ <meta property="og:site_name" content="sbm Sync"> <meta property="og:title" content="{{if .Title}}{{.Title}} ยท {{end}}sbm Sync"> <meta property="og:description" content="Sync your sbm bookmarks between the terminal, the browser add-on and Android."> -<meta property="og:image" content="https://sbm.subread.space/og.png"> +<meta property="og:image" content="{{.URL}}/og.png"> <meta name="twitter:card" content="summary_large_image"> <meta name="theme-color" content="#005577"> <link rel="search" type="application/opensearchdescription+xml" title="sbm bookmarks" href="/opensearch.xml"> diff --git a/server_test.go b/server_test.go index 4c1c013..33bc17b 100644 --- a/server_test.go +++ b/server_test.go @@ -545,6 +545,16 @@ func TestTerms(t *testing.T) { } } +// The preview image comes from the address of the server, so that it moves +// with SBM_URL. +func TestPreviewImage(t *testing.T) { + e := newEnv(t, false) + want := `<meta property="og:image" content="` + e.s.site + `/og.png">` + if home := e.body(http.DefaultClient, "/"); !strings.Contains(home, want) { + t.Errorf("the home page lacks %q", want) + } +} + // api sends a request with the token of a device, as the add-on does, and // gives the status and the body of the answer. func (e *harness) api(method, token, path string, form url.Values) (int, string) {