Skip to content

How to get Ostrio working with static site? #14

@trusktr

Description

@trusktr

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,

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions