mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Remove Using YAML for metadata section
No longer necessary now we show YAML and JSON examples everywhere.
This commit is contained in:
parent
503545b203
commit
efc7357554
2 changed files with 2 additions and 29 deletions
|
|
@ -1190,7 +1190,7 @@ Also in this release:
|
||||||
0.40 (2020-04-21)
|
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`)
|
* 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`)
|
* 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`)
|
* 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`)
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ Your ``metadata.yaml`` file can look something like this:
|
||||||
.. [[[end]]]
|
.. [[[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
|
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
|
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]]]
|
.. [[[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:
|
||||||
|
|
||||||
Metadata reference
|
Metadata reference
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue