Introduces comprehensive editorial standards for andebol.net to ensure:
- Only Portuguese-language (PT-PT) content is published
- Real, verifiable news with proper source attribution
- No plagiarism or copy-pasted content
- Clear content categories, writing templates, and quality checklist
Addresses the urgent need for editorial governance following an English-language
article publication incident. Includes templates for match reports, transfers,
analysis, and competition updates.
Updates writer pipeline docs to reference the new editorial brief.
Paperclip-Agent: f0251a61-38e1-4a9b-8cd1-38d96a320cab
Paperclip-Issue: BIT-740
Paperclip-Run: 248bfdd9-8f8e-4ff3-8f25-1726da6a5e16
When the Astro server could not reach the bridge health endpoint, the
code fell back to MockBridgeClient, which serves English placeholder
articles and a fictional author name. That was indexed and shown on
andebol.net (BIT-738).
Introduce resolveSsrBridge() so production never uses the mock; allow
BRIDGE_INTERNAL_URL to override the domain JSON endpoint for real
deploy topology; adjust pages and sitemap accordingly.
Made-with: Cursor
Implement BIT-709 acceptance: GET /search and /stats on the writer-pipeline
aggregator; bridge AggregatorClient calls /search and maps items with
source_url. /writers/:id/candidates merges aggregator-first with WordPress,
exposes candidate_source and matched_sources, and passes max_age_hours into
ranking. Add docs/AGGREGATOR_OPERATIONS.md and store unit tests.
Paperclip-Issue: BIT-709
Made-with: Cursor
Align andebol.net-style category and archive routes with the /noticias editorial
pattern: gradient masthead, lead article plus two-column grid, optional most-read
sidebar from bridge trending, and hub pagination styling. Non-institutional
themes keep the previous simple grid and header.
Made-with: Cursor
Add an institutional trending strip with section title and card rhythm.
Show a visible hero section label; localize related-articles titles.
Article pages gain breadcrumbs in institutional theme; category pages get
a horizontal secondary nav aligned with the news hub plus a wider layout.
Search gains an institutional masthead, accessible heading hierarchy, and
a results section title when queries return articles.
Verified: npm run build (frontend).
Paperclip-Task: b8b9096e-1fcd-478f-a92f-83a1db0ce67d
Paperclip-Run: 33ce910a-e3fe-4e2d-be3f-e8a3261c73e7
Made-with: Cursor
Switch institutional theme from serif to Inter (sans-serif) for headings
and body. Increase heading weights to 700-800 for professional punch.
Add top accent bar to header, dark navy footer, modern card radius (6px),
and tighter letter-spacing on all titles. Inspired by eurohandball.com
visual hierarchy without copying assets or branding.
Typography stack: Inter → SF Pro → system sans-serif
Article body: retains serif (Georgia) for readability
Co-Authored-By: Paperclip <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Add getPublicOrigin() so canonical URLs and JSON-LD use Host + X-Forwarded-Proto
instead of localhost:4321 when nginx proxies to Node.
- Nav and mobile menu: link "Notícias" to /noticias (eurohandball-style listing).
- Homepage "ver tudo" targets /noticias instead of /category/all.
- Redirect /news to /noticias for English-style paths.
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
The bridge built hero, trending, featured, latest, and category rows from
overlapping slices of the same post list, so the same thumbnails appeared many
times. Reserve post ids top-to-bottom, over-fetch the main feed and category
queries, and de-dupe the hero when stickies overlap the feed.
Render the featured slice as its own banded section, localize the sports
trending strip, and use distinct heading ids when two grids share the page.
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
- Use wordpress:6-php8.3-fpm with nginx:alpine sidecars; keep host ports 8080/8081
- Add shared wp_html / wp_andebol_html volumes so nginx can serve the same docroot as FPM
- Nginx: try_files permalinks, proxy headers, HTTP_AUTHORIZATION for App Passwords
- Update deploy scripts to force-recreate nginx with wordpress when public URL is fixed
- Refresh README and deployment docs
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
- Assert GET /search, /search?q=te, /category/all return 200
- Use SMOKE_HOST instead of HOST for the vhost header (HOST=0.0.0.0 in agent envs caused 403)
Made-with: Cursor
Enable fpa_agenda_enabled on andebol.net domain config. The bridge fetches
ws.fpa.pt getAgendaJogosFAP with SWR caching, normalises rows, and attaches
fpa_agenda to the homepage JSON. The institutional theme renders a responsive
fixtures table with FPA attribution.
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
Add GET /search wired to bridge articles search with pagination and empty-state
category pills. Handle /category/all as a full-archive listing. Enrich
institutional theme: serif body rhythm, hero depth, footer gradient, header
search (all breakpoints) plus auth links when auth_links is set, homepage
DiscoverSection, and footer links to search and archive. Extend UI strings (EN/PT)
and mock bridge search for offline builds.
Verified: npx [email protected].0 node_modules/astro/bin/astro.mjs build (frontend).
Made-with: Cursor
Now that _embed works correctly, WordPress returns full wp:term data where
some categories have undefined description fields. Guard strip_html against
null/undefined input.
Co-Authored-By: Paperclip <[email protected]>
The EMBED constant ('_embed=wp:featuredmedia,author,wp:term') was used as a
URLSearchParams key, which encodes the '=' as '%3D'. The .replace('%3D=','=')
hack never matched because '%3D' is followed by 'w' (from 'wp:'), not '='.
Result: WordPress never received the _embed parameter, so _embedded data
(featured images, author, terms) was always missing from API responses.
The bridge normalized this to featured_image: null for every article.
Fix: use URLSearchParams.set('_embed', EMBED_VALUE) so the key and value
are properly separated and encoded.
Co-Authored-By: Paperclip <[email protected]>
WordPress article images (featured_media) are served from /wp-content/uploads/.
The existing /wp-content/ block restricts access to RFC1918 IPs, blocking public
browsers from loading article images. Add a longer ^~ prefix match for the uploads
subdirectory so it wins over the restricted block, with 7d cache headers.
Paired with setting ANDEBOL_WORDPRESS_PUBLIC_URL=https://andebol.net in .env so
WordPress returns public image URLs instead of localhost:8081.
Co-Authored-By: Paperclip <[email protected]>
The institutional header/footer already imported ui-i18n.ts but the file was
missing from the repository. Add Portuguese/English UI strings, wire
config.locale through homepage sections, category archives, article cards,
and related articles, and use Intl.RelativeTimeFormat for relative dates.
Refs: BIT-586
Made-with: Cursor
Add domain-aware theme system (BIT-494, BIT-495, BIT-496, BIT-497):
- Theme architecture: move shared components into src/themes/sports/,
create src/themes/institutional/ with handball-oriented design
- Domain config: andebol.net.json (institutional theme, pt-PT locale,
handball categories, WP endpoint port 8081)
- theme.ts library: resolves theme components per domain config
- Updated layouts/pages to use theme-aware component loading
- Updated docs: domains.md, frontend.md with theme system docs
- Smoke test script for andebol.net
- WordPress .env.example with andebol env vars
Note: this work was completed in BIT-494/495/496/497 but was
never committed — committing now to unblock andebol.net deploy.
Co-Authored-By: Paperclip <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Use default_server and server_name _ so domains like andebol.net reach Astro
instead of the Debian nginx welcome page. Install map Host→WordPress port
(8080 default, andebol.net→8081). deploy.sh and webhook-deploy install
conf.d snippet and remove sites-enabled/default.
docs/deployment.md: document multi-domain NPM workflow.
Refs: BIT-345
Adds a second WordPress instance (wordpress-andebol) with its own MariaDB
(db-andebol) on port 8081 to support the andebol.net domain.
New env vars required in .env:
ANDEBOL_MYSQL_ROOT_PASSWORD
ANDEBOL_MYSQL_PASSWORD
ANDEBOL_WORDPRESS_PUBLIC_URL (optional, defaults to http://localhost:8081)
Closes BIT-507 (partial — WP deploy step).
Co-Authored-By: Paperclip <[email protected]>
Compose was stripping PHP $_ variables, breaking wp-config and causing
HTTP 500. Use $$ prefix so literals reach the container (BIT-471).
Made-with: Cursor
Expose WP_DEBUG, WP_DEBUG_LOG/DISPLAY, E_ALL + display_errors when
WORDPRESS_DEBUG=1 in wordpress/.env. Default off. For short-lived
diagnosis of opaque HTTP 500; disable after fix.
Made-with: Cursor
Add wordpress-ensure-public-url.sh (exit 2 when .env updated) and
wordpress-sync-options-url.sh to align siteurl/home with HTTPS. Wire
into deploy.sh and webhook-deploy.sh for /opt/news-platform only so
the board does not need manual .env or SQL for BIT-470/BIT-471.
Made-with: Cursor
Adds scripts/fix-wp-siteurl-home.sh for BIT-471: updates siteurl and home
via mysqli from the wordpress container (same path as runtime). Default URL
https://newsproject.bitreport.pt; override with WP_PUBLIC_URL. Run after DB
is healthy (verify-db-connection.sh).
Made-with: Cursor
Preserve X-Forwarded-Proto from the edge proxy in CT nginx so WordPress
sees HTTPS. When WORDPRESS_PUBLIC_URL still defaults to localhost:8080,
derive WP_HOME/WP_SITEURL from Host and forwarded headers for proxied
requests (X-Forwarded-For present). Document behaviour in deployment and
wordpress README.
Made-with: Cursor
Set WP_HOME/WP_SITEURL from WORDPRESS_PUBLIC_URL so login does not redirect
to http://localhost:8080 when using https://newsproject.bitreport.pt.
Trust X-Forwarded-Proto for HTTPS behind NPM. Document in .env.example and
docs/deployment.md checklist.
Refs: BIT-345
Made-with: Cursor
Align README and deployment.md with reality: allow/deny use $remote_addr
on the CT, so a private-IP reverse proxy makes /wp-admin/ reachable from
the public Internet. Add nginx header comments and optional real_ip notes.
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
Add scripts/verify-db-connection.sh to chain compose ps, db healthcheck,
and mysqli from the wordpress container. Document in README runbook,
deployment.md, and .env.example (password vs db_data drift).
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
- wordpress/docker-compose.yml: longer db start_period and retries for slow init
- wordpress/README.md: db healthcheck exec step and restart-loop note
- docs/deployment.md: replace stale MySQL 8 snippet with pointer to compose
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
Diagnose public /wp-admin/ errors that surface as WordPress database
connection failures: verify Docker db health, logs, and .env vs volume.
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
- Forward X-Site-Host from Astro to the bridge so loopback calls use the public domain JSON
- Normalize newsproject.bitreport.pt.json (categories slug/label, wp on 127.0.0.1:8080)
- Degrade homepage/trending when WordPress is down instead of 500
- Extend webhook-deploy.sh for config/ and wordpress/ changes; add deploy-hook-server + systemd unit
- Document automatic Gitea webhook flow in docs/deployment.md; align DOMAINS_CONFIG_PATH env
Co-Authored-By: Paperclip <[email protected]>
Made-with: Cursor
Without this, pino-pretty (devDep) was required at runtime causing
the bridge service to crash on first boot.
Co-Authored-By: Paperclip <[email protected]>