-
Notifications
You must be signed in to change notification settings - Fork 1
adds a check for internal links on push #132
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: Check internal links | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: "link-check-${{ github.ref }}" | ||
| cancel-in-progress: true | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| link-check: | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| HUGO_VERSION: 0.161.1 | ||
| HTMLTEST_VERSION: 0.17.0 | ||
| steps: | ||
| - name: Install Hugo CLI | ||
| run: | | ||
| wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ | ||
| && sudo dpkg -i ${{ runner.temp }}/hugo.deb | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| submodules: recursive | ||
| - name: Install Node.js dependencies | ||
| run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" | ||
| # Build with a root-relative baseURL so every in-site link resolves against | ||
| # ./public and can be checked on disk, with no server or network needed. | ||
| - name: Build with Hugo | ||
| env: | ||
| HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache | ||
| HUGO_ENVIRONMENT: production | ||
| run: hugo --minify --gc --baseURL "/" | ||
| - name: Install htmltest | ||
| run: | | ||
| wget -O ${{ runner.temp }}/htmltest.tar.gz \ | ||
| "https://github.com/wjdp/htmltest/releases/download/v${HTMLTEST_VERSION}/htmltest_${HTMLTEST_VERSION}_linux_amd64.tar.gz" | ||
| tar -xzf ${{ runner.temp }}/htmltest.tar.gz -C ${{ runner.temp }} htmltest | ||
| sudo install ${{ runner.temp }}/htmltest /usr/local/bin/htmltest | ||
| - name: Check internal links | ||
| run: htmltest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Config for htmltest — checks that internal links resolve to real pages/assets. | ||
| # Run via .github/workflows/link-check.yml, or locally: | ||
| # hugo --minify --gc --baseURL "/" && htmltest | ||
| DirectoryPath: "public" | ||
|
|
||
| # Only internal links: no network calls, so the check is fast and never flaky. | ||
| CheckExternal: false | ||
|
|
||
| CheckLinks: true | ||
| CheckImages: true | ||
| CheckScripts: true | ||
| CheckAnchors: true | ||
|
|
||
| # Not link correctness — accessibility/markup lint we are deliberately not gating on here. | ||
| IgnoreAltMissing: true | ||
| IgnoreInternalEmptyHash: true | ||
| IgnoreEmptyHref: true | ||
|
|
||
| # Hugo emits pretty URLs (/foo/); don't complain about the missing trailing slash form. | ||
| IgnoreDirectoryMissingTrailingSlash: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
content/newsroom/news/2024-01-green-software-development-frankfurt.de.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| --- | ||
| title: "webNRG" | ||
| date: 2026-03-10 10:00:00 | ||
| publishDate: 2026-03-10 | ||
| draft: false | ||
| icon: "lightning" | ||
| 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" | ||
| ordering: 9 | ||
| --- | ||
|
|
||
| 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**. | ||
|
|
||
| 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. | ||
|
|
||
| {{< rawhtml >}} | ||
| <figure> | ||
| <img class="ui centered huge image" src="/img/products/webNRG-sample-site.webp" alt="Green-Coding.io webNRG Zusammenfassung" loading="lazy"> | ||
| <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> | ||
| </figure> | ||
| {{< /rawhtml >}} | ||
|
|
||
| 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. | ||
|
|
||
| ### Wie es funktioniert | ||
|
|
||
| - Reichen Sie Ihre Webseiten-URL für einen einmaligen Test ein oder melden Sie sich für ein **wöchentliches Monitoring** an | ||
| - webNRG misst die Energie über ein Zeitfenster von 5 Sekunden nach dem initialen Laden der Seite | ||
| - Netzwerkverkehr und CPU-/Rendering-Energie werden unabhängig voneinander erfasst | ||
| - Die Ergebnisse werden gegen den Leerlaufverbrauch verglichen, mit Schwellenwerten von jeweils 25 % pro Bewertungsstufe | ||
| - Die Emissionen werden auf Basis eines typischen Szenarios von 10.000 Nutzern pro Monat berechnet | ||
|
|
||
| ### Links | ||
|
|
||
| {{< button "lightning" "webNRG ausprobieren" "https://website-tester.green-coding.io/" >}} | ||
|
|
||
| {{< button "book" "Blogartikel zur Veröffentlichung" "/blog/webnrg-released" >}} | ||
|
|
||
| <div class="clear"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed as some pictures are empty