mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-29 18:36:55 +00:00
Authors already typed #hashtags in their bodies (37 of the 46 billets on gk2 carry one), so tags are EXTRACTED from the body rather than added via a picker: tagging costs the author nothing and applies retroactively. - migration 0004: tag(slug,emoji,label) + billet_tag, indexed on tag_slug. Extracted into rows rather than re-parsed per request, so filtering hits an index instead of LIKE-scanning every body. slug is accent-folded + lowercased (#Réseau == #reseau); emoji is STORED so a later curation change never silently restyles an already-published billet. - services/tags.py: curated map + extraction. The lookbehind keeps a URL anchor (page#anchor) from becoming a tag; unknown tags fall back to a neutral badge rather than being rejected. Map covers this box's real content (podcast/media) as well as the security/box vocabulary; genuinely ambiguous topics are left on the default rather than editorialised. - quick views: ?tag=slug on / and /feed.json, plus /tags.json and /admin/api/tags for the chip bar. Uses EXISTS, not a JOIN, so keyset paging cannot duplicate a row per matching tag; the pager carries the active tag. - feed resumes: long billets show a short excerpt + "Lire la suite"; short ones render whole. `is_long` is measured on the markdown-collapsed text, so a short billet padded with link syntax is not "resumed" into a copy of itself. - feed.json gains `summary` + `tags` (both JSON Feed 1.1 standard) with the emoji in the spec-legal `_secubox` extension; optional keys are omitted, not nulled. - GET /admin/api/billets: the authoring list. The public feed cannot serve it — its item id is a permalink URL (so edit/delete could not address a row, which is why they 404'd) and it hides drafts, which an authoring client must see. - manage.py backfill-tags: idempotent; also re-applies the curated map to existing tags as an explicit operator step. Verified on gk2: backfill tagged 37/46 billets; ?tag=podcast→37, jfk→4, nope→0; a draft's tag correctly stays out of the public chip bar; delete cascades. Co-Authored-By: Gerald KERMA <devel@cybermind.fr> |
||
|---|---|---|
| .. | ||
| migrations | ||
| routes | ||
| services | ||
| static | ||
| templates | ||
| __init__.py | ||
| asgi.py | ||
| db.py | ||
| ids.py | ||
| main.py | ||
| manage.py | ||
| models.py | ||
| repo.py | ||
| seed.py | ||