From 6505ae7c17ed2639e593ea8c59327ac5e6fa2eee Mon Sep 17 00:00:00 2001 From: Sean Hammond Date: Sat, 27 Apr 2013 17:08:51 +0200 Subject: [PATCH] [#534] Make reST labels for config settings consistent Make the reST label for cross-referencing each config setting the same as the name of the config setitng itself, e.g. ckan.activity_streams_email_notifications, don't mix and match different styles of ., _ and - like ckan-activity-streams-email-notifications, ckan_activity_streams_email_notifications, etc. --- doc/apps-ideas.rst | 2 +- doc/configuration.rst | 24 ++++++++++++------------ doc/email-notifications.rst | 9 ++++----- doc/i18n.rst | 2 +- doc/solr-setup.rst | 2 +- doc/tracking.rst | 2 +- 6 files changed, 20 insertions(+), 21 deletions(-) diff --git a/doc/apps-ideas.rst b/doc/apps-ideas.rst index e63657f8f54..7477a9ada26 100644 --- a/doc/apps-ideas.rst +++ b/doc/apps-ideas.rst @@ -4,4 +4,4 @@ Apps & Ideas Since 1.7 CKAN has a feature called Apps & Ideas which allows users to provide information on apps, ideas, visualizations, articles etc that are related to a specific dataset. Once created these items will be shown against the dataset but also shown on the apps dashboard which will allow users to filter the results based on popularity, or type, or the data when the items were created. -This feature is enabled by default but can be disabled using the :ref:`config-apps-ideas` setting to hide the tab on the dataset pages. +This feature is enabled by default but can be disabled using the :ref:`ckan.dataset.show_apps_ideas` setting to hide the tab on the dataset pages. diff --git a/doc/configuration.rst b/doc/configuration.rst index ccedb5043e6..34c0fb9c652 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -49,7 +49,7 @@ This defines the database that CKAN is to use. The format is:: Site Settings ------------- -.. _ckan-site-url: +.. _ckan.site_url: ckan.site_url ^^^^^^^^^^^^^ @@ -147,7 +147,7 @@ Default value: (none) This controls if new datasets will require moderation approval before going public. -.. _ckan-tracking-enabled: +.. _ckan.tracking_enabled: ckan.tracking_enabled ^^^^^^^^^^^^^^^^^^^^^ @@ -276,7 +276,7 @@ Allow new user accounts to be created via the API. Search Settings --------------- -.. _ckan-site-id: +.. _ckan.site_id: ckan.site_id ^^^^^^^^^^^^ @@ -302,7 +302,7 @@ Default value: ``false`` Switching this on tells CKAN search functionality to just query the database, (rather than using Solr). In this setup, search is crude and limited, e.g. no full-text search, no faceting, etc. However, this might be very useful for getting up and running quickly with CKAN. -.. _solr-url: +.. _solr_url: solr_url ^^^^^^^^ @@ -440,7 +440,7 @@ This controls if we'll use the 1 day cache for stats. Front-End Settings ------------------ -.. _ckan-site-title: +.. _ckan.site_title: ckan.site_title ^^^^^^^^^^^^^^^ @@ -613,7 +613,7 @@ This sets a space-separated list of extra field key values which will not be sho .. warning:: While this is useful to e.g. create internal notes, it is not a security measure. The keys will still be available via the API and in revision diffs. -.. _config-apps-ideas: +.. _ckan.dataset.show_apps_ideas: ckan.dataset.show_apps_ideas ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -844,7 +844,7 @@ Default value: ``True`` Turns on and off the activity streams used to track changes on datasets, groups, users, etc -.. _ckan-activity-streams-email-notifications: +.. _ckan.activity_streams_email_notifications: ckan.activity_streams_email_notifications ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -884,7 +884,7 @@ Example:: Default value: ``(none)`` -This controls the feed author's name. If unspecified, it'll use :ref:`ckan-site-id`. +This controls the feed author's name. If unspecified, it'll use :ref:`ckan.site_id`. ckan.feeds.author_link ^^^^^^^^^^^^^^^^^^^^^^ @@ -895,7 +895,7 @@ Example:: Default value: ``(none)`` -This controls the feed author's link. If unspecified, it'll use :ref:`ckan-site-url`. +This controls the feed author's link. If unspecified, it'll use :ref:`ckan.site_url`. ckan.feeds.authority_name ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -906,7 +906,7 @@ Example:: Default value: ``(none)`` -The domain name or email address of the default publisher of the feeds and elements. If unspecified, it'll use :ref:`ckan-site-url`. +The domain name or email address of the default publisher of the feeds and elements. If unspecified, it'll use :ref:`ckan.site_url`. ckan.feeds.date ^^^^^^^^^^^^^^^ @@ -982,7 +982,7 @@ Default value: (none) By default, the locales are searched for in the ``ckan/i18n`` directory. Use this option if you want to use another folder. -.. _ckan_root_path: +.. _ckan.root_path: ckan.root_path ^^^^^^^^^^^^^^ @@ -1090,7 +1090,7 @@ Default value: ``None`` The password used to authenticate with the SMTP server. -.. _smtp-mail-from: +.. _smtp.mail_from: smtp.mail_from ^^^^^^^^^^^^^^ diff --git a/doc/email-notifications.rst b/doc/email-notifications.rst index 5b0f6ce7661..2f8c9c166d1 100644 --- a/doc/email-notifications.rst +++ b/doc/email-notifications.rst @@ -43,26 +43,25 @@ notifications for a CKAN site, a sysadmin must: 2. CKAN will not send out any email notifications, nor show the email notifications preference to users, unless the - :ref:`ckan-activity-streams-email-notifications` option is set to ``True``, so + :ref:`ckan.activity_streams_email_notifications` option is set to ``True``, so put this line in the ``[app:main]`` section of your CKAN config file:: ckan.activity_streams_email_notifications = True -3. Make sure that :ref:`ckan-site-url` is set correctly in the ``[app:main]`` +3. Make sure that :ref:`ckan.site_url` is set correctly in the ``[app:main]`` section of your CKAN configuration file. This is used to generate links in the bodies of the notification emails. For example:: ckan.site_url = http://publicdata.eu - -4. Make sure that :ref:`smtp-mail-from` is set correctly in the ``[app:main]`` +4. Make sure that :ref:`smtp.mail_from` is set correctly in the ``[app:main]`` section of your CKAN configuration file. This is the email address that CKAN's email notifications will appear to come from. For example:: smtp.mail_from = mailman@publicdata.eu - This is combined with your :ref:`ckan-site-title` to form the ``From:`` header + This is combined with your :ref:`ckan.site_title` to form the ``From:`` header of the email that are sent, for example:: From: PublicData.eu diff --git a/doc/i18n.rst b/doc/i18n.rst index 48860880209..9d90ce18b23 100644 --- a/doc/i18n.rst +++ b/doc/i18n.rst @@ -6,7 +6,7 @@ Internationalize CKAN CKAN is used in many countries, and adding a new language to the web interface is a simple process. -CKAN uses the url to determine which language is used. An example would be ``/fr/dataset`` would be shown in french. If CKAN is running under a directory then an example would be ``/root/fr/dataset``. For custom paths check the :ref:`ckan_root_path` config option. +CKAN uses the url to determine which language is used. An example would be ``/fr/dataset`` would be shown in french. If CKAN is running under a directory then an example would be ``/root/fr/dataset``. For custom paths check the :ref:`ckan.root_path` config option. .. Note: Storing metadata field values in more than one language is a separate topic. This is achieved by storing the translations in extra fields. A custom dataset form and dataset display template are recommended. Ask the CKAN team for more information. diff --git a/doc/solr-setup.rst b/doc/solr-setup.rst index 840756f679e..ad447fd4682 100644 --- a/doc/solr-setup.rst +++ b/doc/solr-setup.rst @@ -261,4 +261,4 @@ When a new version of the schema becomes available, a new core is created, with latest schema.xml file in the CKAN source. That way, CKAN instances that use an older version of the schema can still point to the core that uses it, while more recent versions can point to the latest one. When old versions of CKAN are updated, they only need to change their -:ref:`solr-url` setting to point to the suitable Solr core. +:ref:`solr_url` setting to point to the suitable Solr core. diff --git a/doc/tracking.rst b/doc/tracking.rst index d7ce42e94f7..6c8d6865e40 100644 --- a/doc/tracking.rst +++ b/doc/tracking.rst @@ -23,7 +23,7 @@ Enabling Page View Tracking To enable page view tracking: -1. Set :ref:`ckan-tracking-enabled` to true in the ``[app:main]`` section of your +1. Set :ref:`ckan.tracking_enabled` to true in the ``[app:main]`` section of your CKAN configuration file (e.g. ``development.ini`` or ``production.ini``):: [app:main]