mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-10 19:01:01 +00:00
Adds robots.txt
This commit is contained in:
parent
662ddf44b9
commit
4115edad6e
2 changed files with 10 additions and 1 deletions
5
bookwyrm/templates/robots.txt
Normal file
5
bookwyrm/templates/robots.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
||||
|
||||
User-agent: *
|
||||
Disallow: /static/js/
|
||||
Disallow: /static/css/
|
|
@ -2,7 +2,7 @@
|
|||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import path, re_path
|
||||
|
||||
from django.views.generic.base import TemplateView
|
||||
|
||||
from bookwyrm import settings, views
|
||||
from bookwyrm.utils import regex
|
||||
|
@ -27,6 +27,10 @@ handler404 = "bookwyrm.views.not_found_page"
|
|||
handler500 = "bookwyrm.views.server_error_page"
|
||||
urlpatterns = [
|
||||
path("admin/", admin.site.urls),
|
||||
path(
|
||||
"robots.txt",
|
||||
TemplateView.as_view(template_name="robots.txt", content_type="text/plain"),
|
||||
),
|
||||
# federation endpoints
|
||||
re_path(r"^inbox/?$", views.Inbox.as_view()),
|
||||
re_path(r"%s/inbox/?$" % local_user_path, views.Inbox.as_view()),
|
||||
|
|
Loading…
Reference in a new issue