Skip to content

Commit

Permalink
feat: add robots.txt to fix #81 (#113)
Browse files Browse the repository at this point in the history
* feat: add robots.txt to fix #81

* feat: dynamic implementation
  • Loading branch information
maehr authored Jun 6, 2024
1 parent 545dcea commit 2afd954
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions utilities/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
#####
# generates a robots.txt based on https://developer.mozilla.org/en-US/docs/Glossary/Robots.txt
# blank if noindex: true is set in _config.yml
#####
permalink: /robots.txt
---
{%- if jekyll.environment == "production" and site.noindex != true -%}
User-agent: *
Allow: /

Sitemap: {{ site.url }}/robots.txt
{%- else -%}
User-agent: *
Disallow:
{%- endif -%}

0 comments on commit 2afd954

Please sign in to comment.