Skip to content

Commit

Permalink
Upgrade to Astro 5 and convert to new Content Layer API
Browse files Browse the repository at this point in the history
  • Loading branch information
huijing committed Dec 16, 2024
1 parent 5f437fa commit 86f06bc
Show file tree
Hide file tree
Showing 24 changed files with 272 additions and 152 deletions.
17 changes: 10 additions & 7 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightLinksValidator from "starlight-links-validator";

import mdx from "@astrojs/mdx";

// https://astro.build/config
export default defineConfig({
site: "https://interledger.org",
Expand Down Expand Up @@ -37,18 +39,18 @@ export default defineConfig({
},
},
{
tag: 'script',
tag: "script",
attrs: {
defer: true,
'data-website-id': '50d81dd1-bd02-4f82-8a55-34a09ccbbbd9',
src: 'https://ilf-site-analytics.netlify.app/script.js',
'data-domains': 'interledger.org'
}
}
"data-website-id": "50d81dd1-bd02-4f82-8a55-34a09ccbbbd9",
src: "https://ilf-site-analytics.netlify.app/script.js",
"data-domains": "interledger.org",
},
},
],
components: {
Header: "./src/components/Header.astro",
PageSidebar: './src/components/PageSidebar.astro'
PageSidebar: "./src/components/PageSidebar.astro",
},
social: {
github: "https://github.com/interledger",
Expand Down Expand Up @@ -132,6 +134,7 @@ export default defineConfig({
},
},
}),
mdx(),
],
server: {
port: 1103,
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^8.3.4",
"@astrojs/starlight": "^0.29.0",
"@interledger/docs-design-system": "^0.5.2",
"@astrojs/mdx": "^4.0.2",
"@astrojs/node": "^9.0.0",
"@astrojs/starlight": "^0.30.1",
"@interledger/docs-design-system": "^0.5.5",
"@types/showdown": "^2.0.6",
"astro": "^4.16.11",
"astro": "^5.0.5",
"html-to-text": "^9.0.5",
"markdown-it": "^14.1.0",
"node-html-parser": "^6.1.13",
"sharp": "^0.33.5",
"showdown": "^2.1.0",
"starlight-links-validator": "^0.13.2"
"starlight-links-validator": "^0.13.4"
}
}
17 changes: 17 additions & 0 deletions src/components/blog/CommunityLinks.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
---
<hr>

<p>As we are open source, you can easily check our work on <a href="https://github.com/interledger/">GitHub</a>. If the work mentioned here inspired you, we welcome your contributions. You can join our <a href="https://communityinviter.com/apps/interledger/interledger-working-groups-slack">community slack</a> or participate in the next <a href="https://docs.google.com/document/u/1/d/1T_Q_eRZtL8GluJR9rVADd7fvkB8mPluMk-d96LM4vlg/edit#heading=h.ybdhwl6k5886">community call</a>, which takes place each second Wednesday of the month.</p>

<p>If you want to stay updated with all open opportunities and news from the Interledger Foundation, you can subscribe to our <a href="https://interledger.org/subscribe">newsletter</a>.</p>

<style>
hr {
margin-block-start: var(--space-l);
margin-block-end: var(--space-s);
}
p {
font-style: italic;
}
</style>
File renamed without changes.
60 changes: 60 additions & 0 deletions src/components/blog/Pagination.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
const { length, currentPage, firstUrl, prevUrl, nextUrl, lastUrl } = Astro.props;
const paginationList = Array.from({length}, (_, i) => i + 1);
---
<nav aria-label="Blog pages" class="pagination">
{firstUrl ? (
<a href={`/developers${firstUrl}`} class="pagination__link">&#171;</a>
) : (
<span class="pagination__link disabled">&#171;</span>
)}

{prevUrl ? (
<a href={`/developers${prevUrl}`} class="pagination__link">&#8249;</a>
) : (
<span class="pagination__link disabled">&#8249;</span>
)}

{paginationList.map((num) => (
<a
href={`/developers/blog${num == 1 ? "" : "/" + num}`}
class={`pagination__link ${currentPage == num ? "disabled active" : ""}`}
>
{num}
</a>
))}

{!nextUrl ? (
<span class="pagination__link disabled">&#8250;</span>
) : (
<a href={`/developers${nextUrl}`} class="pagination__link">&#8250;</a>
)}

{lastUrl ? (
<a href={`/developers${lastUrl}`} class="pagination__link">&#187;</a>
) : (
<span class="pagination__link disabled">&#187;</span>
)}
</nav>

<style>
.pagination {
display: flex;
justify-content: center;
margin-block: var(--space-m);
}

.pagination__link {
padding: var(--space-xs) var(--space-s);
}

.active {
color: var(--color-primary);
}

.disabled:not(.active) {
opacity: 0.5;
cursor: not-allowed;
}
</style>
24 changes: 24 additions & 0 deletions src/content.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { z, defineCollection } from "astro:content";
import { glob } from "astro/loaders";
import { docsLoader, i18nLoader } from "@astrojs/starlight/loaders";
import { docsSchema, i18nSchema } from "@astrojs/starlight/schema";

const blogCollection = defineCollection({
loader: glob({ pattern: "**/[^_]*.{md,mdx}", base: "./src/content/blog" }),
schema: z.object({
title: z.string(),
description: z.string(),
slug: z.string(),
date: z.date(),
image: z.string().optional(),
tags: z.array(z.string()),
authors: z.array(z.string()),
author_urls: z.array(z.string()),
}),
});

export const collections = {
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
i18n: defineCollection({ loader: i18nLoader(), schema: i18nSchema() }),
blog: blogCollection,
};
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
layout: ../../layouts/BlogLayout.astro
title: "Simplifying Interledger: The Graveyard of Possible Protocol Features"
description: As the development of the Interledger Protocol (ILP) nears completion, I thought we should take a moment to remember some of the many core protocol features we’ve killed off along the way.
date: 2018-01-29
slug: simplifying-interledger-the-graveyard-of-possible-protocol-features
authors: [Evan Schwartz]
author_urls: [https://www.linkedin.com/in/evanmarkschwartz/]
authors:
- Evan Schwartz
author_urls:
- https://www.linkedin.com/in/evanmarkschwartz/
external_url: https://medium.com/interledger-blog/simplifying-interledger-the-graveyard-of-possible-protocol-features-b35bf67439be
tags:
- Interledger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
layout: ../../layouts/BlogLayout.astro
title: "Interledger: How to Interconnect All Blockchains and Value Networks"
description: "Interledger was born out of a project to build a blockchain-agnostic smart contracts platform. A key challenge was neutrality: how could a decentralized app buy resources like storage and computing, without being tied to a specific blockchain?"
date: 2018-10-03
slug: interledger-how-to-interconnect-all-blockchains-and-value-networks
authors: [Evan Schwartz]
author_urls: [https://www.linkedin.com/in/evanmarkschwartz/]
authors:
- Evan Schwartz
author_urls:
- https://www.linkedin.com/in/evanmarkschwartz/
external_url: https://medium.com/xpring/interledger-how-to-interconnect-all-blockchains-and-value-networks-74f432e64543
tags:
- Interledger
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
layout: ../../layouts/BlogLayout.astro
title: Thoughts on Scaling Interledger Connectors
description: Streaming payments mean that Interledger connectors need to process huge volumes of Interledger packets, but the current reference implementation is hard to run at scale.
date: 2019-01-23
slug: thoughts-on-scaling-interledger-connectors
authors: [Evan Schwartz]
author_urls: [https://www.linkedin.com/in/evanmarkschwartz/]
authors:
- Evan Schwartz
author_urls:
- https://www.linkedin.com/in/evanmarkschwartz/
external_url: https://medium.com/interledger-blog/thoughts-on-scaling-interledger-connectors-7e3cad0dab7f
tags:
- Interledger
Expand Down
9 changes: 5 additions & 4 deletions src/content/blog/2024-04-10-the-telemetry-tale.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
layout: ../../layouts/BlogLayout.astro
title: "The Telemetry Tale: A Journey into the Metrics of Interledger"
description: When simple metrics are paired with complex cloud solutions and important privacy considerations, the implementation process becomes significantly more complicated.
date: 2024-04-10
slug: the-telemetry-tale
authors: [Sarah Jones]
author_urls: [https://www.linkedin.com/in/sarah-jones-ba6bb6b9]
authors:
- Sarah Jones
author_urls:
- https://www.linkedin.com/in/sarah-jones-ba6bb6b9
tags:
- Interledger
- Telemetry
Expand Down Expand Up @@ -146,6 +147,6 @@ A lot of what we’ve covered in this article could be construed as scope creep.

That said, we could have benefited from more time upfront for understanding and planning instead of simply diving straight in. Perhaps, our work week eagerness may have led us to jump in too quickly. It is with a great sense of accomplishment that we now have telemetry running in our development environment where we are seeing how it holds up against our test data and hope it will be used in a production environment shortly.

We look forward to having a real handle on the pulse of the ILP network soon. Of course, this journey is far from its conclusion. Telemetry, by its nature, is an ever-evolving domain, requiring adaptation to meet the network's growing needs and challenges. Having laid a solid foundation, future developments should be smoother.
We look forward to having a real handle on the pulse of the ILP network soon. Of course, this journey is far from its conclusion. Telemetry, by its nature, is an ever-evolving domain, requiring adaptation to meet the network's growing needs and challenges. Having laid a solid foundation, future developments should be smoother.

As we reflect on our path thus far, the question is: "Given our current knowledge and experiences, would we approach this project differently?" In hindsight, we would have used self-hosted Prometheus and Grafana instances from the start and avoided many of the problems we faced. This is a goal which remains on our roadmap, in order to provide us with the flexibility we seek. Some of the back and forth on our decision-making would have been smoother had we spent some more time in discussions at the start about what privacy factors to keep in mind and how public our results were intended to be.
7 changes: 4 additions & 3 deletions src/content/blog/2024-07-09-simple-open-payments-guide.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
layout: ../../layouts/BlogLayout.astro
title: "A Simple Guide to the Open Payments Standard"
description: Learn how the Open Payments standard makes online payments easier and more accessible for everyone.
date: 2024-07-09
slug: simple-open-payments-guide
authors: [Sarah Jones]
author_urls: [https://www.linkedin.com/in/sarah-jones-ba6bb6b9]
authors:
- Sarah Jones
author_urls:
- https://www.linkedin.com/in/sarah-jones-ba6bb6b9
tags:
- Interledger
- Open Payments
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
layout: ../../layouts/BlogLayout.astro
title: "Open Payments: The Cinderella Story of Finding a Fitting Authorization Method"
description: A breakdown of the unique needs that an authorization method for Open Payments needs to be able to fulfill.
date: 2024-07-30
slug: open-payments-cinderella-story
authors: [Nathan Lie]
author_urls: [https://www.linkedin.com/in/nathan-lie-138a73121]
authors:
- Nathan Lie
author_urls:
- https://www.linkedin.com/in/nathan-lie-138a73121
tags:
- Interledger
- Open Payments
- GNAP
---

import LargeImg from "/src/components/pages/LargeImg.astro";
import LargeImg from "/src/components/blog/LargeImg.astro";

## The Internet Runs on OAuth 2.0

Expand Down
7 changes: 4 additions & 3 deletions src/content/blog/2024-08-13-interledger-universe.mdx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
layout: ../../layouts/BlogLayout.astro
title: "The Interledger Universe"
description: "Or: “What the heck are all those products and protocols?”"
ogImageUrl: /developers/img/blog/2024-08-13/og-image.png
date: 2024-08-13
slug: interledger-universe
authors: [Sabine Schaller]
author_urls: [https://www.linkedin.com/in/sabineschaller]
authors:
- Sabine Schaller
author_urls:
- https://www.linkedin.com/in/sabineschaller
tags:
- Interledger
- Interledger Protocol
Expand Down
14 changes: 6 additions & 8 deletions src/content/blog/2024-09-06-integration-tests.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
layout: ../../layouts/BlogLayout.astro
title: "Leveling Up Rafiki Testing: Shifting from Manual to Automated"
description: "How we automated our manual payment flow tests."
date: 2024-09-06
slug: integration-tests
authors: [Blair Currey]
author_urls: [https://www.linkedin.com/in/blair-currey/]
authors:
- Blair Currey
author_urls:
- https://www.linkedin.com/in/blair-currey/
tags:
- Rafiki
- Open Payments
- Testing
---

import LargeImg from "/src/components/pages/LargeImg.astro";
import LargeImg from "/src/components/blog/LargeImg.astro";

[Rafiki](https://rafiki.dev/) is open source software that allows an [Account Servicing Entity](https://rafiki.dev/overview/overview#more-about-account-servicing-entities) to enable Interledger functionality on its users’ accounts, so testing is really important to us. Given the critical nature of handling payments, it's essential that our tests not only validate correctness but also build confidence for our integrators.

Expand Down Expand Up @@ -118,10 +119,7 @@ Running tests from the host machine against services in Docker posed a problem w

This sequence diagram illustrates how a request from the host machine resolves using the mapped hostnames.

<LargeImg
src="/developers/img/blog/2024-09-06/url-problem.png"
alt="URL Problem Sequence Diagram"
/>
<LargeImg src="/developers/img/blog/2024-09-06/url-problem.png" alt="URL Problem Sequence Diagram" />

## Conclusion

Expand Down
Loading

0 comments on commit 86f06bc

Please sign in to comment.