From 280d0e93c9fb2347790232df7152b94dca6442ea Mon Sep 17 00:00:00 2001
From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Date: Mon, 9 Oct 2023 21:20:44 -0400
Subject: [PATCH] Handled a few more cases where hard-coded data was replaced
 with config variables

---
 README.md                                    | 2 ++
 assets/javascripts/head.js                   | 2 +-
 layouts/partials/footer.html                 | 2 +-
 layouts/partials/menu.html                   | 4 ++--
 layouts/partials/top_list_resource.html      | 2 +-
 lib/activitypub/utils/sendSignedRequest.ts   | 2 +-
 lib/activitypub/utils/testVerifySignature.js | 4 ++--
 7 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index f4cb5e051..27294dcf0 100644
--- a/README.md
+++ b/README.md
@@ -58,3 +58,5 @@ This project (excluding post content itself) is released under the Apache Licens
 
 The above steps might be reduced by using template processing on otherwise unprocessed files (normally not part of hugo). See the following for more info https://vercel.com/docs/functions/serverless-functions/runtimes/node-js
 NOTE: Once we move the project over to a dedicated git, change the node info under api and track the version
+NOTE: And the source link in the footer
+NOTE: And package.json
diff --git a/assets/javascripts/head.js b/assets/javascripts/head.js
index c5875a6a0..b62e584b6 100644
--- a/assets/javascripts/head.js
+++ b/assets/javascripts/head.js
@@ -52,7 +52,7 @@ window.addEventListener("load", function () {
           function (error) { ga('send', 'event', 'share', 'error', error); });
       } else {
         var windowOptions = 'scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=520,height=420';
-        var twitterUrl = 'https://twitter.com/intent/tweet?text=' + encodeURIComponent(shareTitle) + '&url=' + encodeURIComponent(shareUrl) + '&via=FLEAR';
+        var twitterUrl = 'https://twitter.com/intent/tweet?text=' + encodeURIComponent(shareTitle) + '&url=' + encodeURIComponent(shareUrl);
         window.open(twitterUrl, 'intent', windowOptions);
       }
     });
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 892a590e1..2e90c2c28 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -7,7 +7,7 @@
     </div>
     <div class='col-md-6 text-right'>
       <p>
-        <strong>FLEAR</strong> &copy; 2023 to present
+        <strong>Jeffrey Phillips Freeman</strong> &copy; 2023 to present
       </p>
       <p>
         <a href='https://git.qoto.org/flear/flear-site'>Get source</a> by <a href='https://jeffreyfreeman.me'>Jeffrey Phillips Freeman</a>
diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html
index 260d9e6b1..be1ff1fc5 100644
--- a/layouts/partials/menu.html
+++ b/layouts/partials/menu.html
@@ -17,7 +17,7 @@
 			<a class="navbar__item navbar__link" href="/news">News</a>
 			<a class="navbar__item navbar__link" href="/projects">Projects</a>
       <a class="navbar__item navbar__link" href="/resource">Resources</a>
-			<a class="displayOnlyInLargeViewport_16CL button button--primary" href="https://git.qoto.org/flear" style="margin:0;margin-left:15px">FLEAR GITLAB →</a>
+			<a class="displayOnlyInLargeViewport_16CL button button--primary" href={{ site.Params.repoUrl }} style="margin:0;margin-left:15px">OUR GIT →</a>
 		</div>
 	</div>
 	<div role="presentation" class="navbar-sidebar__backdrop"></div>
@@ -44,7 +44,7 @@
 						<a class="menu__link" href="/resource">Resources</a>
 					</li>
 					<div style="margin:5px;margin-top:15px"></div>
-					<a class="button button--block button--primary" href="https://git.qoto.org/flear">OUR GITLAB →</a>
+					<a class="button button--block button--primary" href={{ site.Params.repoUrl }}>OUR GITLAB →</a>
 				</ul>
 			</div>
 		</div>
diff --git a/layouts/partials/top_list_resource.html b/layouts/partials/top_list_resource.html
index 2d1549ede..2da29c639 100644
--- a/layouts/partials/top_list_resource.html
+++ b/layouts/partials/top_list_resource.html
@@ -5,7 +5,7 @@
     <div class="main-wrapper">
       <header class='subheader'>
         <div class='container'>
-          <h2 class='page-title'> Resources <small>services, assistance, information, and other resources to assist the FLOSS Ham.</small>
+          <h2 class='page-title'> Resources <small>services, assistance, information, and other resources to assist the FLOSS Ham community.</small>
           </h2>
         </div>
       </header>
diff --git a/lib/activitypub/utils/sendSignedRequest.ts b/lib/activitypub/utils/sendSignedRequest.ts
index 30eac6c06..905ea32aa 100644
--- a/lib/activitypub/utils/sendSignedRequest.ts
+++ b/lib/activitypub/utils/sendSignedRequest.ts
@@ -3,7 +3,7 @@ import { Sha256Signer } from '../../http-signature/index.js';
 import { createHash } from 'crypto';
 
 export async function sendSignedRequest(endpoint: URL, object: AP.Activity): Promise<Response> {
-  const publicKeyId = "https://flear.org/flear#main-key";
+  const publicKeyId = `${process.env.ACTIVITYPUB_URL}${process.env.ACTIVITYPUB_USER.toLowerCase()}#main-key`;
   const privateKey = process.env.ACTIVITYPUB_PRIVATE_KEY;
 
   const signer = new Sha256Signer({ publicKeyId, privateKey, headerNames: ["host", "date", "digest"] });
diff --git a/lib/activitypub/utils/testVerifySignature.js b/lib/activitypub/utils/testVerifySignature.js
index cf6fb3741..33fc37683 100644
--- a/lib/activitypub/utils/testVerifySignature.js
+++ b/lib/activitypub/utils/testVerifySignature.js
@@ -10,7 +10,7 @@ rSI+ehs+LtVPqPoAfYMzIKhlo4WLB5gmObO3oQRlg7kda0pFI9FGhLrwV0R3h0BT
 kwIDAQAB
 -----END PUBLIC KEY-----`;
 
-const publicKeyId = "https://flear.org/flear#main-key";
+const publicKeyId = `${process.env.ACTIVITYPUB_URL}${process.env.ACTIVITYPUB_USER.toLowerCase()}#main-key`;
 
 const signature = new Sha256Signature({
   publicKeyId,
@@ -18,4 +18,4 @@ const signature = new Sha256Signature({
   signature: Buffer.from("IiqUSA2oXSzNTsMJE7jOP7YDnL6K7Nol0rpDf+dnK8R14Y6FXX9VdSW43JTDvtnrmlf/lROR36pXXdf/IQhKtHkEJjKQUviBM5BhA9Qv5S84gGXyNkx2ytXEmxcL7BK2nuS/QoW9ud99ZcmhGkzWraoGQ7BM5UV63OCfA3EkKT0gP/QN76eMtuKVVQwCTNZtVxq/RBaJgExrn4+XwaWqFIBovVRM6p+3Pbg1T0e6Eo3Lsy6yn0Um7+iceyjVtveGiV60ywy9bkf85DzoFSSfB4y7sOhjartYyuuBY8HBRkheEywoJH1cK/q29F1Z6jByx84SrlD925sfTgOsB67DNw==")
 })
 
-console.log(signature.verify(publicKeyPem));
\ No newline at end of file
+console.log(signature.verify(publicKeyPem));
-- 
GitLab