Skip to content

Commit 1f02e2b

Browse files
simonwclaude
andcommitted
Fix broken and redirecting demo links in the docs
Replaced links to fivethirtyeight.datasettes.com and the defunct register-of-members-interests.datasettes.com with latest.datasette.io and datasette.io equivalents, updated old ?sql= URL shapes to /-/query, avoided datasette.io URLs that trigger the turnstile check, dropped links to demos that now 404/500, and removed the docs for the /-/metadata endpoint which no longer exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent dc0b0c5 commit 1f02e2b

17 files changed

Lines changed: 41 additions & 62 deletions

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The license and source information will be displayed on the index page and in th
7474

7575
## datasette publish
7676

77-
If you have [Heroku](https://heroku.com/) or [Google Cloud Run](https://cloud.google.com/run/) configured, Datasette can deploy one or more SQLite databases to the internet with a single command:
77+
If you have [Heroku](https://www.heroku.com/) or [Google Cloud Run](https://cloud.google.com/run/) configured, Datasette can deploy one or more SQLite databases to the internet with a single command:
7878

7979
datasette publish heroku database.db
8080

‎docs/authentication.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ To limit access to the ``users`` table in your ``bakery.db`` database:
717717
This works for SQL views as well - you can list their names in the ``"tables"`` block above in the same way as regular tables.
718718

719719
.. warning::
720-
Restricting access to tables and views in this way will NOT prevent users from querying them using arbitrary SQL queries, `like this <https://latest.datasette.io/fixtures?sql=select+*+from+facetable>`__ for example.
720+
Restricting access to tables and views in this way will NOT prevent users from querying them using arbitrary SQL queries, `like this <https://latest.datasette.io/fixtures/-/query?sql=select+*+from+facetable>`__ for example.
721721

722722
If you are restricting access to specific tables you should also use the ``"allow_sql"`` block to prevent users from bypassing the limit with their own SQL queries - see :ref:`authentication_permissions_execute_sql`.
723723

‎docs/binary_data.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ https://latest.datasette.io/fixtures/binary_data/1.blob?_blob_column=data
9797

9898
This output format can also be used to return binary data from an arbitrary SQL query. Since such queries do not specify an exact row, an additional ``?_blob_hash=`` parameter can be used to specify the SHA-256 hash of the value that is being linked to.
9999

100-
Consider the query ``select data from binary_data`` - `demonstrated here <https://latest.datasette.io/fixtures?sql=select+data+from+binary_data>`__.
100+
Consider the query ``select data from binary_data`` - `demonstrated here <https://latest.datasette.io/fixtures/-/query?sql=select+data+from+binary_data>`__.
101101

102102
That page links to the binary value downloads. Those links look like this:
103103

104-
https://latest.datasette.io/fixtures.blob?sql=select+data+from+binary_data&_blob_column=data&_blob_hash=f3088978da8f9aea479ffc7f631370b968d2e855eeb172bea7f6c7a04262bb6d
104+
https://latest.datasette.io/fixtures/-/query.blob?sql=select+data+from+binary_data&_blob_column=data&_blob_hash=f3088978da8f9aea479ffc7f631370b968d2e855eeb172bea7f6c7a04262bb6d
105105

106106
These ``.blob`` links are also returned in the ``.csv`` and ``.tsv`` exports Datasette provides for binary tables and queries, since those formats do not have a mechanism for representing binary data.
107107

‎docs/contributing.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ To update these pages, run the following command::
312312
Documentation screenshots
313313
~~~~~~~~~~~~~~~~~~~~~~~~~
314314

315-
Screenshots in the documentation are defined in ``docs/shots.yml`` and taken using `shot-scraper <https://shot-scraper.datasette.io/>`__. That file starts a Datasette server that loads JavaScript from ``docs/shots/``, then saves each screenshot as a WebP image in ``docs/images/``.
315+
Screenshots in the documentation are defined in ``docs/shots.yml`` and taken using `shot-scraper <https://shot-scraper.datasette.io/en/stable/>`__. That file starts a Datasette server that loads JavaScript from ``docs/shots/``, then saves each screenshot as a WebP image in ``docs/images/``.
316316

317317
To take any screenshots that do not exist yet, run::
318318

‎docs/deploying.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ These two files should be enough to deploy Datasette on any host that supports b
123123

124124
If you want to build SQLite files or download them as part of the deployment process you can do so using a ``bin/post_compile`` file. For example, the following ``bin/post_compile`` will download an example database that will then be served by Datasette::
125125

126-
wget https://fivethirtyeight.datasettes.com/fivethirtyeight.db
126+
wget https://latest.datasette.io/fixtures.db
127127

128128
`simonw/buildpack-datasette-demo <https://github.com/simonw/buildpack-datasette-demo>`__ is an example GitHub repository showing a Datasette configuration that can be deployed to a buildpack-supporting host.
129129

‎docs/ecosystem.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The `Datasette project website <https://datasette.io/>`__ includes a directory o
1616
sqlite-utils
1717
============
1818

19-
`sqlite-utils <https://sqlite-utils.datasette.io/>`__ is a key building block for the wider Datasette ecosystem. It provides a collection of utilities for manipulating SQLite databases, both as a Python library and a command-line utility. Features include:
19+
`sqlite-utils <https://sqlite-utils.datasette.io/en/stable/>`__ is a key building block for the wider Datasette ecosystem. It provides a collection of utilities for manipulating SQLite databases, both as a Python library and a command-line utility. Features include:
2020

2121
- Insert data into a SQLite database from JSON, CSV or TSV, automatically creating tables with the correct schema or altering existing tables to add missing columns.
2222
- Configure tables for use with SQLite full-text search, including creating triggers needed to keep the search index up-to-date.

‎docs/facets.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Datasette facets can be used to add a faceted browse interface to any database t
77
With facets, tables are displayed along with a summary showing the most common values in specified columns.
88
These values can be selected to further filter the table.
99

10-
Here's `an example <https://datasette.io/legislators/legislator_terms?_facet=type&_facet=party&_facet=state&_facet_size=10>`__:
10+
Here's `an example <https://latest.datasette.io/fixtures/facetable?_facet=state&_facet=_city_id&_facet=on_earth>`__ against a demo table. This screenshot shows facets against a table of US legislators:
1111

1212
.. image:: https://raw.githubusercontent.com/simonw/datasette-screenshots/0.62/non-retina/faceting-details.png
1313
:alt: Screenshot showing facets against a table of congressional legislators. Suggested facets include state_rank and start and end dates, and the displayed facets are state, party and type. Each facet lists values along with a count of rows for each value.

‎docs/full_text_search.rst‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Full-text search
55

66
SQLite includes `a powerful mechanism for enabling full-text search <https://www.sqlite.org/fts3.html>`_ against SQLite records. Datasette can detect if a table has had full-text search configured for it in the underlying database and display a search interface for filtering that table.
77

8-
Here's `an example search <https://register-of-members-interests.datasettes.com/regmem/items?_search=hamper&_sort_desc=date>`__:
8+
Here's `an example search <https://datasette.io/content/repos?_search=csv>`__ for Datasette ecosystem repositories mentioning "csv". This screenshot shows a search against a table of items registered by UK MPs:
99

1010
.. image:: https://raw.githubusercontent.com/simonw/datasette-screenshots/0.62/non-retina/regmem-search.png
1111
:alt: Screenshot showing a search for hampers against a table full of items - 453 results are returned.
@@ -120,31 +120,31 @@ Searches using custom SQL
120120

121121
You can include full-text search results in custom SQL queries. The general pattern with SQLite search is to run the search as a sub-select that returns rowid values, then include those rowids in another part of the query.
122122

123-
You can see the syntax for a basic search by running that search on a table page and then clicking "View and edit SQL" to see the underlying SQL. For example, consider this search for `repositories mentioning "csv" <https://datasette.io/content/repos?_search=csv>`_::
123+
You can see the syntax for a basic search by running that search on a table page and then clicking "View and edit SQL" to see the underlying SQL. For example, consider this search for `rows mentioning "dog" <https://latest.datasette.io/fixtures/searchable?_search=dog>`_::
124124

125-
/content/repos?_search=csv
125+
/fixtures/searchable?_search=dog
126126

127-
The generated SQL selects all columns in the table. This simplified version selects just the repository ID, full name and description, using the same full-text search condition. `Run this query <https://datasette.io/content?sql=select%0A++id%2C%0A++full_name%2C%0A++description%0Afrom%0A++repos%0Awhere%0A++rowid+in+%28%0A++++select%0A++++++rowid%0A++++from%0A++++++repos_fts%0A++++where%0A++++++repos_fts+match+escape_fts%28%3Asearch%29%0A++%29%0Aorder+by%0A++id%0Alimit%0A++101&search=csv>`_ with ``search`` set to ``csv``:
127+
The generated SQL selects all columns in the table. This simplified version selects just the primary key and the two text columns, using the same full-text search condition. `Run this query <https://latest.datasette.io/fixtures/-/query?sql=select%0A++pk%2C%0A++text1%2C%0A++text2%0Afrom%0A++searchable%0Awhere%0A++rowid+in+%28%0A++++select%0A++++++rowid%0A++++from%0A++++++searchable_fts%0A++++where%0A++++++searchable_fts+match+escape_fts%28%3Asearch%29%0A++%29%0Aorder+by%0A++pk%0Alimit%0A++101&search=dog>`_ with ``search`` set to ``dog``:
128128

129129
.. code-block:: sql
130130
131131
select
132-
id,
133-
full_name,
134-
description
132+
pk,
133+
text1,
134+
text2
135135
from
136-
repos
136+
searchable
137137
where
138138
rowid in (
139139
select
140140
rowid
141141
from
142-
repos_fts
142+
searchable_fts
143143
where
144-
repos_fts match escape_fts(:search)
144+
searchable_fts match escape_fts(:search)
145145
)
146146
order by
147-
id
147+
pk
148148
limit
149149
101
150150
@@ -163,7 +163,7 @@ To set up full-text search for a table, you need to do two things:
163163
Configuring FTS using sqlite-utils
164164
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
165165

166-
`sqlite-utils <https://sqlite-utils.datasette.io/>`__ is a CLI utility and Python library for manipulating SQLite databases. You can use `it from Python code <https://sqlite-utils.datasette.io/en/latest/python-api.html#enabling-full-text-search>`__ to configure FTS search, or you can achieve the same goal `using the accompanying command-line tool <https://sqlite-utils.datasette.io/en/latest/cli.html#configuring-full-text-search>`__.
166+
`sqlite-utils <https://sqlite-utils.datasette.io/en/stable/>`__ is a CLI utility and Python library for manipulating SQLite databases. You can use `it from Python code <https://sqlite-utils.datasette.io/en/latest/python-api.html#enabling-full-text-search>`__ to configure FTS search, or you can achieve the same goal `using the accompanying command-line tool <https://sqlite-utils.datasette.io/en/latest/cli.html#configuring-full-text-search>`__.
167167

168168
Here's how to use ``sqlite-utils`` to enable full-text search for an ``items`` table across the ``name`` and ``description`` columns::
169169

@@ -179,7 +179,7 @@ If your data starts out in CSV files, you can use Datasette's companion tool `cs
179179
Configuring FTS by hand
180180
~~~~~~~~~~~~~~~~~~~~~~~
181181

182-
We recommend using `sqlite-utils <https://sqlite-utils.datasette.io/>`__, but if you want to hand-roll a SQLite full-text search table you can do so using the following SQL.
182+
We recommend using `sqlite-utils <https://sqlite-utils.datasette.io/en/stable/>`__, but if you want to hand-roll a SQLite full-text search table you can do so using the following SQL.
183183

184184
To enable full-text search for a table called ``items`` that works against the ``name`` and ``description`` columns, you would run this SQL to create a new ``items_fts`` FTS virtual table:
185185

‎docs/getting_started.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Play with a live demo
99
The best way to experience Datasette for the first time is with a demo:
1010

1111
* `datasette.io/global-power-plants <https://datasette.io/global-power-plants/global-power-plants>`__ provides a searchable database of power plants around the world, using data from the `World Resources Institude <https://www.wri.org/publication/global-power-plant-database>`__ rendered using the `datasette-cluster-map <https://github.com/simonw/datasette-cluster-map>`__ plugin.
12-
* `fivethirtyeight.datasettes.com <https://fivethirtyeight.datasettes.com/fivethirtyeight>`__ shows Datasette running against over 400 datasets imported from the `FiveThirtyEight GitHub repository <https://github.com/fivethirtyeight/data>`__.
12+
* `latest.datasette.io <https://latest.datasette.io/>`__ runs the latest version of Datasette from the main branch against the test fixtures database, demonstrating most of Datasette's features.
1313

1414
.. _getting_started_tutorial:
1515

@@ -20,7 +20,7 @@ Datasette has several `tutorials <https://datasette.io/tutorials>`__ to help you
2020

2121
- `Exploring a database with Datasette <https://datasette.io/tutorials/explore>`__ shows how to use the Datasette web interface to explore a new database.
2222
- `Learn SQL with Datasette <https://datasette.io/tutorials/learn-sql>`__ introduces SQL, and shows how to use that query language to ask questions of your data.
23-
- `Cleaning data with sqlite-utils and Datasette <https://datasette.io/tutorials/clean-data>`__ guides you through using `sqlite-utils <https://sqlite-utils.datasette.io/>`__ to turn a CSV file into a database that you can explore using Datasette.
23+
- `Cleaning data with sqlite-utils and Datasette <https://datasette.io/tutorials/clean-data>`__ guides you through using `sqlite-utils <https://sqlite-utils.datasette.io/en/stable/>`__ to turn a CSV file into a database that you can explore using Datasette.
2424

2525
.. _getting_started_datasette_lite:
2626

‎docs/index.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Datasette is a tool for exploring and publishing data. It helps people take data
2525

2626
Datasette is aimed at data journalists, museum curators, archivists, local governments and anyone else who has data that they wish to share with the world. It is part of a :ref:`wider ecosystem of tools and plugins <ecosystem>` dedicated to making working with structured data as productive as possible.
2727

28-
`Explore a demo <https://fivethirtyeight.datasettes.com/fivethirtyeight>`__, watch `a presentation about the project <https://static.simonwillison.net/static/2018/pybay-datasette/>`__.
28+
`Explore a demo <https://datasette.io/global-power-plants/global-power-plants>`__, watch `a presentation about the project <https://static.simonwillison.net/static/2018/pybay-datasette/>`__.
2929

3030
Interested in learning Datasette? Start with `the official tutorials <https://datasette.io/tutorials>`__.
3131

0 commit comments

Comments
 (0)