Sorry for the delay in answering this one:
Okay, so:
It seems that if the first cell is a markdown with a h1 string, the URL is set to that string.
Yep! The URL slug of each notebook is derived from:
- the text content of the first cell
- removing/replaces spaces, punctuation, and adding
-
in their place, to make it url safe
- and then if that user already has a notebook with that slug, adding a
/2
(or 3, 4âŚ) to disambiguate the slugs
However, then I create another notebook with the same title, it gives me a new URL:
https://beta.observablehq.com/@ontouchstart/einstein/21
there is no way for me to reuse the URL I just deleted. Is this the right behavior by design?
Deleting a notebook removes it from listings, but because other people could have added something like
import {thing} from "@ontouchstart/einstein"
To their notebooks, we donât want one person deleting a notebook to cause a chain reaction of broken notebooks - like in the left-pad controversy. So, notebooks that import parts of deleted notebooks continue to work, which means that the original permalink - @ontouchstart/einstein
- continues to be reserved, so any new notebooks named the same thing will get a /2
(or 3 or 4) disambiguating postfix.
Re: versioning. Notebooks do have versions, but they arenât exposed, yet. Weâll soon launch the ability to go back in time, and expose better ways to import specific versions of a notebook. The dataâs there so that all notebooks will have history on feature launch, but weâre being careful about implementation. Linked URLs, though, wonât likely contain versions, much like GitHub repo URLs donât have versions by default, and instead show the current HEAD version of a repository.
Footnote: this deletion policy does mean that deleted published notebooks can still be imported; if you require a deleted notebook to be deleted for security reasons, you can contact the staff and weâll manually, permanently, delete it.