sigstore / root-signing

TUF repository for Sigstore trust root
Apache License 2.0
88 stars 81 forks source link

Formating on index page is off #1360

Open kommendorkapten opened 2 months ago

kommendorkapten commented 2 months ago

Description

Looking at: https://sigstore.github.io/root-signing/index.html vs https://tuf-repo-cdn.sigstore.dev/index.html

There is a visual difference. Inspecting the page shows an error, 404 when getting style.css

Version

Deployed as of 2024-09-04

jku commented 2 months ago

yeah, this happens in staging too. If you have ideas for reliably making the styling work, please add that into a tuf-on-ci issue

jku commented 2 months ago

oh forgot to mention the actual issue here:

I don't see a lot of clean and easy ways to make the URL work when the repo is moved to e.g GCS ...

jku commented 2 months ago

... hack the html when publishing but I fee like these will end up being real hacks

specifically I suppose we could add a step in upload-repository action that runs after actions/jekyll-build-pages has executed, and modifies the html swapping the absolute path with a relative one.

EDIT: I had a quick look and it's as ugly as I expected:

It's annoying to figure out the relative path from metadata dir to the assets dir: it could be "assets/" but it could be "../assets/" just as well. Not impossible but exactly the sort of thing I dislike putting in a workflow bash script...

    # jekyll really likes absolute links, which breaks the styles if the repository is moved
    # jekyll-build-pages also creates the files as root...
    # TODO define RELPATH based on inputs.metadata_path depth (./ or .../ or ../../ etc)
    sudo sed -i "s#href=\"/.*/assets/css/style.css#href=\"$RELPATH/assets/css/style.css#" build-jekyll/${{inputs.metadata_path}}/index.html
jku commented 2 months ago

I'm moving this to https://github.com/theupdateframework/tuf-on-ci/issues/430