Skip to content

Commit 5f6d5fb

Browse files
authored
feat: migrate from Gitbook to MkDocs Material with i18n (#42)
* feat: migrate from Gitbook to MkDocs Material with i18n - Set up MkDocs Material with mkdocs-static-i18n plugin - Migrate EN content from root into docs/ - Migrate ES content from es branch into docs/es/ with directory names mapped to match EN structure - Add GitHub Actions workflow for Pages deployment - Fix internal links and asset references - Include all hardware sub-pages in navigation - Dark/light theme toggle, search, code copy - Language switcher (EN/ES) with nav translations - CNAME preserved for lightningnode.info * chore: temporarily exclude workflow file (needs workflow scope) The GitHub Actions deploy workflow will be added once the token has the workflow scope, or it can be created via the GitHub UI. * ci: add GitHub Actions workflow for MkDocs deploy to Pages * feat: add GitHub Pages deploy workflow + Hungarian locale config - deploy.yml triggers on push to mkdocs-migration branch - mkdocs.yml includes hu locale with nav translations * feat: add Hungarian (Magyar) translation for all 45 docs pages Complete hu locale under docs/hu/ mirroring the full English content: - Lightning basics, liquidity, channel markets - Node types, advanced tools, technicals - Recovery (LND + CLN), privacy, hardware guides - RaspiBlitz, RaspiBolt, TrueNAS sub-pages - Donate page * fix: allow deploy from main branch too * fix: set site_url to GitHub Pages subpath for correct language switcher links * ci: add post-deploy URL check for all languages * fix: add proper Hungarian accents to all translations All 33 Hungarian doc files were missing ékezetek (diacritical marks). Fixed á, é, í, ó, ö, ő, ú, ü, ű across all translated content. * chore: remove old root-level content and GitBook artifacts All content already migrated to docs/ for MkDocs. Removes duplicate root files, .gitbook/, SUMMARY.md, and root CNAME. Repo structure is now: docs/ ← EN content + es/, hu/ translations mkdocs.yml README.md .github/ * ci: add test workflow for PR validation on master/main/en * fix: broken links causing strict mode build failure * ci: trigger deploy on push to en branch * fix(hu): channel→csatorna, watchtower→őrtorony, c-lightning→Core Lightning (CLN), bilingual headers * remove dead chaincode seminar link, format learning section as bullet list * update donation pages: clean up old links, add current contacts Remove: Tor BTCPayServer link, Bitcoin Beach Wallet, Tippin.me, old pay.diynodes.com Lightning Address, Sphinx Chat, lntxbot Add: Lightning Address openoms@diynodes.com, Blink Wallet, Nostr NIP05 + npub * rename Donations to Contact and support, update content and Lightning Address
1 parent c6d9062 commit 5f6d5fb

149 files changed

Lines changed: 5939 additions & 869 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Deploy MkDocs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main, en, mkdocs-migration]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- uses: actions/setup-python@v5
24+
with:
25+
python-version: '3.x'
26+
27+
- run: pip install mkdocs-material mkdocs-static-i18n
28+
29+
- run: mkdocs build
30+
31+
- uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: site
34+
35+
deploy:
36+
needs: build
37+
runs-on: ubuntu-latest
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
outputs:
42+
page_url: ${{ steps.deployment.outputs.page_url }}
43+
steps:
44+
- id: deployment
45+
uses: actions/deploy-pages@v4
46+
47+
test:
48+
needs: deploy
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Wait for site availability
54+
run: |
55+
BASE_URL="${{ needs.deploy.outputs.page_url }}"
56+
for i in $(seq 1 30); do
57+
curl -sf -o /dev/null "$BASE_URL" && break
58+
sleep 2
59+
done
60+
61+
- name: Check all page URLs
62+
run: |
63+
BASE_URL="${{ needs.deploy.outputs.page_url }}"
64+
BASE_URL="${BASE_URL%/}"
65+
URLS_FILE=$(mktemp)
66+
67+
# English pages (exclude es/hu subdirs)
68+
find docs -name '*.md' -not -path 'docs/es/*' -not -path 'docs/hu/*' | sort | while IFS= read -r f; do
69+
rel="${f#docs/}"; rel="${rel%.md}"
70+
if [ "$rel" = "index" ]; then echo "$BASE_URL/"; else echo "$BASE_URL/$rel/"; fi
71+
done >> "$URLS_FILE"
72+
73+
# ES and HU pages
74+
for lang in es hu; do
75+
[ -d "docs/$lang" ] || continue
76+
find "docs/$lang" -name '*.md' | sort | while IFS= read -r f; do
77+
rel="${f#docs/$lang/}"; rel="${rel%.md}"
78+
if [ "$rel" = "index" ]; then echo "$BASE_URL/$lang/"; else echo "$BASE_URL/$lang/$rel/"; fi
79+
done >> "$URLS_FILE"
80+
done
81+
82+
TOTAL=$(wc -l < "$URLS_FILE")
83+
echo "Checking $TOTAL URLs..."
84+
FAILED=0
85+
86+
while IFS= read -r url; do
87+
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" "$url" || true)
88+
if [ "$STATUS" != "200" ]; then
89+
echo "FAIL [$STATUS]: $url"
90+
FAILED=$((FAILED + 1))
91+
else
92+
echo " OK: $url"
93+
fi
94+
done < "$URLS_FILE"
95+
96+
rm -f "$URLS_FILE"
97+
echo ""
98+
echo "Checked: $TOTAL | Failed: $FAILED"
99+
[ "$FAILED" -eq 0 ]

.github/workflows/test.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Test MkDocs Build
2+
3+
on:
4+
pull_request:
5+
branches: [master, main, en]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- uses: actions/setup-python@v5
14+
with:
15+
python-version: '3.x'
16+
17+
- run: pip install mkdocs-material mkdocs-static-i18n
18+
19+
- name: Build site
20+
run: mkdocs build --strict
21+
22+
- name: Check all page URLs
23+
run: |
24+
# Start local server
25+
python -m http.server 8000 -d site &
26+
SERVER_PID=$!
27+
sleep 2
28+
29+
BASE_URL="http://localhost:8000"
30+
FAILED=0
31+
TOTAL=0
32+
33+
check_url() {
34+
local url="$1"
35+
TOTAL=$((TOTAL + 1))
36+
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" "$url" || true)
37+
if [ "$STATUS" != "200" ]; then
38+
echo "FAIL [$STATUS]: $url"
39+
FAILED=$((FAILED + 1))
40+
else
41+
echo " OK: $url"
42+
fi
43+
}
44+
45+
# English pages (exclude es/hu subdirs)
46+
while IFS= read -r f; do
47+
rel="${f#docs/}"; rel="${rel%.md}"
48+
if [ "$rel" = "index" ]; then check_url "$BASE_URL/"; else check_url "$BASE_URL/$rel/"; fi
49+
done < <(find docs -name '*.md' -not -path 'docs/es/*' -not -path 'docs/hu/*' | sort)
50+
51+
# ES and HU pages
52+
for lang in es hu; do
53+
[ -d "docs/$lang" ] || continue
54+
while IFS= read -r f; do
55+
rel="${f#docs/$lang/}"; rel="${rel%.md}"
56+
if [ "$rel" = "index" ]; then check_url "$BASE_URL/$lang/"; else check_url "$BASE_URL/$lang/$rel/"; fi
57+
done < <(find "docs/$lang" -name '*.md' | sort)
58+
done
59+
60+
kill $SERVER_PID 2>/dev/null || true
61+
62+
echo ""
63+
echo "Checked: $TOTAL | Failed: $FAILED"
64+
[ "$FAILED" -eq 0 ]

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
site/
2+
.venv/
3+
__pycache__/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,6 @@ Spark is a minimalistic wallet GUI for c-lightning, accessible over the web or t
305305

306306
## Learning
307307

308-
[https://github.com/lnbook/lnbook](https://github.com/lnbook/lnbook)
309-
[https://chaincode.applytojob.com/apply/LpQl1a0cvd/Chaincode-Labs-Online-Seminars](https://chaincode.applytojob.com/apply/LpQl1a0cvd/Chaincode-Labs-Online-Seminars) [https://github.com/chaincodelabs/lightning-curriculum](https://github.com/chaincodelabs/lightning-curriculum)
308+
* [https://github.com/lnbook/lnbook](https://github.com/lnbook/lnbook)
309+
* [https://github.com/chaincodelabs/lightning-curriculum](https://github.com/chaincodelabs/lightning-curriculum)
310310

SUMMARY.md

Lines changed: 0 additions & 67 deletions
This file was deleted.
File renamed without changes.

advanced-tools/balancedchannelcreation.md renamed to docs/advanced-tools/balancedchannelcreation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ There should be no rush, so use a low fee for the on-chain tx. Check [https://wh
4545

4646
This will result to have a balanced channel with 1M sats on each side \(minus the commit fee\).
4747

48-
![a balanced channel shown in ZeusLN](/.gitbook/assets/balancedChannel.jpg)
48+
![a balanced channel shown in ZeusLN](../assets/balancedChannel.jpg)
4949

5050
## The cost of liquidity
5151

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ Daily updates and links to documentation are on: [terminal.lightning.engineering
99
An alternative display:
1010
[cheeserobot.org/terminal/list](https://cheeserobot.org/terminal/list)
1111

12-
![https://lightning.engineering/posts/2019-11-07-routing-guide-2/](../.gitbook/assets/BosScore4.png)
12+
![https://lightning.engineering/posts/2019-11-07-routing-guide-2/](../assets/BosScore4.png)
1313

14-
![https://lightninglabs.substack.com/p/its-lit-introducing-the-lightning](../.gitbook/assets/BosScore1.png)
14+
![https://lightninglabs.substack.com/p/its-lit-introducing-the-lightning](../assets/BosScore1.png)
1515

16-
![https://lightninglabs.substack.com/p/its-lit-introducing-the-lightning ](../.gitbook/assets/BosScore2.png)
16+
![https://lightninglabs.substack.com/p/its-lit-introducing-the-lightning ](../assets/BosScore2.png)
1717

18-
![https://lightninglabs.substack.com/p/its-lit-introducing-the-lightning ](../.gitbook/assets/BosScore3.png)
18+
![https://lightninglabs.substack.com/p/its-lit-introducing-the-lightning ](../assets/BosScore3.png)
1919

2020
## Resources
2121

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)