diff --git a/website/legacy/urls.py b/website/legacy/urls.py index 6b3eedd..0befc9c 100644 --- a/website/legacy/urls.py +++ b/website/legacy/urls.py @@ -10,4 +10,5 @@ urlpatterns = [ path("tags//", views.TagView.as_view()), path("tags/", views.TagsView.as_view()), path("categories/", views.TagsView.as_view()), + path("index.json", views.PageLinksView.as_view()), ] diff --git a/website/legacy/views.py b/website/legacy/views.py index 5b2aac1..1b45a47 100644 --- a/website/legacy/views.py +++ b/website/legacy/views.py @@ -12,6 +12,12 @@ class AllPagesFeedView(RedirectView): permanent = True +@method_decorator(cache_control(max_age=60 * 60), name="dispatch") +class PageLinksView(RedirectView): + pattern_name = "api:page-links" + permanent = True + + @method_decorator(cache_control(max_age=60 * 60), name="dispatch") class TagView(RedirectView): permanent = True