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 123 forks source link

github pages failing to render static build #1643

Closed bjedwards closed 2 months ago

bjedwards commented 2 months ago

Using observable framework to build a static site to deploy to github pages.

Repo is here https://github.com/bjedwards/vuln4cast_presentation

Deployed to github pages here:

https://bjedwards.github.io/vuln4cast_presentation/

For whatever reason, github cannot serve the css or js files, and they all 404.

image

And of course that means the site doesn't render:

image

My local build works fine, with the static site displaying for two server types (python -m http.server and npx http-server dist). Is this a github pages issue or a framework issue?

mbostock commented 2 months ago

You need to add a .nojekyll file for GitHub Pages as mentioned in the docs.

https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#static-site-generators

bjedwards commented 2 months ago

Beautiful, thank you. I missed that bit.