mirror of
https://github.com/funkypenguin/geek-cookbook/
synced 2025-12-13 09:46:23 +00:00
Trial plausible for transparent analytics (#181)
This commit is contained in:
BIN
.cache/Ubuntu.400.ttf
Normal file
BIN
.cache/Ubuntu.400.ttf
Normal file
Binary file not shown.
BIN
.cache/Ubuntu.700.ttf
Normal file
BIN
.cache/Ubuntu.700.ttf
Normal file
Binary file not shown.
@@ -1,5 +1,6 @@
|
|||||||
#FROM squidfunk/mkdocs-material
|
ARG FROM_SOURCE=squidfunk/mkdocs-material
|
||||||
FROM ghcr.io/squidfunk/mkdocs-material-insiders
|
FROM ${FROM_SOURCE}
|
||||||
|
|
||||||
RUN pip install \
|
RUN pip install \
|
||||||
mkdocs-autolinks-plugin \
|
mkdocs-autolinks-plugin \
|
||||||
mkdocs-htmlproofer-plugin \
|
mkdocs-htmlproofer-plugin \
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
---
|
||||||
|
description: While having a self-healing, scalable docker swarm is great for availability and scalability, none of that is worth a sausage if nobody can connect to your cluster!
|
||||||
|
---
|
||||||
|
|
||||||
# Keepalived
|
# Keepalived
|
||||||
|
|
||||||
While having a self-healing, scalable docker swarm is great for availability and scalability, none of that is any good if nobody can connect to your cluster.
|
While having a self-healing, scalable docker swarm is great for availability and scalability, none of that is worth a sausage if nobody can connect to your cluster!
|
||||||
|
|
||||||
In order to provide seamless external access to clustered resources, regardless of which node they're on and tolerant of node failure, you need to present a single IP to the world for external access.
|
In order to provide seamless external access to clustered resources, regardless of which node they're on and tolerant of node failure, you need to present a single IP to the world for external access.
|
||||||
|
|
||||||
|
|||||||
5
mkdocs-insiders.yml
Normal file
5
mkdocs-insiders.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# This file exists for production builds where we use the mkdocs-material-insiders code, with exclusive features
|
||||||
|
# that don't degrade for the open-source version
|
||||||
|
INHERIT: mkdocs.yml
|
||||||
|
plugins:
|
||||||
|
social: {}
|
||||||
36
mkdocs.yml
36
mkdocs.yml
@@ -19,15 +19,14 @@ copyright: 'Copyright © 2016 - 2021 David Young, Funky Penguin Limited'
|
|||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
plugins:
|
plugins:
|
||||||
- social
|
search:
|
||||||
- search
|
minify:
|
||||||
- minify:
|
minify_html: true
|
||||||
minify_html: true
|
git-revision-date-localized:
|
||||||
- git-revision-date-localized:
|
type: date
|
||||||
type: date
|
autolinks:
|
||||||
- autolinks
|
macros:
|
||||||
- macros:
|
verbose: true
|
||||||
verbose: true
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -189,7 +188,7 @@ theme:
|
|||||||
favicon: 'images/site-logo.svg'
|
favicon: 'images/site-logo.svg'
|
||||||
features:
|
features:
|
||||||
- navigation.tabs
|
- navigation.tabs
|
||||||
- navigation.instant
|
# - navigation.instant
|
||||||
- navigation.tabs.sticky
|
- navigation.tabs.sticky
|
||||||
- navigation.sections
|
- navigation.sections
|
||||||
- search.suggest
|
- search.suggest
|
||||||
@@ -236,16 +235,19 @@ extra:
|
|||||||
link: 'mailto:davidy@funkypenguin.co.nz?Subject=Hello%2C%20from%20a%20geek-cookbook%20reader%20%3B%29'
|
link: 'mailto:davidy@funkypenguin.co.nz?Subject=Hello%2C%20from%20a%20geek-cookbook%20reader%20%3B%29'
|
||||||
generator: false
|
generator: false
|
||||||
consent:
|
consent:
|
||||||
title: '🍪 Cookie consent'
|
title: 'Would you like a cookie? 🍪'
|
||||||
description: >
|
description: >
|
||||||
|
|
||||||
I know. cookies suck (except the choc-chip ones!), and so does invasive tracking. Thing is, without cookies,
|
I know. cookies suck (<I>except the choc-chip ones!</I>), and so does invasive tracking. Thing is, without cookies,
|
||||||
analytics can't record your visit, and I can't work out where/how to invest time to make the cookbook better.
|
analytics can't record your visit, and I can't work out where/how to invest time to make the cookbook better.
|
||||||
So, with your consent, I'd like to record what you look at and where you're from, so that I can make the
|
|
||||||
cookbook even better! I promise I won't do anything nefarious! - David
|
<p>So, with your consent, I'd like to record what you look at and where you're from, so that I can make the
|
||||||
|
cookbook even better! - David</p>
|
||||||
|
cookies:
|
||||||
|
custom: Plausible Analytics
|
||||||
analytics:
|
analytics:
|
||||||
provider: google
|
provider: plausible
|
||||||
property: 'UA-139253-18'
|
data_domain: geek-cookbook.funkypenguin.co.nz
|
||||||
|
|
||||||
|
|
||||||
# extra_css:
|
# extra_css:
|
||||||
|
|||||||
1
overrides/partials/integrations/analytics/plausible.html
Normal file
1
overrides/partials/integrations/analytics/plausible.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<script defer data-domain="{{ data_domain }}" src="https://plausible.io/js/plausible.js"></script>
|
||||||
@@ -4,19 +4,18 @@
|
|||||||
# Fetch git history so that we get last-updated timestamps
|
# Fetch git history so that we get last-updated timestamps
|
||||||
git fetch --unshallow
|
git fetch --unshallow
|
||||||
|
|
||||||
|
# Run python build script to check for errors
|
||||||
|
python3 scripts/build.py mkdocs.yml
|
||||||
|
|
||||||
# install mkdocs (or insiders version, if we're passed a GH_TOKEN var)
|
# install mkdocs (or insiders version, if we're passed a GH_TOKEN var)
|
||||||
if [ -z "$GH_TOKEN" ]
|
if [ -z "$GH_TOKEN" ]
|
||||||
then
|
then
|
||||||
pip install mkdocs-material
|
pip install mkdocs-material
|
||||||
|
mkdocs build -f mkdocs.yml
|
||||||
else
|
else
|
||||||
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
||||||
|
mkdocs build -f mkdocs-insiders.yml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run python build script
|
|
||||||
python3 scripts/build.py mkdocs.yml
|
|
||||||
|
|
||||||
# Now build the docs for publishing
|
|
||||||
mkdocs build -f mkdocs.yml
|
|
||||||
|
|
||||||
# Setup any necessary netlify redirects
|
# Setup any necessary netlify redirects
|
||||||
cp netlify_redirects.txt site/_redirects
|
cp netlify_redirects.txt site/_redirects
|
||||||
|
|||||||
3
scripts/serve-insiders.sh
Executable file
3
scripts/serve-insiders.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
docker build --build-arg FROM_SOURCE=ghcr.io/geek-cookbook/mkdocs-material-insiders . -t funkypenguin/mkdocs-material
|
||||||
|
docker run --rm --name mkdocs-material -it -p 8123:8000 -v ${PWD}:/docs funkypenguin/mkdocs-material serve -f mkdocs-insiders.yml --dev-addr 0.0.0.0:8000 --dirtyreload
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
docker pull squidfunk/mkdocs-material:latest
|
docker pull squidfunk/mkdocs-material:latest
|
||||||
docker build . -t funkypenguin/mkdocs-material
|
docker build . -t funkypenguin/mkdocs-material
|
||||||
docker run --rm --name mkdocs-material -it -p 8123:8000 -v ${PWD}:/docs funkypenguin/mkdocs-material
|
docker run --rm --name mkdocs-material -it -p 8123:8000 -v ${PWD}:/docs funkypenguin/mkdocs-material serve --dev-addr 0.0.0.0:8000 --dirtyreload
|
||||||
Reference in New Issue
Block a user