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

Statically rendered user pages + concept pages #2607

Open
rohitpaulk opened this issue Jan 31, 2025 · 5 comments
Open

Statically rendered user pages + concept pages #2607

rohitpaulk opened this issue Jan 31, 2025 · 5 comments
Assignees

Comments

@rohitpaulk
Copy link
Member

rohitpaulk commented Jan 31, 2025

We've been pre-rendering track pages and challenge pages by enumerating over all available tracks and challenges. We now need to find a way to statically generate user pages (there are 1000s of these), and concept pages (we'll have 100s of these in the near future).

Vercel's Prerender functions API is supposed to allow for generating these on demand and caching. Let's implement this and also see if we can expose this as a generic ember plugin that others can use.

@rohitpaulk
Copy link
Member Author

@VasylMarchuk can you look into this please?

@rohitpaulk rohitpaulk changed the title Statically generate user pages Statically rendered user pages Jan 31, 2025
@rohitpaulk rohitpaulk changed the title Statically rendered user pages Statically rendered user pages + concept pages Jan 31, 2025
@rohitpaulk
Copy link
Member Author

@VasylMarchuk this is a bit time-sensitive, let's try to have it out by Feb 10

@rohitpaulk
Copy link
Member Author

For additional context - the reason we can't use the existing pre-rendering setup for these is that there are 1000s of these pages, and our deploys would take hours if we were to pre-render all of these pages.

@VasylMarchuk
Copy link
Collaborator

VasylMarchuk commented Feb 1, 2025

Looking into this. Also, is my suspicion correct that since we're now going to render user-generated content (their user pages), we need to fix the DOMPurify sanitize issue? @rohitpaulk

Image Image

Or would this not be really related? I'm currently still reading all the docs about prerender and serverless functions to understand how they work and trying to revive all my vercel knowledge.

@rohitpaulk
Copy link
Member Author

@VasylMarchuk yeah, we'll need to do something about that since user pages can contain UGC. It's okay if we do this in a hacky manner for now though - for example, if we just HTML-escaped all content when in fastboot mode (so it doesn't insert things like <script> tags), that might work. We can then re-visit getting DOMPurify to work properly in a different issue.

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

Successfully merging a pull request may close this issue.

2 participants