Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: some updates #2

Merged
merged 1 commit into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/sitecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Site Checks
on:
pull_request:
branches: [ main ]

jobs:
muffet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install caddy
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release --repo caddyserver/caddy download -p 'caddy*linux_amd64.tar.gz' --output caddy.tar.gz
tar xvf caddy.tar.gz caddy
sudo mv caddy /usr/local/bin
- run: caddy start
- name: Install muffet
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release --repo raviqqe/muffet download -p muffet_linux_amd64.tar.gz
tar xvf muffet_linux_amd64.tar.gz muffet
sudo mv muffet /usr/local/bin
- name: check links with muffet
run: |
muffet http://localhost:2015 \
--buffer-size=8192 \
--exclude="https://twitter\.com"
- run: caddy stop
if: always()
4 changes: 4 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
http://localhost:2015

root * ./site
file_server
46 changes: 41 additions & 5 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,47 @@
</footer>
</div>

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-82637990-6"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-82637990-6');
(function () {
var webSdkScript = document.createElement("script");

// fetch the latest version of the Web-SDK from the CDN
webSdkScript.src =
"https://unpkg.com/@grafana/faro-web-sdk@^1.4.0/dist/bundle/faro-web-sdk.iife.js";

webSdkScript.onload = () => {
window.GrafanaFaroWebSdk.initializeFaro({
url: "https://faro-collector-prod-us-central-0.grafana.net/collect/c433f982be664316a91086155e111af3",
app: {
name: "gomplate.ca",
version: "1.0.0",
environment: "production",
},

});


// Load instrumentations at the onLoad event of the web-SDK and after the above configuration.
// This is important because we need to ensure that the Web-SDK has been loaded and initialized before we add further instruments!
var webTracingScript = document.createElement("script");

// fetch the latest version of the Web Tracing package from the CDN
webTracingScript.src =
"https://unpkg.com/@grafana/faro-web-tracing@^1.4.0/dist/bundle/faro-web-tracing.iife.js";

// Initialize, configure (if necessary) and add the the new instrumentation to the already loaded and configured Web-SDK.
webTracingScript.onload = () => {
window.GrafanaFaroWebSdk.faro.instrumentations.add(
new window.GrafanaFaroWebTracing.TracingInstrumentation()
);
};

// Append the Web Tracing script script tag to the HTML page
document.head.appendChild(webTracingScript);
};

// Append the Web-SDK script script tag to the HTML page
document.head.appendChild(webSdkScript);
})();
</script>
</html>