ostrio icon indicating copy to clipboard operation
ostrio copied to clipboard

How to get Ostrio working with static site?

Open trusktr opened this issue 2 months ago • 1 comments

I cannot use spiderable-middleware, I don't have a server.

For example, using Docsify I can host a static website, and the site will load and render static markdown files. It can be deployed to any static host (i.e. I don't have a "server" that runs my own logic to serve HTML).

If you visit https://lume.github.io, you'll see an example. GitHub Pages are simple static pages, no backend (no Express.js, no PHP, etc). Just pure static site.

If you click on the Install link in the side bar, it will take you to https://lume.github.io/guide/install/. When you do that, the client will load the following markdown file and render it dynamically for the page content: https://lume.github.io/guide/install/README.md

It behaves like a "single page app" (you can even refresh https://lume.github.io/guide/install/ in your browser and it will still work) but it is 100% a static website.

The reason why https://lume.github.io/guide/install/ works is not because there's a server, but the 404.html file that I have is set up to handle all non-valid routes to redirect the app to the proper route off of index.html. Without that special 404.html file that GitHub Pages supports, the site will simply show GitHub Page's default 404 page, such as this one: https://nb-ga.github.io/asdfasdf.

So, the question is. How do we get Ostr.io pre-rendering working with a static site like those made with Docsify?

Maybe a solution could be to put a Ostrio's pre-rendering result on a unique subdomain for the given "server", such that all the static sites can be visited independently, then a user can connect their domain name to it.

For example,

  • I could tell Ostrio to pre-render https://lume.github.io
  • Ostrio could show the full pre-rendered version of the site on https://example-subdomain.ostr.io
  • Finally, I could make my own domain name point to Ostrio's

The end result would be that end users never interact with lume.github.io (unless they go there directly) but with Ostrio's pre-rendered result via my non-github.io domain.

trusktr avatar Nov 06 '25 00:11 trusktr

Hello @trusktr

Integrating our services (including pre-rendering) is possible only to the domains you own. There are many reasons for that, including certain regulations.

For serverless and similar environments we suggest using CloudFlare Worker — see this tutorial

It's possible to point your own subdomain like docs.lume.io via CNAME to lume.github.io

And in the repo → Settings → Pages, set the Custom domain to docs.lume.io, and enable HTTPS

Then Configure this subdomain via CloudFlare and follow this tutorial to setup CF Worker in order to enable pre-rendering.

The option you've suggested — we have similar solution to the one you've described but it only available to Enterprise plan users. If CF Worker isn't viable option for you — feel free to reach to our support team via email to get quote for Enterprise offer to fit your case.

dr-dimitru avatar Nov 06 '25 18:11 dr-dimitru