Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ychab committed Nov 27, 2023
1 parent 82a52f7 commit fd66816
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions folioblog/core/factories/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class Meta:
skip_postgeneration_save = True

homepage = factory.SubFactory(PageFactory)
promopage = factory.SubFactory(PageFactory)
site = factory.LazyFunction(lambda: Site.objects.get(is_default_site=True))

@post_generation
Expand Down
7 changes: 6 additions & 1 deletion folioblog/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def get_context_data(self, **kwargs):

qs = (
BlogPage.objects.live()
.public()
.descendant_of(root_page)
.filter_language()
.select_related("image")
Expand All @@ -37,7 +38,11 @@ def get_context_data(self, **kwargs):
context["feed_title"] = rss_feed.get("title", "RSS feed")
context["feed_description"] = rss_feed.get("description", "")
context["blog_index"] = (
BlogIndexPage.objects.descendant_of(root_page).filter_language().first()
BlogIndexPage.objects.live()
.public()
.descendant_of(root_page)
.filter_language()
.first()
)

context["feed_items"] = []
Expand Down
2 changes: 1 addition & 1 deletion folioblog/templates/cleanblog/password_required.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% wagtail_site as current_site %}

{% block robots %}
<meta name="robots" content="noindex, nofollow">
<meta name="robots" content="noindex, nofollow, noarchive, nosnippet">
{% endblock robots %}
{% block meta %}{% endblock meta %}
{% block meta_og %}{% endblock %}
Expand Down

0 comments on commit fd66816

Please sign in to comment.