Handled a few more cases where hard-coded data was replaced with config variables

This commit is contained in:
Jeffrey Phillips Freeman 2023-10-09 21:20:44 -04:00
parent f89db42072
commit 280d0e93c9
No known key found for this signature in database
GPG key ID: AD914585C9406B6A
7 changed files with 10 additions and 8 deletions

View file

@ -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

View file

@ -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);
}
});

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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"] });

View file

@ -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));
console.log(signature.verify(publicKeyPem));