Skip to content

Commit

Permalink
Remove Using YAML for metadata section
Browse files Browse the repository at this point in the history
No longer necessary now we show YAML and JSON examples everywhere.
  • Loading branch information
simonw committed Feb 5, 2024
1 parent 503545b commit efc7357
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
2 changes: 1 addition & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ Also in this release:
0.40 (2020-04-21)
-----------------

* Datasette :ref:`metadata` can now be provided as a YAML file as an optional alternative to JSON. See :ref:`metadata_yaml`. (:issue:`713`)
* Datasette :ref:`metadata` can now be provided as a YAML file as an optional alternative to JSON. (:issue:`713`)
* Removed support for ``datasette publish now``, which used the the now-retired Zeit Now v1 hosting platform. A new plugin, `datasette-publish-now <https://github.com/simonw/datasette-publish-now>`__, can be installed to publish data to Zeit (`now Vercel <https://vercel.com/blog/zeit-is-now-vercel>`__) Now v2. (:issue:`710`)
* Fixed a bug where the ``extra_template_vars(request, view_name)`` plugin hook was not receiving the correct ``view_name``. (:issue:`716`)
* Variables added to the template context by the ``extra_template_vars()`` plugin hook are now shown in the ``?_context=1`` debugging mode (see :ref:`setting_template_debug`). (:issue:`693`)
Expand Down
29 changes: 1 addition & 28 deletions docs/metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Your ``metadata.yaml`` file can look something like this:
.. [[[end]]]
Choosing YAML over JSON adds support for multi-line strings and comments, see :ref:`metadata_yaml`.
Choosing YAML over JSON adds support for multi-line strings and comments.

The above metadata will be displayed on the index page of your Datasette-powered
site. The source and license information will also be included in the footer of
Expand Down Expand Up @@ -664,33 +664,6 @@ SpatiaLite tables are automatically hidden) using ``"hidden": true``:
}
.. [[[end]]]
.. _metadata_yaml:

Using YAML for metadata
-----------------------

Datasette accepts YAML as an alternative to JSON for your metadata configuration file.
YAML is particularly useful for including multiline HTML and SQL strings, plus inline comments.

Here's an example of a ``metadata.yml`` file, re-using an example from :ref:`canned_queries`.

.. code-block:: yaml
title: Demonstrating Metadata from YAML
description_html: |-
<p>This description includes a long HTML string</p>
<ul>
<li>YAML is better for embedding HTML strings than JSON!</li>
</ul>
license: ODbL
license_url: https://opendatacommons.org/licenses/odbl/
databases:
fixtures:
tables:
no_primary_key:
hidden: true
.. _metadata_reference:

Metadata reference
Expand Down

0 comments on commit efc7357

Please sign in to comment.