Skip to content

Commit a1e0088

Browse files
authored
Merge branch 'main' into chore/docsdev-60-ilf-developers-dep-upgrade
2 parents a89755e + 7e31a68 commit a1e0088

29 files changed

Lines changed: 833 additions & 124 deletions

.github/workflows/sync-mdx-to-strapi.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Inside this project, you'll see the following folders and files:
2525

2626
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
2727

28+
RFC pages under `src/content/docs/rfcs/` are a small exception. Those route files wrap the upstream markdown from the `interledger/rfcs` repository via `src/components/Rfc.astro`. Internal RFC-to-RFC links are rewritten in `src/utils/rewriteRfcLinks.ts` so the rendered docs point at local Starlight routes instead of upstream `.md` source paths.
29+
2830
Static assets, like favicons or images, can be placed in the `public/` directory. When referencing these assets in your markdown, you do not have to include `public/` in the file path, so an image would have a path like:
2931

3032
```md

astro.config.mjs

Lines changed: 2 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import starlightLinksValidator from 'starlight-links-validator'
44
import starlightFullViewMode from 'starlight-fullview-mode'
55

66
import mdx from '@astrojs/mdx'
7+
import { PUBLISHED_RFC_SIDEBAR_ITEMS } from './src/data/rfcs.ts'
78

89
// https://astro.build/config
910
export default defineConfig({
@@ -76,50 +77,7 @@ export default defineConfig({
7677
{
7778
label: 'Specifications',
7879
items: [
79-
{
80-
label: 'Interledger Protocol V4 (ILPv4)',
81-
link: '/rfcs/interledger-protocol'
82-
},
83-
{
84-
label: 'Interledger Architecture',
85-
link: '/rfcs/interledger-architecture'
86-
},
87-
{
88-
label: 'Interledger Addresses',
89-
link: '/rfcs/ilp-addresses'
90-
},
91-
{
92-
label: 'STREAM Protocol',
93-
link: '/rfcs/stream-protocol'
94-
},
95-
{
96-
label: 'Simple Payment Setup Protocol (SPSP)',
97-
link: '/rfcs/simple-payment-setup-protocol'
98-
},
99-
{
100-
label: 'Peering, Clearing and Settling',
101-
link: '/rfcs/peering-clearing-settling'
102-
},
103-
{
104-
label: 'Settlement Engines',
105-
link: '/rfcs/settlement-engines'
106-
},
107-
{
108-
label: 'ILP Over HTTP',
109-
link: '/rfcs/ilp-over-http'
110-
},
111-
{
112-
label: 'Bilateral Transfer Protocol',
113-
link: '/rfcs/bilateral-transfer-protocol'
114-
},
115-
{
116-
label: 'STREAM Receipts',
117-
link: '/rfcs/stream-receipts'
118-
},
119-
{
120-
label: 'Hashed-Timelock Agreements',
121-
link: '/rfcs/hashed-timelock-agreements'
122-
},
80+
...PUBLISHED_RFC_SIDEBAR_ITEMS,
12381
{
12482
label: 'Payment Pointers',
12583
link: 'https://paymentpointers.org',
476 KB
Loading
906 KB
Loading
6.48 MB
Loading
1.6 MB
Loading

src/components/Rfc.astro

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
11
---
2-
import { parse } from 'node-html-parser'
32
import showdown from 'showdown'
3+
import { rewriteRfcLinks } from '../utils/rewriteRfcLinks'
44
5-
const { source } = Astro.props
5+
interface Props {
6+
source: string
7+
docsBasePath?: string
8+
}
9+
10+
const { source, docsBasePath = '/developers' } = Astro.props
611
7-
const getApiData = async () => {
8-
const data = await fetch(source).then((response) => response.text())
9-
const frontMatterPos = data.indexOf('---', 1) + 3
10-
const specBody = data.slice(frontMatterPos)
11-
return specBody
12+
const response = await fetch(source)
13+
14+
if (!response.ok) {
15+
throw new Error(
16+
`Failed to fetch RFC markdown from ${source}: ${response.status} ${response.statusText}`
17+
)
1218
}
1319
14-
const specBody = await getApiData()
20+
const markdown = await response.text()
21+
22+
const frontMatterPos = markdown.indexOf('---', 1) + 3
23+
const specBody = markdown.slice(frontMatterPos)
24+
1525
const converter = new showdown.Converter({
1626
tables: true,
1727
ghCompatibleHeaderId: true
1828
})
19-
const html = converter.makeHtml(specBody)
20-
const output = parse(html)
29+
30+
const renderedHtml = converter.makeHtml(specBody)
31+
32+
const html = rewriteRfcLinks(renderedHtml, {
33+
sourceUrl: source,
34+
docsBasePath
35+
})
2136
---
2237

23-
{output}
38+
<div set:html={html} />

src/components/pages/FoundationHeader.astro

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,34 @@ import FoundationLogo from '../logos/FoundationLogo.astro'
102102
<ul class="menu--level-2">
103103
<li class="menu-item menu-item--level-2">
104104
<a
105-
href="/financial-services"
105+
href="/grant/financial-services"
106106
data-umami-event="Site Nav - Financial Services"
107107
>Digital Financial Services</a
108108
>
109109
</li>
110110
<li class="menu-item menu-item--level-2">
111-
<a href="/education" data-umami-event="Site Nav - Education"
111+
<a href="/grant/education" data-umami-event="Site Nav - Education"
112112
>NextGen Higher Education</a
113113
>
114114
</li>
115115
<li class="menu-item menu-item--level-2">
116-
<a href="/ambassadors" data-umami-event="Site Nav - Ambassadors"
117-
>Ambassadors</a
116+
<a
117+
href="/grant/ambassadors"
118+
data-umami-event="Site Nav - Ambassadors">Fellowship Program</a
119+
>
120+
</li>
121+
<li class="menu-item menu-item--level-2">
122+
<a
123+
href="/grant/grant-web"
124+
data-umami-event="Site Nav - Grant for the Web"
125+
>Grant for the Web</a
126+
>
127+
</li>
128+
<li class="menu-item menu-item--level-2">
129+
<a
130+
href="/grant/open-payments-sdk"
131+
data-umami-event="Site Nav - Open Payments SDK"
132+
>Open Payments SDK</a
118133
>
119134
</li>
120135
</ul>

src/content/blog/2026-12-10-web-monetization-open-payments-part-2-connecting-wallet.md renamed to src/content/blog/2025-12-10-web-monetization-open-payments-part-2-connecting-wallet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ The incoming payment serves as a dedicated "bucket" into which we can stream mic
123123

124124
## Sending money
125125

126-
This article is already long enough, so let's dive into the fun part — actually executing a payment — in the next article!
126+
This article is already long enough, so let's dive into the fun part — actually executing a payment — in the [next article](https://interledger.org/developers/blog/web-monetization-open-payments-part-3-sending-money)!

0 commit comments

Comments
 (0)