Skip to content

Commit f8c164d

Browse files
authored
adds a check for internal links on push (#132)
1 parent c538b83 commit f8c164d

16 files changed

Lines changed: 147 additions & 40 deletions

File tree

.github/workflows/link-check.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Check internal links
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: "link-check-${{ github.ref }}"
14+
cancel-in-progress: true
15+
16+
defaults:
17+
run:
18+
shell: bash
19+
20+
jobs:
21+
link-check:
22+
runs-on: ubuntu-latest
23+
env:
24+
HUGO_VERSION: 0.161.1
25+
HTMLTEST_VERSION: 0.17.0
26+
steps:
27+
- name: Install Hugo CLI
28+
run: |
29+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
30+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
31+
- name: Checkout
32+
uses: actions/checkout@v7
33+
with:
34+
submodules: recursive
35+
- name: Install Node.js dependencies
36+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
37+
# Build with a root-relative baseURL so every in-site link resolves against
38+
# ./public and can be checked on disk, with no server or network needed.
39+
- name: Build with Hugo
40+
env:
41+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
42+
HUGO_ENVIRONMENT: production
43+
run: hugo --minify --gc --baseURL "/"
44+
- name: Install htmltest
45+
run: |
46+
wget -O ${{ runner.temp }}/htmltest.tar.gz \
47+
"https://github.com/wjdp/htmltest/releases/download/v${HTMLTEST_VERSION}/htmltest_${HTMLTEST_VERSION}_linux_amd64.tar.gz"
48+
tar -xzf ${{ runner.temp }}/htmltest.tar.gz -C ${{ runner.temp }} htmltest
49+
sudo install ${{ runner.temp }}/htmltest /usr/local/bin/htmltest
50+
- name: Check internal links
51+
run: htmltest

.htmltest.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Config for htmltest — checks that internal links resolve to real pages/assets.
2+
# Run via .github/workflows/link-check.yml, or locally:
3+
# hugo --minify --gc --baseURL "/" && htmltest
4+
DirectoryPath: "public"
5+
6+
# Only internal links: no network calls, so the check is fast and never flaky.
7+
CheckExternal: false
8+
9+
CheckLinks: true
10+
CheckImages: true
11+
CheckScripts: true
12+
CheckAnchors: true
13+
14+
# Not link correctness — accessibility/markup lint we are deliberately not gating on here.
15+
IgnoreAltMissing: true
16+
IgnoreInternalEmptyHash: true
17+
IgnoreEmptyHref: true
18+
19+
# Hugo emits pretty URLs (/foo/); don't complain about the missing trailing slash form.
20+
IgnoreDirectoryMissingTrailingSlash: true

content/case-studies/avif-vs-png.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ In this detailed article we will look at the potential backlash when using polyf
180180
</div>
181181
<div class="ui segment" id="calculating-savings">
182182
<div class="header">
183-
<a class="ui orange ribbon label" href="#calculating savings">
183+
<a class="ui orange ribbon label" href="#calculating-savings">
184184
<h3 style="color: #fff;">Calculating savings</h3>
185185
</a>
186186
</div>
@@ -221,7 +221,7 @@ In this detailed article we will look at the potential backlash when using polyf
221221
</div>
222222
</div>
223223
<h3>Calculate CO2 savings</h3>
224-
<p>Since every network transmission has an energy and CO2 budget attached to it we no use our formulas from <a href="#TODO">TODO:_ CO2 formulas for software engineering</a> and then we plug in to calculate the savings per day. We also use the <a href="https://app.electricitymaps.com/zone/DE">avg. grid intensity in Germany</a> for today (280g / kWh).</p>
224+
<p>Since every network transmission has an energy and CO2 budget attached to it we no use our formulas from <a href="/blog/co2-formulas-and-case-studies">CO2 formulas for software engineering</a> and then we plug in to calculate the savings per day. We also use the <a href="https://app.electricitymaps.com/zone/DE">avg. grid intensity in Germany</a> for today (280g / kWh).</p>
225225
<div class="ui ten mini statistics">
226226
<div class="statistic">
227227
<div class="value">135</div>

content/case-studies/cpu-power-capping.md

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,7 @@ Agenda
6565
<i class="right triangle icon"></i>
6666
<div class="content">
6767
<div class="header">
68-
<a href="#energy-for-compression">Measurements</a>
69-
</div>
70-
</div>
71-
</div>
72-
<div class="item">
73-
<i class="right triangle icon"></i>
74-
<div class="content">
75-
<div class="header">
76-
<a href="#summary">Evaluation of possible drawbacks</a>
68+
<a href="#measurements">Measurements</a>
7769
</div>
7870
</div>
7971
</div>
@@ -97,7 +89,7 @@ What do we want to find out?
9789
How much energy can we save through CPU power capping on a workload and what are the drawbacks of using it?
9890
{{< /research_question >}}
9991

100-
{{< greenblock >}}
92+
{{< greenblock id="setup" >}}
10193
Setting up power capping on Linux
10294
{{< /greenblock >}}
10395

@@ -154,7 +146,7 @@ $ echo "10000000" | sudo tee /sys/class/powercap/intel-rapl/intel-rapl:0/constr
154146

155147
We recommend to always set both limits unless you have specific reason not to. The rationale is to even catch power spikes which are not untypical in transacational workloads. The values `constraint_1_time_window_us` and `constraint_1_time_window_us` that govern this usually do not need to be touched.
156148

157-
{{< whiteblock >}}
149+
{{< whiteblock id="measurements" >}}
158150
Measurements
159151
{{< /whiteblock >}}
160152

@@ -288,7 +280,7 @@ The optimal operating point here shifts from **40%** to **60%**.
288280

289281
When we look even further and factor in the embodied carbon (through the [Green Software Foundation's SCI](https://sci-guide.greensoftware.foundation/)) we see that the operating point of the machine shifts again, now to **80%**.
290282

291-
{{< greenblock >}}
283+
{{< greenblock id="summary" >}}
292284
Summary and further considerations
293285
{{< /greenblock >}}
294286

content/case-studies/energy-efficiency-python.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,23 +58,15 @@ Agenda
5858
<i class="right triangle icon"></i>
5959
<div class="content">
6060
<div class="header">
61-
<a href="#setup">Setting up power capping on Linux</a>
61+
<a href="#benchmarking">Benchmarking with the Green Metrics Tool</a>
6262
</div>
6363
</div>
6464
</div>
6565
<div class="item">
6666
<i class="right triangle icon"></i>
6767
<div class="content">
6868
<div class="header">
69-
<a href="#energy-for-compression">Measurements</a>
70-
</div>
71-
</div>
72-
</div>
73-
<div class="item">
74-
<i class="right triangle icon"></i>
75-
<div class="content">
76-
<div class="header">
77-
<a href="#summary">Evaluation of possible drawbacks</a>
69+
<a href="#results">Results</a>
7870
</div>
7971
</div>
8072
</div>
@@ -98,7 +90,7 @@ What do we want to find out?
9890
How has the energy efficiency changed with Python 3.9 and Python 3.12 and how does PyPy and Mojo compare to C?
9991
{{< /research_question >}}
10092

101-
{{< greenblock >}}
93+
{{< greenblock id="benchmarking" >}}
10294
Benchmarking with the Green Metrics Tool
10395
{{< /greenblock >}}
10496

@@ -122,7 +114,7 @@ During the run we are mainly looking at the CPU energy and the total machine ene
122114

123115
**Pro Tip**: If you do not know what the Green Metrics Tool is: It is our all-in-one open source professional software benchmarking and optimization solution. [Find infos here]({{< relref path="products/green-metrics-tool" >}})
124116

125-
{{< whiteblock >}}
117+
{{< whiteblock id="results" >}}
126118
Results
127119
{{< /whiteblock >}}
128120

@@ -251,7 +243,7 @@ Mojo showed no relevant improvements which is mostly due to the fact that it can
251243
It will just wrap the Python code and import it as a module and then run it with the native Python interpreter (`libpython`). See our [discussion on their Github](https://github.com/modularml/mojo/discussions/1983)
252244

253245

254-
{{< greenblock >}}
246+
{{< greenblock id="summary" >}}
255247
Summary and further considerations
256248
{{< /greenblock >}}
257249

content/newsroom/news/2024-01-green-software-development-frankfurt.de.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Sustainable Software: Ansätze zum Messen der Energieeffizienz von Software"
33
picture: "/img/newsroom/news/gsd-frankfurt.webp"
4-
link: "/talks-and-events/green-software-development-frankfurt-2023-01-18/"
4+
link: "/talks-and-events/green-software-development-frankfurt-2024-01-18/"
55
date: 2024-01-18
66
draft: false
77
type: "news"

content/products/power-hog.de.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Eine vollständige Readme und Dokumentation finden Sie im GitHub Repo.
4747
{{< rawhtml >}}
4848
<img class="ui rounded bordered image" src="/img/products/hog-power-logger.avif" alt="HOG Screenshot" loading="lazy" style="margin:auto;">
4949
<br>
50-
<img class="ui rounded bordered image" src="/img/products/hog-mac-app.avif" alt="HOG Screenshot" loading="lazy" style="margin:auto;">
50+
<img class="ui rounded bordered image" src="/img/products/hog-mac-app.webp" alt="HOG Screenshot" loading="lazy" style="margin:auto;">
5151
<br>
5252
<img class="ui rounded bordered image" src="/img/products/hog-website.avif" alt="HOG Screenshot" loading="lazy" style="margin:auto;">
5353
<br>

content/products/webnrg.de.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: "webNRG"
3+
date: 2026-03-10 10:00:00
4+
publishDate: 2026-03-10
5+
draft: false
6+
icon: "lightning"
7+
desc: "webNRG misst den Energieverbrauch und die CO2-Emissionen von Webseiten, indem es die Analyse des Netzwerkverkehrs mit der tatsächlichen Leistungsaufnahme des Geräts während des Renderings kombiniert"
8+
ordering: 9
9+
---
10+
11+
webNRG ist ein kostenloses Open-Source-Tool, das den Energieverbrauch und die CO2-Emissionen von Webseiten misst. Anders als Tools, die nur grünes Hosting und Netzwerkdaten betrachten, konzentriert sich webNRG auf die zwei Faktoren, die häufig übersehen werden: **die Energie des Netzwerkverkehrs** und **die Rendering-Leistung auf der Nutzerseite**.
12+
13+
Das Tool führt beides zu einem einzigen Wert zusammen, der nach dem Vorbild des Nutri-Score von **A+ bis F** bewertet wird. So sind die Ergebnisse für Entwicklerinnen und Nicht-Techniker gleichermaßen sofort verständlich.
14+
15+
{{< rawhtml >}}
16+
<figure>
17+
<img class="ui centered huge image" src="/img/products/webNRG-sample-site.webp" alt="Green-Coding.io webNRG Zusammenfassung" loading="lazy">
18+
<figcaption><a href="https://website-tester.green-coding.io/details.html?page=https%3A%2F%2Fwww.green-coding.io">green-coding.io webNRG⚡️ Zusammenfassung</a></figcaption>
19+
</figure>
20+
{{< /rawhtml >}}
21+
22+
Eine der zentralen Erkenntnisse aus der Entwicklung von webNRG: Eine Seite, die 35× mehr Daten überträgt als eine andere, kann trotzdem gleich viel Rendering-Energie verbrauchen. Datenmenge und Leistungsaufnahme korrelieren nur schwach (0,49) — genau deshalb ist es wichtig, beides getrennt zu messen.
23+
24+
### Wie es funktioniert
25+
26+
- Reichen Sie Ihre Webseiten-URL für einen einmaligen Test ein oder melden Sie sich für ein **wöchentliches Monitoring** an
27+
- webNRG misst die Energie über ein Zeitfenster von 5 Sekunden nach dem initialen Laden der Seite
28+
- Netzwerkverkehr und CPU-/Rendering-Energie werden unabhängig voneinander erfasst
29+
- Die Ergebnisse werden gegen den Leerlaufverbrauch verglichen, mit Schwellenwerten von jeweils 25 % pro Bewertungsstufe
30+
- Die Emissionen werden auf Basis eines typischen Szenarios von 10.000 Nutzern pro Monat berechnet
31+
32+
### Links
33+
34+
{{< button "lightning" "webNRG ausprobieren" "https://website-tester.green-coding.io/" >}}
35+
36+
{{< button "book" "Blogartikel zur Veröffentlichung" "/blog/webnrg-released" >}}
37+
38+
<div class="clear"></div>

content/services/_index.de.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ authorlink: "https://de.linkedin.com/in/arne-tarara"
1010

1111
Wir helfen Ihnen bei der Transformation Ihrer Software zu einem nachhaltigen Produkt.
1212

13-
Wir sind [regelmäßige Sprecher auf Konferenzen und Branchensymposien]({{< relref path="#nav-meetups" >}}), entwickeln
13+
Wir sind [regelmäßige Sprecher auf Konferenzen und Branchensymposien]({{< relref path="/#nav-conference" >}}), entwickeln
1414
[Projekte]({{< relref path="products" >}}) sowie [Open-Source-Tools zur Messung von CO2 in Containern]({{< relref path="products/green-metrics-tool" >}}) und aktive Befürworter und Berater für Energie- und CO2 transparenz [State of the art carbon pipeline tooling]({{< relref path="products/eco-ci" >}})
1515
durch Zertifizierungen wie den [Blauen Engel für Software](https://www.blauer-engel.de/de/produktwelt/ressourcen-und-energieeffiziente-softwareprodukte) oder unser Projekt [Energy-ID]({{< relref path="products/energy-id" >}}).
1616

content/services/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ We help you to transform your software to a sustainable product.
1212

1313
Scroll down and see how we work with companies in our 5 stage approach.
1414

15-
We are [regular speaker at conferences and industry symposiums]({{< relref path="/#nav-meetups" >}}), developing
15+
We are [regular speaker at conferences and industry symposiums]({{< relref path="/#nav-conference" >}}), developing
1616
[open source industry advancing container native carbon measurement tools]({{< relref path="products/green-metrics-tool" >}}) as well as
1717
[state of the art carbon pipeline tooling]({{< relref path="products/eco-ci" >}}), active advocates and consultants for energy and carbon transparency
1818
through certifications like the [Blauer Engel für Software](https://www.blauer-engel.de/de/produktwelt/ressourcen-und-energieeffiziente-softwareprodukte) or our [Energy-ID]({{< relref path="products/energy-id" >}}) project.

0 commit comments

Comments
 (0)