Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metadata.json support for per-database and per-table information #165

Closed
simonw opened this issue Dec 7, 2017 · 2 comments
Closed

metadata.json support for per-database and per-table information #165

simonw opened this issue Dec 7, 2017 · 2 comments

Comments

@simonw
Copy link
Owner

simonw commented Dec 7, 2017

Every database and every table should be able to support the following optional metadata:

title
description
description_html
license
license_url
source
source_url

If description_html is provided it over-rides description and will be displayed unescaped.

@simonw
Copy link
Owner Author

simonw commented Dec 7, 2017

Here's an example metadata.json file illustrating custom per-database and per-
table metadata:

{
    "title": "Overall datasette title",
    "description_html": "This is a <em>description with HTML</em>.",
    "databases": {
        "db1": {
            "title": "First database",
            "description": "This is a string description & has no HTML",
            "license_url": "http://example.com/",
    		"license": "The example license",
            "queries": {
            	"canned_query": "select * from table1 limit 3;"
            },
            "tables": {
                "table1": {
                    "title": "Custom title for table1",
                    "description": "Tables can have descriptions too",
                    "source": "This has a custom source",
                    "source_url": "http://example.com/"
                }
            }
        }
    }
}

@simonw
Copy link
Owner Author

simonw commented Dec 7, 2017

Needs documentation, see #166

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant