Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Link Check

on:
push:
paths:
- '**.md'
- '**.html'
pull_request:
paths:
- '**.md'
- '**.html'
schedule:
- cron: '0 8 * * 1'

jobs:
link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check relative links
run: |
set -e
echo "=== Checking relative links in Markdown files ==="
errors=0

for md in $(find . -name '*.md' -not -path './.git/*' -not -path './node_modules/*'); do
# Extract relative links: [text](relative/path) or [text](./relative/path)
links=$(grep -oP '\[[^\]]*\]\(\K[^)]+' "$md" | grep -v '^https\?://' | grep -v '^#' | grep -v '^mailto:' | sed 's/#.*//')

for link in $links; do
# Remove ./ prefix if present
link=$(echo "$link" | sed 's|^\./||')
[ -z "$link" ] && continue

# Resolve relative to the file's directory
dir=$(dirname "$md")
target="$dir/$link"
# Normalize path
target=$(echo "$target" | sed 's|/\./|/|g')

if [ ! -e "$target" ]; then
echo " BROKEN: $md -> $link (resolved: $target)"
errors=$((errors + 1))
else
echo " OK: $md -> $link"
fi
done
done

echo ""
echo "=== Results ==="
if [ $errors -gt 0 ]; then
echo "FAILED: $errors broken relative link(s)"
exit 1
else
echo "PASSED: All relative links are valid"
fi
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
**The blockchain where old hardware outearns new hardware.**
**And all hardware becomes old. It's just a matter of time.**

[![CI](https://github.com/Scottcjn/Rustchain/actions/workflows/ci.yml/badge.svg)](https://github.com/Scottcjn/Rustchain/actions/workflows/ci.yml)
[![Link Check](https://github.com/Scottcjn/Rustchain/actions/workflows/link-check.yml/badge.svg)](https://github.com/Scottcjn/Rustchain/actions/workflows/link-check.yml)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
[![Stars](https://img.shields.io/github/stars/Scottcjn/Rustchain?style=flat&color=gold)](https://github.com/Scottcjn/Rustchain/stargazers)
[![Nodes](https://img.shields.io/badge/Nodes-5%20Active-brightgreen)](https://rustchain.org/explorer/)
Expand Down Expand Up @@ -422,7 +422,7 @@ Emission is a fixed 1.5 RTC per epoch and does not halve. It continues at that r

### Reference rate climbs as holder count grows

The published USD-equivalent reference rate for RTC moves up as the network gains wallet holders. **Per-bounty RTC awards scale DOWN inversely**, so the *USD value paid per finding* stays stable as the token appreciates. The live rate is always at [`/api/tokenomics`](https://rustchain.org/api/tokenomics).
The published USD-equivalent reference rate for RTC moves up as the network gains wallet holders. **Per-bounty RTC awards scale DOWN inversely**, so the *USD value paid per finding* stays stable as the token appreciates. The live rate is always at [tokenomics reference rate](docs/tokenomics_v1.md).

| Holder count | Reference rate | Bounty rate scale |
|--------------|----------------|-------------------|
Expand Down
Loading