diff --git a/README.md b/README.md index 2b7c883..61e2dcd 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,8 @@ Then in a web browser, navigate to `your_machines_ip_address:8080`. ## TODO Add New Content -- NOTICE - HEALTH (My Priorities Sheet) - How to host files? Put them in reverse-proxy's files.hyperling.com site? -- STANCE - JOURNEY ## Inspiration diff --git a/main.js b/main.js index 8793957..37bc194 100755 --- a/main.js +++ b/main.js @@ -29,9 +29,15 @@ ports.push(8080); //// Functions //// +/* Code exists inside a main function so that we may use async/await. +*/ async function main() { console.log("...Starting Main..."); + // Getting dates in Node.js is awful, just use Linux. + const start_datetime = "" + await execSync('date "+%Y-%m-%dT%H:%M:%S%:z"'); + const start_datetime_trimmed = start_datetime.trim(); + console.log("Set app to return HTML documents."); app.use(function (req, res, next) { res.contentType('text/html'); @@ -59,28 +65,113 @@ async function main() { console.log(" * Pages loaded: ", pages); //return; // Stop execution FORTESTING + /* Create both an XML and HTML sitemap based on these entries. XML is used for + // bots like SEO scrapers. HTML will be for human users looking for a list of + // all pages. Some are not in the menu. Generated an example XML sitemap at + // www.xml-sitemaps.com then stripped it apart and made it dynamic. + */ + let sitemap_xml = ` + + + https://hyperling.com/ + `+start_datetime_trimmed+` + 1.00 + + + https://hyperling.com/sitemap/ + `+start_datetime_trimmed+` + 0.80 + + `; + let sitemap_html = ` + + Special Pages + + Web Pages (Alphabetical) + + `; + + // Provide sitemap.xml file for "SEO". + console.log(" * Creating router for sitemap.xml"); + router.get('/sitemap.xml', function (req, res) { + console.log("sitemap.xml being provided to", req.socket.remoteAddress) + res.contentType('text/xml'); + res.send(sitemap_xml); + }); + + // Provide human-usable sitemap links. + console.log(" * Creating router for sitemap*"); + router.get('/sitemap*', function (req, res) { + console.log("sitemap.html being provided to", req.socket.remoteAddress) + res.send(sitemap_html); }); // Originally a test, now a catch-all redirection to Home! + console.log(" * Creating router for redirection"); router.get('/*', function (req, res) { // WARNING: These are huge so only look when you need to. //console.log(req); diff --git a/pages/about.php b/pages/about.php index 33f19f3..6bbb148 100755 --- a/pages/about.php +++ b/pages/about.php @@ -36,20 +36,19 @@

-->

- Currently I reside in the US state of Indiana and am working to move + As of 2022 I reside in the US state of Indiana and am working to move to the southwest for the following reasons:

The search will begin in Arizona. Colorado and Mexico will likely - be explored. New Mexico and other locations will be visited as well - but have not yet revealed areas which offer exactly what I'm looking - for. + be explored. New Mexico and other locations will be visited as well.

diff --git a/pages/contact.php b/pages/contact.php index 687b84c..3828143 100755 --- a/pages/contact.php +++ b/pages/contact.php @@ -4,7 +4,7 @@ ?>
-

Contact Me

+

Contact Me

diff --git a/pages/helpers/advisory.php b/pages/helpers/advisory.php index ed3f2eb..1c39eb2 100755 --- a/pages/helpers/advisory.php +++ b/pages/helpers/advisory.php @@ -1 +1,4 @@ #!/usr/bin/php +
+ +
\ No newline at end of file diff --git a/pages/helpers/footer.php b/pages/helpers/footer.php index 200a748..e6fcc5f 100755 --- a/pages/helpers/footer.php +++ b/pages/helpers/footer.php @@ -2,10 +2,15 @@ -
- - This website is free software! Click to learn more. - -
+ diff --git a/pages/journey.sh b/pages/journey.sh index a9bf588..9114639 100755 --- a/pages/journey.sh +++ b/pages/journey.sh @@ -1 +1,27 @@ #!/bin/bash + +# Move to the directory that this file is in. +cd `dirname $0` + +# Create the necessary HTML components for a web page. +./helpers/body_open.php + +#Content for this page +cat << EOF +
+

+ My Journey +

+

+ [ TBD, check back soon. ] +

+
+EOF + +# Any subpages +###./helpers/section_open.php +###./subpages/journey/??? +###./helpers/section_close.php + +# Finish the web page +./helpers/body_close.php diff --git a/pages/subpages/home/apps.php b/pages/subpages/home/apps.php index 35545dc..0c58241 100755 --- a/pages/subpages/home/apps.php +++ b/pages/subpages/home/apps.php @@ -11,7 +11,7 @@