diff --git a/README.md b/README.md
index f75e01c..834a397 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,3 @@
-> [!NOTE]
-> This project moved to [SourceHut](https://git.sr.ht/~ayoayco/astro-resume).
-
# Astro Resume
[](https://www.npmjs.com/package/@ayco/astro-resume)
@@ -106,6 +103,7 @@ If you have shared data that needs to be initialized from the server and accesse
In this example, an appConfig object is built and serialized in index.astro and accessed in child Astro components.
In index.astro:
+
```astro
import Serialize from "@ayco/astro-resume";
@@ -120,6 +118,7 @@ export type AppConfig = typeof appConfig;
```
In Child.astro:
+
```astro
I'm a child. I have access to the appConfig in index!
@@ -133,6 +132,7 @@ const data = deserialize('app-config');
```
In GrandChild.astro:
+
```astro
I'm a grand child. I also have access to the appConfig in index!
\ No newline at end of file
+
diff --git a/src/deserialize.ts b/src/deserialize.ts
index 4391950..d26eb14 100644
--- a/src/deserialize.ts
+++ b/src/deserialize.ts
@@ -3,9 +3,9 @@
* @param id The id of the Serialize component, used to find the serialized data in the HTML
* @param parser Custom parser to be used
* @returns The deserialized JSON data
- * @see Usage examples in 👉 https://git.sr.ht/~ayoayco/astro-resume#astro-resume
+ * @see Usage examples in 👉 https://ayco.io/gh/astro-resume#usage
**/
-export function deserialize(id: string, parser?: (serialized: string)=>any): T {
+export function deserialize(id: string, parser?: (serialized: string) => any): T {
const elements = document.querySelectorAll(`script#${id}[type="application/json"]`);
if (elements?.length > 0) {
@@ -19,13 +19,13 @@ export function deserialize(id: string, parser?: (serialized: string)=>
? parser(element.textContent)
: JSON.parse(element.textContent)
}
-
+
throw Error(`astro-resume ERR: No match found.
"deserialize('${id}')" did not find any data.
Check that the following are correct:
- The Serialize component is used with correct props
- "data" prop is not undefined
- "${id}" is the "id" of the Serialize component
- See examples: https://sr.ht/~ayoayco/astro-resume/#usage
+ See examples: https://ayco.io/gh/astro-resume#usage
Stack trace: `)
}