observablehq / framework

A static site generator for data apps, dashboards, reports, and more. Observable Framework combines JavaScript on the front-end for interactive graphics with any language on the back-end for data analysis.
https://observablehq.com/framework/
ISC License
2.58k stars 125 forks source link

embedded api #1637

Closed mbostock closed 2 months ago

mbostock commented 2 months ago

TODO:

Fixes #1084. Fixes #1583.

mbostock commented 2 months ago

Would be simpler to just invert the precedence and have /chart.js.md take precedence over /chart.js? I don’t think it matters which one we choose; we just have to pick one, so we should pick whatever’s easier for us. Edit: There is a philosophical reason to give /chart.js precedence which is that it is an exact match and more specific than /chart.js.md, and hence we should stay the course. Further edit: I think we could just disallow /chart.js.md entirely and require that pages only have a single extension. That restriction should simplify things and feels reasonable and more forward-looking.

mbostock commented 2 months ago

Boo, one of our tests has a page sub/page1..10.md which already violates the double extension rule, suggesting that we should allow pages to have double extensions but fix the precedence issue… I need to think more.