theupdateframework / tuf-on-ci

A TUF repository and signing tool
Other
20 stars 11 forks source link

repository description json links are incorrect #353

Closed jku closed 4 months ago

jku commented 4 months ago

Example https://tuf-repo-cdn.sigstage.dev/index.html

the links point to e.g. https://tuf-repo-cdn.sigstage.dev/root-signing-staging/8.root.json when it should be https://tuf-repo-cdn.sigstage.dev/8.root.json

jku commented 4 months ago

This looks like a weird feature of the markdown publishing.

the markdown we generate is as expected:

root ([json](8.root.json))

but the html generated by actions/jekyll-build-pages then contains

root (<a href="/root-signing-staging/8.root.json">json</a>)`

So it does some pages specific link rewriting even if there is no need for it here :(

jku commented 4 months ago

Yes a jekyll feature: https://github.com/jekyll/jekyll/issues/7621: relative links are not a thing.

potential fixes:

jku commented 4 months ago

There's something here that I don't understand still: the simplest possible reproducer with the same exact markdown has relative links! https://jku.github.io/test-pages/

root (<a href="8.root.json">json</a>)

???

joshuagl commented 4 months ago

I think this is related to gh-pages addons to jekyll? https://jekyllrb.com/docs/github-pages/#project-page-url-structure

jku commented 4 months ago

Probably yes: that's likely how the extra directory ends up in there... but I think it's not useful to resolve this issue since jekylls "relative url" is not actually relative but an absolute url path.

The trick of using html tags works for the json links so I think I'll close this as good enough...

joshuagl commented 4 months ago

SGTM :+1: