feat: enhance SEO by adding hidden fallback content for crawlers

pull/10/head
David Montero Crespo 2026-03-07 00:03:31 -03:00
parent 41d8e25843
commit 44293ba000
1 changed files with 10 additions and 5 deletions

View File

@ -207,14 +207,18 @@
} }
</script> </script>
</head> </head>
<body> <style>
/* Hide SEO fallback content instantly — React removes it on mount.
Crawlers ignore visibility:hidden and still index the text. */
#root-seo { visibility: hidden; position: absolute; pointer-events: none; }
</style>
<body style="margin:0;background:#1e1e1e;">
<div id="root"></div>
<!-- <!--
Static pre-rendered content for search engine crawlers. Static pre-rendered content for search engine crawlers.
Google renders JavaScript, but this ensures content is available Hidden from users via CSS; React app renders in #root above.
on the first crawl wave (before JS execution).
React will replace #root when it mounts — this is intentional.
--> -->
<div id="root"> <div id="root-seo" aria-hidden="true">
<header style="font-family:sans-serif;background:#0d1117;color:#e6edf3;padding:1.5rem 2rem;"> <header style="font-family:sans-serif;background:#0d1117;color:#e6edf3;padding:1.5rem 2rem;">
<a href="/" style="text-decoration:none;color:inherit;"> <a href="/" style="text-decoration:none;color:inherit;">
<h1 style="margin:0;font-size:1.5rem;">Velxio &mdash; Free Local Arduino Emulator</h1> <h1 style="margin:0;font-size:1.5rem;">Velxio &mdash; Free Local Arduino Emulator</h1>
@ -267,5 +271,6 @@
</main> </main>
</div> </div>
<script type="module" src="/src/main.tsx"></script> <script type="module" src="/src/main.tsx"></script>
</body> </body>
</html> </html>