Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-generate public/projects.json with working images #93

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lukaw3d
Copy link
Member

@lukaw3d lukaw3d commented Jan 16, 2025

Related to #90
see diff in 3b89b9a

kaja-osojnik and others added 4 commits January 17, 2025 01:30
Previously images imported into vite had hash names; it would be difficult to
predict the hash names in a node script to generate projects.json. And annoying
to implement it as a vite plugin. Instead, put everything into public/, so file
names stay as they are.

Issue: no cache busting if we change projects.json or a screenshot without
renaming the file. Github pages currently returns cache max-age=600 (10 min).
@lukaw3d lukaw3d requested a review from kaja-osojnik January 16, 2025 18:32
Copy link

netlify bot commented Jan 16, 2025

Deploy Preview for oasisprotocol-playground ready!

Name Link
🔨 Latest commit 3b89b9a
🔍 Latest deploy log https://app.netlify.com/sites/oasisprotocol-playground/deploys/678951265912a6000826db15
😎 Deploy Preview https://deploy-preview-93--oasisprotocol-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@lukaw3d lukaw3d force-pushed the lw/gen-projects-json branch from 6b92ff8 to 3b89b9a Compare January 16, 2025 18:34
@lukaw3d lukaw3d changed the title Auto-generate public/projects.json Auto-generate public/projects.json with working images Jan 16, 2025
@lukaw3d
Copy link
Member Author

lukaw3d commented Jan 16, 2025

Preview:
https://deploy-preview-93--oasisprotocol-playground.netlify.app/projects.json

    "screenshots": [
      "/projects/0x2fa/screenshots/01-landing.jpeg",
      "/projects/0x2fa/screenshots/02-balance.jpeg",
      "/projects/0x2fa/screenshots/03-activate-2fa.jpeg",
      "/projects/0x2fa/screenshots/04-create-multisig.jpeg",
      "/projects/0x2fa/screenshots/04-scan-invite-code.jpeg",
      "/projects/0x2fa/screenshots/05-banner.png"
    ],

->
https://deploy-preview-93--oasisprotocol-playground.netlify.app/projects/0x2fa/screenshots/02-balance.jpeg
works

@matevz
Copy link
Member

matevz commented Jan 17, 2025

Slightly related to my WIP #91 , which has this yarn projects dump command. But it doesn't include the screenshots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants