-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Server-side pre-rendering for SEO #525
Comments
use
|
@RomanGotsiy Sorry, but that doesn't yield a yes/no answer... That's why I had to ask. "Zero-dependency HTML file" is a sexy sound bite, but ambiguous. For example, it could mean one HTML file with embedded ReDoc. That would not be what I need. Or it could mean static HTML, no JavaScript. Or no node.js dependencies. I can't tell. I need something less marketing-ish and more tech doc-ish about the feature's intended behaviour. So... "Yes, bundles will be static HTML+CSS only (no JS)"? Or "No, bundles will still require a JS engine to render the page"? |
ok, so "Zero-dependency HTML file" - server-side rendered ReDoc with embedded ReDoc. So all the initial HTML + CSS are in the HTML and can be rendered by the browser immediately. But it is not interactive. That's why bundle contains ReDoc embedded js which hydrates the view and makes it interactive. You can use ReDoc from the CDN instead of embedding it into the page by passing It works exactly same as any Server Side rendered React application so look there for more detailed information. Practically, it means you can deploy resulting HTML to any static hosting or just send it via email and user will be able to just double-click your file to see it. Hope this answer is more useful! |
Perfect. That's what I needed to know. Thanks! |
This might be just a question/docs tweak.
(Can't tell if the feature I need exists or not...)
I found these promising bits in Readme.md:
And:
But...
ReDoc's client-side JavaScript rendered docs work well. We're using that for most clients.
But like #124, sometimes server-side static HTML is needed for PDF engines and SEO. If the client is a search engine/print app that doesn't run JavaScript (or not extensively enough) and therefore cannot search index or print JavaScript-rendered docs, then I need to return static HTML instead.
Does ReDoc CLI do this?
The text was updated successfully, but these errors were encountered: