Procházet zdrojové kódy

Add a canonical URL and fix two setup steps

- index.html: rel=canonical to https://monoexp.com/, matching the www
  redirect.
- README: clone over HTTPS (the SSH address needs a Gogs key the
  Admin's server account doesn't have), and give Claude's first deploy
  as rsync -rlt -O, since deploy-static's rsync -a fails on a folder
  the Admin owns. Merging now deploys automatically.
- Release record 002.

This is the first home PR on the merge-to-deploy pipeline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude před 2 hodinami
rodič
revize
221dee17c1

+ 17 - 6
README.md

@@ -26,7 +26,8 @@ Copy one `<li class="project">` block in `public/index.html` and change:
 - the **Visit** link to `https://<name>.monoexp.com/` (leave it out for source-only projects)
 - the **Source** link to `https://git.monoexp.com/bajdev/<repo>`
 
-Open a PR; merging it deploys the page once the site is on the pipeline.
+Open a PR; merging it deploys the page automatically (the site is on the
+merge-to-deploy pipeline).
 
 ## Hosting
 
@@ -66,14 +67,24 @@ DNS needs no change: the `@` and `*` A records at Hover already point here.
    Then do the first deploy, **either** yourself:
 
    ```bash
-   git clone git@git.monoexp.com:bajdev/home.git ~/src/home
+   git clone https://git.monoexp.com/bajdev/home.git ~/src/home
    rsync -a --delete ~/src/home/public/ /srv/www/vhosts/monoexp.com/
    ```
 
-   **or** by asking Claude, which runs
-   `deploy-static monoexp.com ~/src/home/public` from its own account. Pass
-   the source folder explicitly, because the script's default would look for
-   `~/src/monoexp/public`.
+   The clone uses HTTPS because the repo is public, so no SSH key is
+   needed.
+
+   **or** by asking Claude, which runs this from its own account:
+
+   ```bash
+   rsync -rlt -O --delete ~/src/home/public/ /srv/www/vhosts/monoexp.com/
+   ```
+
+   That's `deploy-static` without the parts that need to own the folder:
+   `-rlt -O` copies files and links with their times, but never tries to
+   change the folder's own permissions or timestamp, which only its owner
+   (the Admin) can do. Plain `deploy-static` uses `rsync -a`, which would
+   copy the files and then fail on the folder.
 
    Pick one, not both: whoever deploys first owns the files, and the other
    account then can't update them. Merge-to-deploy hands them to the `deploy`

+ 1 - 0
public/index.html

@@ -6,6 +6,7 @@
   <title>Mono Experiments</title>
   <meta name="description" content="Mono Experiments: a small self-hosted workshop for side projects. Live sites and their source.">
   <meta name="color-scheme" content="light dark">
+  <link rel="canonical" href="https://monoexp.com/">
   <link rel="icon" href="/favicon.svg" type="image/svg+xml">
   <link rel="stylesheet" href="/style.css">
 </head>

+ 31 - 0
pull-releases/002-canonical-and-setup-fixes/README.md

@@ -0,0 +1,31 @@
+# Add a canonical URL and fix two setup steps
+
+Branch `feature/canonical-and-setup-fixes`
+
+## What changed
+
+- **Canonical URL:** `public/index.html` now has `<link rel="canonical" href="https://monoexp.com/">`. Search engines then treat `https://monoexp.com/` as the page's one address, which matches the redirect from `www.monoexp.com`. Nothing visible changes.
+- **README, first deploy:**
+  - The Admin's clone now uses HTTPS (`https://git.monoexp.com/bajdev/home.git`). The SSH address needs a key registered in Gogs, which the Admin's server account doesn't have, so the clone failed with "permission denied".
+  - Claude's first deploy is now `rsync -rlt -O --delete`. The previous `deploy-static` instruction fails when the Admin owns the folder: `rsync -a` tries to change the folder's own permissions and timestamp, which only the owner can do. That's how the first deploy was actually done on 27 Oct.
+- **README, adding a project:** says merging deploys automatically, since the site is now on the pipeline.
+
+## Notes
+
+- This is the home page's first pull request on the merge-to-deploy pipeline, so it doubles as the pipeline test: merging it should publish the canonical tag on its own.
+- The pipeline publishes only `public/`. The README changes stay in the repo.
+
+## Testing
+
+- Served `public/` locally: the page includes the canonical tag and looks unchanged.
+- Before merging, the live page has no canonical tag. After merging, it should, with a new `deploy/monoexp.com/…` tag in Gogs on the merge commit and a line in `/var/log/deploys.log`.
+
+## Screenshots
+
+From the branch's `public/` folder served locally. The page doesn't change visibly.
+
+| Desktop | Mobile |
+|---|---|
+| [![Desktop](desktop.png)](desktop.png) | [![Mobile](mobile.png)](mobile.png) |
+
+🤖 Generated with [Claude Code](https://claude.com/claude-code)

binární
pull-releases/002-canonical-and-setup-fixes/desktop.png


binární
pull-releases/002-canonical-and-setup-fixes/mobile.png


+ 1 - 0
pull-releases/README.md

@@ -34,3 +34,4 @@ the records live in the repo only.
 | PR | Change |
 |---|---|
 | [001](001-home-page/) | Static home page, nginx vhost and setup README |
+| [002](002-canonical-and-setup-fixes/) | Canonical URL; HTTPS clone and working first-deploy command |