Added analytics and WebFinger support along with little things
This commit is contained in:
parent
73d92fe840
commit
ba3978fffb
9 changed files with 2794 additions and 15 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -129,5 +129,8 @@ dist
|
|||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
|
||||
# Private repository credentials etc...
|
||||
.npmrc
|
||||
|
||||
# Mac specific files
|
||||
.DS_Store
|
||||
|
|
|
|||
2
.npmrc.example
Normal file
2
.npmrc.example
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@BridgemanAccessible:registry=http://npm.pkg.bridgemanaccessible.ca/
|
||||
//npm.pkg.bridgemanaccessible.ca/:_authToken="<token>"
|
||||
|
|
@ -5,6 +5,7 @@ WORKDIR /usr/src/app
|
|||
|
||||
# Install app dependencies
|
||||
COPY package*.json ./
|
||||
COPY .npmrc ./.npmrc
|
||||
RUN npm install
|
||||
|
||||
# Build and test
|
||||
|
|
|
|||
10
README.md
10
README.md
|
|
@ -1,2 +1,12 @@
|
|||
# Main Website - Bridgeman Accessible (bridgemanaccessible.ca)
|
||||
The Bridgeman Accessible main website
|
||||
|
||||
## Getting started
|
||||
Before you can start there is a little bit of required setup
|
||||
```sh
|
||||
# Create a `.npmrc` file (you cna copy-paste the `.npmrc.example` file provided replacing `<token>` with a proper value)
|
||||
mv ./.npmrc.example ./.npmrc
|
||||
|
||||
# If you need a token - login to the registry
|
||||
npm login --registry http://npm.pkg.bridgemanaccessible.ca/
|
||||
```
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
"dev": "nodemon src/server.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@BridgemanAccessible/ba-auth": "^1.0.0",
|
||||
"ejs": "^3.1.6",
|
||||
"express": "^4.17.1",
|
||||
"mime": "^3.0.0"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ import path from 'path';
|
|||
import express from 'express';
|
||||
import mime from 'mime';
|
||||
|
||||
import { PointerServer } from '@BridgemanAccessible/ba-auth';
|
||||
|
||||
const app = express();
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
|
|
@ -76,6 +78,10 @@ app.use(express.static(path.join(__dirname, 'public'), {
|
|||
}
|
||||
}));
|
||||
|
||||
const oidcLink = PointerServer.createOIDCLink('account.bridgemanaccessible.ca');
|
||||
const rfc8414Link = PointerServer.createRFC8414Link('account.bridgemanaccessible.ca');
|
||||
PointerServer.setup(app, { links: [oidcLink, rfc8414Link] });
|
||||
|
||||
const port = process.env.PORT || 3000;
|
||||
|
||||
app.listen(port, () => {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,21 @@
|
|||
);
|
||||
}
|
||||
%>
|
||||
<!-- Matomo -->
|
||||
<script>
|
||||
var _paq = window._paq = window._paq || [];
|
||||
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||||
_paq.push(['trackPageView']);
|
||||
_paq.push(['enableLinkTracking']);
|
||||
(function() {
|
||||
var u="//analytics.bridgemanaccessible.ca/";
|
||||
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||||
_paq.push(['setSiteId', '1']);
|
||||
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||||
g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||||
})();
|
||||
</script>
|
||||
<!-- End Matomo Code -->
|
||||
<script src="https://kit.fontawesome.com/e4af9e378a.js" crossorigin="anonymous"></script>
|
||||
<script type="application/javascript" src="js/hamburger.js" defer></script>
|
||||
</head>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue