Add noindex pages, robots.txt and operator footer
- Page.noindex: marked pages get a robots meta tag and a Disallow line in the generated robots.txt (single source of truth in src/pages.py) - templates/robots.txt: public pages indexable, noindex pages and data files not - Footer shows an optional operator line from contents/snippets/footer_operator.md - Tests for robots.txt, noindex meta and footer Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>50Ω – lär dig amatörradio</title>
|
||||
{% if robots %}
|
||||
<meta name="robots" content="{{ robots }}">
|
||||
{% endif %}
|
||||
{% if social_image %}
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="50Ω">
|
||||
@@ -153,8 +156,7 @@
|
||||
Inte godkänd av DARC eller SSA.
|
||||
</div>
|
||||
<div class="fiftyohm-footer-links d-flex gap-2">
|
||||
{# TODO: The operator must add their own imprint / contact details and privacy information here. #}
|
||||
<span class="text-secondary">[Utgivare, kontakt och integritetspolicy – ska fyllas i av driftansvarig]</span>
|
||||
{% if footer_operator %}<span class="text-secondary">{{ footer_operator }}</span>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# robots.txt – generated by the site generator, do not edit by hand.
|
||||
# The course pages may be crawled and indexed. Pages with contact details may not.
|
||||
|
||||
User-agent: *
|
||||
Allow: /
|
||||
{% for page in noindex_pages -%}
|
||||
Disallow: /{{ page }}
|
||||
{% endfor -%}
|
||||
# Data files (search indexes etc.) are not pages
|
||||
Disallow: /*.json$
|
||||
Disallow: /*.zip$
|
||||
Reference in New Issue
Block a user