Open jyasskin opened 7 years ago
This sounds like a nice improvement to pr-preview. I don't really have the cycles to tackle that though, so I welcome a pull request for it if anyone cares enough about it to make it work.
I just found myself wanting this too... could you provide some brief details of what would need to be done to implement this? Should image resources be the added to the .pr-preview
config? or would there be better way of doing it?
iirc, Bikeshed has some mechanism for this. That’s where I’d start looking. Other options include using jsdom to find all IMG elements. I’m planning to use jdsom to fix the weird line breaks that are generated by the differ, so maybe that’s something we could just add on top of it?
As I mentioned in https://github.com/w3c/speced-cg/issues/1 , another problem is that if the PR submitter only modifies files like images, there will be no preview.
As I mentioned in w3c/speced-cg#1 , another problem is that if the PR submitter only modifies files like images, there will be no preview.
We already have infrastructure to enable this for Bikeshed includes which could be repurposed.
The preview for @equalsJeffH's https://github.com/w3c/webauthn/pull/463 failed to copy https://s3.amazonaws.com/pr-preview/w3c/webauthn/images/fido-attestation-structures.svg into place, leading to a broken link in https://s3.amazonaws.com/pr-preview/w3c/webauthn/jeffh-redraw-fig3.html#sctn-attestation.
Bikeshed's Echidna support defaults to including the
images
,diagrams
, andexamples
directories, and perhaps pr-preview should do the same. Ideally there'd also be a way in.pr-preview.json
to add files.