Compare commits

...

6 Commits

Author SHA1 Message Date
617a4c7ebe ricordati di far andare hugo prima di creare l'immagine (#314)
#311

Reviewed-on: BgLUG/bglug.it#314
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
2024-10-27 18:31:31 +00:00
69842eb740 fix pagination deprecation (#312)
fixes #282

Reviewed-on: BgLUG/bglug.it#312
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
2024-10-27 18:30:26 +00:00
4662d6f842 fix .tocss deprecation (#313)
fixes #283

Reviewed-on: BgLUG/bglug.it#313
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
2024-10-27 09:50:19 +00:00
164f69ae43 security.txt (#311)
Reviewed-on: BgLUG/bglug.it#311
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
2024-10-27 09:48:04 +00:00
f8d27e3914 url check (#310)
workflow che una volta a settimana controlla se ci sono link esterni che non vanno.

fixes #271

Reviewed-on: BgLUG/bglug.it#310
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
2024-10-27 09:47:43 +00:00
a985989c3e url errata (#309)
Reviewed-on: BgLUG/bglug.it#309
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
2024-10-27 09:45:19 +00:00
7 changed files with 100 additions and 2 deletions

View File

@ -0,0 +1,71 @@
---
name: External links check
on:
schedule:
- cron: "30 18 * * 2"
jobs:
scan:
name: Check all external links
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: restore resources from cache
uses: actions/cache/restore@v4
with:
path: |
resources
key: bglug-it-hugo-resources
- name: update git hash
run: |
H=$(git rev-parse --short=10 HEAD)
echo "commit: $H"
sed -i "s/AbbreviatedHash\:.*$/AbbreviatedHash: ${H}/" config/_default/params.yaml
- name: Build Hugo
run: |
wget -O - https://github.com/gohugoio/hugo/releases/download/v0.135.0/hugo_extended_0.135.0_linux-amd64.tar.gz | tar zxv
./hugo --gc --minify --cleanDestinationDir
- name: store resources into cache
uses: actions/cache/save@v4
if: always() # salva in cache anche se la build fallisce
with:
path: |
resources
key: bglug-it-hugo-resources
- name: parse all the links
shell: bash
run: |
echo "Calculating a list of URLs"
grep --ignore-case --recursive --only-matching --no-filename \
--include \*.html --perl-regexp '(?<=href=")[^"]*' public/ | \
grep ^http | \
grep --invert-match --extended-regexp \
--file .gitea/workflows/extlinks_whitelist_patterns.list | \
sort -u > all_links.list
echo "List contains $(cat all_links.list | wc -l) URLs"
unreachable_count=0
while IFS= read -r url; do
response_code=$(curl --head --silent --output /dev/null --retry 2 --connect-timeout 2 --write-out "%{http_code}" "$url" || true)
if [[ ! $response_code == 200 && ! $response_code =~ 3[0-9]{2} ]]; then
echo "UNREACHABLE ($response_code): $url"
unreachable_count=$((unreachable_count+1))
fi
done < all_links.list
echo "List parsed. Unreachable URLs: $unreachable_count"
if [[ $unreachable_count -gt 0 ]] ; then
exit 1
fi

View File

@ -0,0 +1,6 @@
https?\:\/\/localhost
https?\:\/\/(www\.)?bglug\.it
https\:\/\/git\.libreschool\.org\/BgLUG\/bglug\.it\/src
https?\:\/\/192\.168\.[0-9]+\.[0-9]+
https?\:\/\/172\.16\.[0-9]+\.[0-9]+
https?\:\/\/10\.[0-9]+\.[0-9]+\.[0-9]+

View File

@ -51,6 +51,7 @@ hugo server -D
This website can be used as a container image; to do so in docker:
```sh
hugo --baseURL http://127.0.0.1:6080 --gc --minify --cleanDestinationDir
docker build -t bglug-website .
```

View File

@ -7,7 +7,6 @@ logo: logo_tondo.svg
author: BgLUG
theme: hugo-arcana
copyright: 2024 © Bergamo Linux Users Group
paginate: 20
timeout: 1800s
enableRobotsTXT: true
enableGitInfo: true
@ -257,3 +256,11 @@ imaging:
exif:
disableDate: true
disableLatLong: true
module:
mounts:
source: static/.well-known
target: static/.well-known
pagination:
pagerSize: 20

View File

@ -121,7 +121,7 @@ Mio padre, tra i tanti buoni consigli che mi ha dato, mi ripeteva sempre _"Nessu
[3]: http://www.valueram.com/datasheets/KVR533D2N4_1G.pdf
[4]: http://www.samsung.com/global/business/hdd/productmodel.do?group=72&type=62&subtype=67&model_cd=298
[5]: http://www.mini-box.com/s.nl/it.A/id.417/.f?sc=8
[6]: http://http://www.shopelectronic.it/product.asp?Id=14507
[6]: http://www.shopelectronic.it/product.asp?Id=14507
[7]: http://cartft.de/ "CarTFT"
[8]: http://www.totalmodding.com/ "Totalmodding"
[9]: http://www.shopelectronic.it/ "Shopelectronic"

View File

@ -0,0 +1,9 @@
{{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" .Site.Params.enableSourceMaps) }}
{{ $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "main.scss" . | css.Sass $options }}
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="{{ $style.RelPermalink }}" />
{{- partial "analytics/google-tag-manager/head.html" . -}}
{{- partial "head/custom.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}

View File

@ -0,0 +1,4 @@
Contact: mailto:info@bglug.it
Expires: 2026-10-25T21:00:00.000Z
Preferred-Languages: it, en, fr
Canonical: https://bglug.it/.well-known/security.txt