@scribe-atp/next 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +4 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -23,7 +23,7 @@ Create a factory once and export its functions from your route files:
23
23
  // lib/scribe.ts
24
24
  import { createScribeSite } from "@scribe-atp/next";
25
25
 
26
- export const scribe = createScribeSite("alice.bsky.social", "alice-bsky-social");
26
+ export const scribe = createScribeSite("alice.bsky.social", "https://alice.bsky.social");
27
27
  ```
28
28
 
29
29
  ### Group index route — `/blog/[groupSlug]`
@@ -98,7 +98,7 @@ import { fetchSite } from "@scribe-atp/core";
98
98
  import type { Metadata } from "next";
99
99
 
100
100
  export async function generateMetadata(): Promise<Metadata> {
101
- const site = await fetchSite("alice.bsky.social", "alice-bsky-social");
101
+ const site = await fetchSite("alice.bsky.social", "https://alice.bsky.social");
102
102
  return {
103
103
  title: `${site.title} | My Platform`,
104
104
  // custom fields...
@@ -122,10 +122,10 @@ export const revalidate = 3600; // revalidate every hour
122
122
  ```ts
123
123
  // pages/blog/[slug].tsx
124
124
  import type { GetStaticPaths, GetStaticProps } from "next";
125
- import { fetchSite, fetchArticle, toSlug } from "@scribe-atp/core";
125
+ import { fetchSite, fetchArticle } from "@scribe-atp/core";
126
126
 
127
127
  export const getStaticPaths: GetStaticPaths = async () => {
128
- const site = await fetchSite("alice.bsky.social", toSlug("alice.bsky.social"));
128
+ const site = await fetchSite("alice.bsky.social", "https://alice.bsky.social");
129
129
  const paths = site.groups.flatMap((group) =>
130
130
  group.articles.map((article) => ({ params: { slug: article.url ?? "" } }))
131
131
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scribe-atp/next",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Next.js App Router adapter for reading Scribe CMS content from the AT Protocol.",
5
5
  "license": "MIT",
6
6
  "engines": {