pages: republish in place, keeping the slug
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 58/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cli, javascript
Research direction
Start by reading the chroxy publish command and the POST /api/pages handler, then inspect the existing page persistence and publish tests. Trace how page content, slug, title, timestamp, and authentication are handled. Done means replacement preserves the URL, missing slugs fail without creating a page, the page list still has one entry, JSON output retains its shape, and tests cover replacement, missing slugs, and auth.
Written by the indexing model from the issue text.
Description
Problem
chroxy publish always creates a new slug. A page that is rebuilt on a schedule (for example a monthly report) gets a new share URL every time, so:
- the people holding the link have to be sent a new one after every rebuild, and
- the publisher has to remember to
chroxy pages rmthe previous slug, or old copies stay live.
Proposal
Let a publish replace the content of an existing page and keep its slug:
chroxy publish out/index.html --replace <slug>
- Writes the new HTML to the existing page, keeps the slug and share URL, and updates its title and timestamp.
- Fails (non-zero exit, nothing changed) if the slug does not exist, so a typo never mints a new page by accident.
--jsonoutput stays the same shape as a normal publish.- The matching
POST /api/pagescall takes the slug and has the same auth as publish. - A way to rotate the slug on purpose stays available: publish new, then
rmthe old one.
Acceptance
- Replacing a page keeps its URL working, and the URL serves the new content.
- Replacing a slug that does not exist exits non-zero and creates nothing.
chroxy pages listshows one entry for the page before and after a replace.- Tests cover replace, a missing slug and auth.
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 1
- Avg merge
- 2h 3m
- Merged PRs (30d)
- 333
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from blamechris/chroxy
-
from-review tech-debt testing
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
blamechris/chroxy#9520 ·
Maintainers usually reply within 1 day
-
priority: low server
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
blamechris/chroxy#9340 ·
Maintainers usually reply within 1 day
-
documentation from-review
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
blamechris/chroxy#9237 ·
Maintainers usually reply within 1 day
-
agent-control client: notify() docstring should say the outbound gate applies only in principal modeOpenenhancement from-review
Difficulty 1/5 Under an hour Newbie friendliness 80/100
blamechris/chroxy#9227 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
blamechris/chroxy#9108 ·
Maintainers usually reply within 1 day
All issues in blamechris/chroxy
Similar issues
-
Documentation pleaseOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
freelawproject/litigant-portal#1307 ·
Maintainers usually reply within 2 days
-
Java Edition Tests
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
JSPrismarine/JSPrismarine#4178 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Trac-Systems/main_settlement_bus#1278 ·
Maintainers usually reply within 1 day
-
documentation good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apidly-ltd/apidly-mcp#5 ·