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.57k stars 122 forks source link

broken links should break the build #1730

Open Fil opened 1 month ago

Fil commented 1 month ago

(ref #1729)

Martien commented 13 hours ago

Not sure if this this about broken links in pages. If it is, please consider support for red links, as mentioned in #1828.

I do see those red links flaying by when npm run build.

mbostock commented 12 hours ago

I think red links make sense in a wiki context where you can click on the link to instantiate the page. But given that Framework is a static site generator and not a wiki, and hence there’s no way to edit the site or page when viewing the page, I think breaking the build is more appropriate than rendering stylized broken links.

Martien commented 8 hours ago

True. I was not thinking of being able to click on the link to instantiate the page, because the site is read-only for visitors.

Then again, I would like a visual clue about any broken links. At times, I know that I will create the page that a link refers to, and I don’t want to have to go back later and add that link. Foresight, if you will.

It feels natural for me to add a [[link]] here and there when writing a page. Just because I know that the realisation of that future page is around the corner.

Thanks again for your reply. And wishing you a good weekend, again.

Fil commented 7 hours ago

Having red links (for preview at least) and optionally breaking the build would give us the best of both worlds.