Remove Using YAML for metadata section

No longer necessary now we show YAML and JSON examples everywhere.
pull/2257/head
Simon Willison 2024-02-05 13:01:03 -08:00
rodzic 503545b203
commit efc7357554
2 zmienionych plików z 2 dodań i 29 usunięć

Wyświetl plik

@ -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`)

Wyświetl plik

@ -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
@ -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