You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically, static hosting support will look like this:
Users:
If users go to the index, nothing major happens. The app loads as normal.
If users go to another route, they load the 404 page. The 404 page will also contain the app, and will load the app as normal. We might not even need an index tbh.
Bots:
On both the index and 404 pages there will be some content inside the <noscript> tag. See SEO #39 for more details.
Plan:
Octobox will compile files based on each non-dynamic (anything that's not * or : ) route based on their path. Each of these files will be a copy of the compiled root index.html, with their meta tags edited based on exports by each route's source code. For example, if a route exports a title function returning a string, it'll set the title to that string. A meta tag will be set to the default ones based on the package.json's octobox param if no export exists for that tag. Octobox will have the option to compile these files to route/index.html or route/404.html. If there's no exported tags, Octobox will not generate a html file for this page to help optimize the build, and assume the closest index or 404 will load the page.
Octobox will prioritize these routes over static ones. Static routes will be imported from /static relative to source root. /static/static will not be imported into the compiled project as to not overwrite the compiled /static folder housing the bundles.
Octobox should provide meta tag options for robot tags as well.
Octobox should provide an option to have a root 404 if the option to compile files to route/index.html is selected, which is also just a copy of the root index.
Octobox should have an option to override all compilation options and use templates for specific hosting platforms (gh pages = use indexes and root 404, cloudflare = use 404s, vercel, serve, surge, netlify, etc.)
The text was updated successfully, but these errors were encountered:
tom-ricci
changed the title
Static file routing with the system currently implemented but with some changes - basically, we'll populate the index with some small filler content for bots, which will then be removed by a script which comes before the react script so bots supporting js will be fine and bots not supporting js will be fine and users wont notice because itll be unloaded instantly. for other routes, we will include a sitemap which maps out the other routes for bots, and when someone goes to a route, the 404 page will be loaded. in that 404 page we will have the same filler as the index page, and the same script to remove it. then, we'll use the same method of rerouting as before, sending people to https://url.tld/?/their_original_route and resolve that on index. since everything beyond that is client side, we can still support 404s even with the 404 page being used as filler
Static hosting support
Mar 14, 2022
Basically, static hosting support will look like this:
Users:
Bots:
<noscript>
tag. See SEO #39 for more details.Plan:
Octobox will compile files based on each non-dynamic (anything that's not * or : ) route based on their path. Each of these files will be a copy of the compiled root
index.html
, with their meta tags edited based on exports by each route's source code. For example, if a route exports atitle
function returning a string, it'll set the title to that string. A meta tag will be set to the default ones based on the package.json's octobox param if no export exists for that tag. Octobox will have the option to compile these files toroute/index.html
orroute/404.html
. If there's no exported tags, Octobox will not generate a html file for this page to help optimize the build, and assume the closest index or 404 will load the page.Octobox will prioritize these routes over static ones. Static routes will be imported from
/static
relative to source root./static/static
will not be imported into the compiled project as to not overwrite the compiled/static
folder housing the bundles.Octobox should provide meta tag options for robot tags as well.
Octobox should provide an option to have a root 404 if the option to compile files to
route/index.html
is selected, which is also just a copy of the root index.Octobox should have an option to override all compilation options and use templates for specific hosting platforms (gh pages = use indexes and root 404, cloudflare = use 404s, vercel, serve, surge, netlify, etc.)
The text was updated successfully, but these errors were encountered: