diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..682321746a6ec7cd823211c7a7882077b09c3c32 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,34 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- Custom robots.txt file. + +### Changed + +- Migrated controllers to blueprints (Pylons to Flask). +- UI and webasset upgrades. +- Nosetests changed to pytests. + +### Removed + +- Support for Python2 removed. + +## [1.4.3] - 2022-11-03 + +### Added + +- Added "Musterdatenkatalog" references to RDF + +## [1.4.2] - 2022-10-24 + +## [1.4.1] - 2022-08-17 + +## [1.4.0] - 2022-08-11 diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py index b270fc0b402816ba0c8608a2ec9d0a4b192ad355..0539798a3ffa267a334a220b717342b924e84545 100644 --- a/ckanext/odsh/plugin.py +++ b/ckanext/odsh/plugin.py @@ -53,6 +53,7 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm rules = [ ('/info_page', 'info_page', default.info_page), ('/home', 'start', default.start), + ('/robots.txt', 'robots_txt', default.robots_txt), ('/not_found', 'not_found', default.not_found), ] for rule in rules: bp_default.add_url_rule(*rule) diff --git a/ckanext/odsh/templates/robots.txt b/ckanext/odsh/templates/robots.txt new file mode 100644 index 0000000000000000000000000000000000000000..c32396215b6b723559fb66fd4b0cdcd3ac7e3da1 --- /dev/null +++ b/ckanext/odsh/templates/robots.txt @@ -0,0 +1,18 @@ +User-agent: SemrushBot +Disallow: / + +User-agent: PetalBot +Disallow: / + +User-agent: DataForSeoBot +Disallow: / + +User-agent: SEOkicks +Disallow: / + +User-agent: * +Disallow: /dataset/rate/ +Disallow: /revision/ +Disallow: /dataset/*/history +Disallow: /api/ +Crawl-Delay: 10 \ No newline at end of file diff --git a/ckanext/odsh/views/default.py b/ckanext/odsh/views/default.py index 0058076e06e1e84903ca2320491edf6e53107ea7..aee7f4f8fa10eb908dfddb32f1598a14f54846fd 100644 --- a/ckanext/odsh/views/default.py +++ b/ckanext/odsh/views/default.py @@ -17,3 +17,7 @@ def start(): def not_found(): log.info("views.default::not_found") toolkit.abort(404) + +def robots_txt(): + log.info("views.default::robots_txt") + return toolkit.render(u'robots.txt')