Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cfgov/v1/jinja2/v1/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
{%- endblock -%}
">
<meta name="searchgov_custom1" content="{{ language }}">
<meta name="searchgov_custom2" content="{{ self.desc() }}">
<meta name="searchgov_custom2" content="{{ encode_b32_string(self.desc()) }}">
Comment thread
wpears marked this conversation as resolved.

{# Always open preview panel links in a new tab. #}
{% if request.in_preview_panel %}
Expand Down
7 changes: 7 additions & 0 deletions cfgov/v1/jinja2tags/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from base64 import b32encode

from jinja2 import pass_context
from jinja2.ext import Extension

Expand Down Expand Up @@ -51,6 +53,10 @@ def unique_id_in_context(context):
return get_unique_id()


def encode_b32_string(s):
return b32encode(s.encode("utf-8")).decode("utf-8")


class V1Extension(Extension):
def __init__(self, environment):
super().__init__(environment)
Expand All @@ -63,6 +69,7 @@ def __init__(self, environment):
"get_unique_id": get_unique_id,
"is_filter_selected": pass_context(is_filter_selected),
"unique_id_in_context": pass_context(unique_id_in_context),
"encode_b32_string": encode_b32_string,
"app_url": app_url,
"app_page_url": app_page_url,
}
Expand Down
2 changes: 1 addition & 1 deletion cfgov/v1/sitemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Sitemap(WagtailSitemap):
# Used to set a minimum modified date for all pages in the sitemap.
# This can be updated to trigger sitemap updates that are not reflected
# in Wagtail page publish events.
MIN_SITEMAP_DATE = datetime(2025, 6, 4, tzinfo=timezone.utc)
MIN_SITEMAP_DATE = datetime(2025, 7, 9, tzinfo=timezone.utc)
latest_lastmod = MIN_SITEMAP_DATE

def get_urls(self, page=1, site=None, protocol=None):
Expand Down
Loading