Skip to content

404 search + category pillar intros - #75

Merged
rivassec merged 1 commit into
mainfrom
404-search-and-category-pillars
Sep 12, 2026
Merged

404 search + category pillar intros#75
rivassec merged 1 commit into
mainfrom
404-search-and-category-pillars

Conversation

@rivassec

Copy link
Copy Markdown
Owner

This PR bundles two related landing-page improvements. The pillar-intro copy in Part B is a DRAFT for review - see the flag below.

Part A: 404 page rebuilt around Pagefind search

A mistyped URL now lands on a recovery page instead of a two-link dead end.

  • New custom template themes/Flex/templates/404.html extends base.html, mirroring pagefind_search.html: it loads pagefind-ui.css in the meta block and pagefind-ui.js + the external search-init.js in additional_js.
  • The search box targets the same #search div that search-init.js initializes, so the site-wide Pagefind index is reused as-is.
  • Curated static links (home, DevSecOps guide, all categories, full search page) replace the old two links. Pelican page templates get no articles context, so these are intentionally static, not a dynamic recent-posts list.
  • content/pages/404.md now sets Template: 404. The page stays Status: hidden, so base.html emits noindex, nofollow and it stays out of the sitemap.
  • No inline scripts or styles - csp_audit.py passes.

Part B: category pillar intros with links

  • category.html now renders CATEGORY_INTROS[...] through the |safe filter (autoescape was turning HTML/links into literal text). Every intro carries its own <p> blocks for consistency.
  • Expanded the three well-populated categories (DevSecOps 15 posts, Threat Intelligence 2, Projects 2) into 1-2 paragraph pillar intros that describe the cluster and link key posts with absolute https://rivassec.com/<slug>.html URLs (config strings cannot resolve {filename}).
  • Single-post categories (Kubernetes Security, Incident Retrospectives) keep their one-line intros, wrapped in <p>.

REVIEW FLAG: the pillar-intro copy is a draft. Please check voice and the specific posts linked before merge.

Verification

Built with pelican content -o output -s publishconf.py. All green:

  • output/404.html has the #search div, references /pagefind/pagefind-ui.js and /theme/js/search-init.js, carries noindex, nofollow, no canonical, and no inline script code.
  • output/category/{devsecops,threat-intelligence,projects}.html render the intros with working <a> links (0 escaped-link occurrences).
  • Pass: csp_audit, check_canonical_noindex, check_wellknown_llms, check_link_graph, check_descriptions, check_em_dashes, check_anchors, and python3 -m unittest discover tests (38 tests OK).

Part A: rebuild the 404 page around Pagefind search. New custom template
themes/Flex/templates/404.html extends base.html, loads pagefind-ui.css in
the meta block and pagefind-ui.js + the external search-init.js in
additional_js, and targets the same #search div /search/ uses. Curated
recovery links (home, DevSecOps guide, categories, search) replace the old
two-link body. No inline scripts or styles (csp_audit clean); page stays
hidden/noindex.

Part B: allow HTML in category intros (category.html now renders
CATEGORY_INTROS with |safe) and expand the three well-populated categories
(DevSecOps, Threat Intelligence, Projects) into pillar intros that link key
posts with absolute URLs. Single-post categories keep one-line intros.
@rivassec
rivassec merged commit 7cef607 into main Sep 12, 2026
18 checks passed
@rivassec
rivassec deleted the 404-search-and-category-pillars branch September 12, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant