- Configure Wagtail database search backend with English search config - Add django.contrib.postgres to INSTALLED_APPS for full PG FTS support - Expand ArticlePage.search_fields: body_text (excl. code blocks), AutocompleteField(title), RelatedFields(tags), FilterFields - Add search view at /search/?q= with query guards (strip, max 200 chars, empty/whitespace handling) and pagination preserving query param - Replace nav Subscribe CTA with compact search box (desktop + mobile) - Add search box to article index page alongside category/tag filters - Create search results template reusing article_card component - Add update_index to deploy entrypoint for automated reindexing - Update existing tests for nav change, add comprehensive search tests Closes #41 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
24 lines
642 B
Bash
Executable File
24 lines
642 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
python manage.py tailwind install --no-input
|
|
python manage.py tailwind build
|
|
python manage.py migrate --noinput
|
|
python manage.py collectstatic --noinput
|
|
python manage.py update_index
|
|
|
|
# Set Wagtail site hostname from first entry in ALLOWED_HOSTS
|
|
python manage.py shell -c "
|
|
from wagtail.models import Site
|
|
import os
|
|
hostname = os.environ.get('ALLOWED_HOSTS', 'localhost').split(',')[0].strip()
|
|
Site.objects.update(hostname=hostname, port=443, site_name='No Hype AI')
|
|
"
|
|
|
|
exec gunicorn config.wsgi:application \
|
|
--workers 3 \
|
|
--bind 0.0.0.0:8000 \
|
|
--access-logfile - \
|
|
--error-logfile - \
|
|
--capture-output
|