niner-games / lost-dutchman-mine

Reviving old "Lost Dutchman Mine" game with Electron and Capacitor.
https://lostmine.cc
BSD 2-Clause "Simplified" License
2 stars 0 forks source link

Title is missing from web version, when it is crawled #169

Closed mrfatguy closed 7 months ago

mrfatguy commented 7 months ago

Overview

Please, add the missing <title> element the to <head> section of web version's main index.html file.

Details

The destination file (see: https://play.lostmine.cc/main_window/index.html) has <title> added element the to <head> section:

<!doctype html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Lost Dutchman Mine</title>
    <link rel="icon" type="image/png" href="favicon.png" />
    <script defer="defer" src="../main_window/index.js"></script>
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>

But the source (initial, startup) file (see: https://play.lostmine.cc/index.html), added in #113 and 987b7e42 doesn't have it:

<!DOCTYPE html>
<html lang="en">
    <head>
        <script>
            const l = window.location.href;
            const s = l.split('index.html')[0];
            window.location.href = s + 'main_window/index.html'
        </script>
        <!-- the document has no actual content; neither character encoding nor styles and scripts are needed -->
    </head>
    <body>
        <!-- no body content in case of redirect -->
    </body>
</html>

This causes that even though the web version (after executed redirect) does display the game's title correctly:

image

But, when web-crawlers or robots (like short.io) crawls https://play.lostmine.cc/, the title is missing:

image

Please, fix this by adding the missing <title> element the to <head> section of https://play.lostmine.cc/index.html file. Thanks!