1
0
mirror of https://github.com/funkypenguin/geek-cookbook/ synced 2025-12-13 01:36:23 +00:00

Trial plausible for transparent analytics (#181)

This commit is contained in:
David Young
2021-08-10 16:18:08 +12:00
committed by GitHub
parent 76f2d9fd1e
commit 530b1e93d9
10 changed files with 42 additions and 27 deletions

BIN
.cache/Ubuntu.400.ttf Normal file

Binary file not shown.

BIN
.cache/Ubuntu.700.ttf Normal file

Binary file not shown.

View File

@@ -1,5 +1,6 @@
#FROM squidfunk/mkdocs-material
FROM ghcr.io/squidfunk/mkdocs-material-insiders
ARG FROM_SOURCE=squidfunk/mkdocs-material
FROM ${FROM_SOURCE}
RUN pip install \
mkdocs-autolinks-plugin \
mkdocs-htmlproofer-plugin \

View File

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

5
mkdocs-insiders.yml Normal file
View 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: {}

View File

@@ -19,15 +19,14 @@ copyright: 'Copyright © 2016 - 2021 David Young, Funky Penguin Limited'
# Plugins
plugins:
- social
- search
- minify:
minify_html: true
- git-revision-date-localized:
type: date
- autolinks
- macros:
verbose: true
search:
minify:
minify_html: true
git-revision-date-localized:
type: date
autolinks:
macros:
verbose: true
@@ -189,7 +188,7 @@ theme:
favicon: 'images/site-logo.svg'
features:
- navigation.tabs
- navigation.instant
# - navigation.instant
- navigation.tabs.sticky
- navigation.sections
- search.suggest
@@ -236,16 +235,19 @@ extra:
link: 'mailto:davidy@funkypenguin.co.nz?Subject=Hello%2C%20from%20a%20geek-cookbook%20reader%20%3B%29'
generator: false
consent:
title: '🍪 Cookie consent'
title: 'Would you like a cookie? 🍪'
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.
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:
provider: google
property: 'UA-139253-18'
provider: plausible
data_domain: geek-cookbook.funkypenguin.co.nz
# extra_css:

View File

@@ -0,0 +1 @@
<script defer data-domain="{{ data_domain }}" src="https://plausible.io/js/plausible.js"></script>

View File

@@ -4,19 +4,18 @@
# Fetch git history so that we get last-updated timestamps
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)
if [ -z "$GH_TOKEN" ]
then
pip install mkdocs-material
mkdocs build -f mkdocs.yml
else
pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
mkdocs build -f mkdocs-insiders.yml
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
cp netlify_redirects.txt site/_redirects

3
scripts/serve-insiders.sh Executable file
View 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

View File

@@ -1,4 +1,4 @@
#!/bin/bash
docker pull squidfunk/mkdocs-material:latest
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