Lint-Warnings entfernt + Link-Check ignoriert 200
This commit is contained in:
17
README.md
17
README.md
@@ -9,13 +9,13 @@ Für die Seite benötigt ihr Ruby 3 inkl. Headern und Bundler.
|
||||
|
||||
Unter Debian, Ubuntu etc systemweit installieren:
|
||||
|
||||
```
|
||||
```sh
|
||||
apt install ruby3.0 ruby3.0-dev bundler
|
||||
```
|
||||
|
||||
Dann die Gems lokal:
|
||||
|
||||
```
|
||||
```sh
|
||||
bundle config set --local path 'vendor/cache'
|
||||
bundle install
|
||||
```
|
||||
@@ -36,7 +36,7 @@ Blogeinträge werden in dem Verzeichnis `_posts` abgelegt.
|
||||
Um einen Blogeintrag zu verfassen legt man eine Datei mit dem Schema `Jahr-MM-TT-Titel.markdown` an.
|
||||
Der Blogeintrag beginnt mit folgenden Metadaten:
|
||||
|
||||
```
|
||||
```text
|
||||
layout: post
|
||||
title: "Neues Update für DocPatch"
|
||||
date: 2015-05-23 13:37:00
|
||||
@@ -79,7 +79,7 @@ jpegoptim -m 80 %Bild.jpg
|
||||
|
||||
Wenn das Bild in der korrekten Größe und Ausrichtung vorliegt, kann es wie folgt eingebunden werden:
|
||||
|
||||
```
|
||||
```text
|
||||

|
||||
```
|
||||
|
||||
@@ -87,14 +87,13 @@ Wenn das Bild in der korrekten Größe und Ausrichtung vorliegt, kann es wie fol
|
||||
|
||||
Um, neben [keys.openpgp.org](https://keys.openpgp.org/), den eigenen Chaospott-GPG-Key über das WKD-Protokoll verfügbar zu machen, gehe wie folgt vor:
|
||||
|
||||
|
||||
1. Clone das Repo.
|
||||
|
||||
2. Im Repo geh in den Ordner `.well-known/openpgpkey/hu`.
|
||||
|
||||
3. Folgendes Skript exportiert deinen öffentlichen Schlüssel in eine Datei, die den Namen deines WKD-Hashes trägt. Dieses wird zur Suche nach deinem GPG-Key benutzt.
|
||||
|
||||
```bash
|
||||
```sh
|
||||
# Deine Mailadresse hier eintragen.
|
||||
MAILADRESSE=name@chaospott.de
|
||||
|
||||
@@ -105,9 +104,7 @@ gpg --no-armor --export "$MAILADRESSE" > $(gpg --with-wkd-hash --fingerprint "$M
|
||||
4. Füge es zum git hinzu, commite und pushe.
|
||||
|
||||
## Link-Check
|
||||
|
||||
```sh
|
||||
find _posts -mindepth 2 -type f -name 20\* -exec grep -hoP 'https?://[^])# ]+' {} + | sed s+/$++g | sort -u | while read -r link; do
|
||||
status=$(curl -I "$link" | head -1 | grep -oP 'HTTP\S* \K\d+')
|
||||
printf "%s\t%s\n" "$status" "$link"
|
||||
done | tee link_status.txt
|
||||
find _posts -mindepth 2 -type f -name '20*' -exec grep -oHP 'https?://[^])# ]+' {} + | sed -E 's/:https?:\/\//|https:\/\//; s/:http:\/\//|http:\/\//' | sed 's+/$++g' | sort -u | while IFS='|' read -r file link; do http_status=$(curl -I --max-time 5 -s "$link" | head -1 | grep -oP 'HTTP\S* \K\d+'); [ "$http_status" = "200" ] && continue; printf "%s\t%s\t%s\n" "$http_status" "$file" "$link"; done | tee link_status.txt
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user