diff --git a/docs/metadata.rst b/docs/metadata.rst index 7aff7c15..76b785fb 100644 --- a/docs/metadata.rst +++ b/docs/metadata.rst @@ -30,12 +30,12 @@ Your ``metadata.yaml`` file can look something like this: .. code-block:: yaml + title: Custom title for your index page description: Some description text can go here license: ODbL license_url: https://opendatacommons.org/licenses/odbl/ source: Original Data Source source_url: http://example.com/ - title: Custom title for your index page .. tab:: JSON diff --git a/docs/metadata_doc.py b/docs/metadata_doc.py index e6c84e3b..19ddef89 100644 --- a/docs/metadata_doc.py +++ b/docs/metadata_doc.py @@ -6,7 +6,7 @@ import yaml def metadata_example(cog, example): cog.out("\n.. tab:: YAML\n\n") cog.out(" .. code-block:: yaml\n\n") - cog.out(textwrap.indent(yaml.dump(example), " ")) + cog.out(textwrap.indent(yaml.safe_dump(example, sort_keys=False), " ")) cog.out("\n\n.. tab:: JSON\n\n") cog.out(" .. code-block:: json\n\n") cog.out(textwrap.indent(json.dumps(example, indent=2), " "))