You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/www/README.md
+17-19Lines changed: 17 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,31 +15,29 @@ yarn dev
15
15
16
16
Open http://localhost:3000 with your browser to see the result.
17
17
18
-
## Explore
18
+
## Content Management
19
19
20
-
In the project, you can see:
20
+
### Fetching Blog Content
21
21
22
-
-`lib/source.ts`: Code for content source adapter, [`loader()`](https://fumadocs.dev/docs/headless/source-api) provides the interface to access your content.
23
-
-`app/layout.config.tsx`: Shared options for layouts, optional but preferred to keep.
22
+
This project includes a script to fetch blog content and images from an S3-compatible storage (Wasabi):
|`app/(home)`| The route group for your landing page and other pages. |
28
-
|`app/docs`| The documentation layout and pages. |
29
-
|`app/api/search/route.ts`| The Route Handler for search. |
24
+
```bash
25
+
# Set up environment variables (see .env.example)
26
+
pnpm fetch-content
27
+
```
30
28
31
-
### Fumadocs MDX
29
+
The script will:
30
+
- Fetch MDX files from the `blog/` folder in the S3 bucket and save them to `content/blogs/`
31
+
- Fetch images from the `blog-images/` folder in the S3 bucket and save them to `public/blog/`
32
32
33
-
A `source.config.ts` config file has been included, you can customise different options like frontmatter schema.
33
+
### Building the Application
34
34
35
-
Read the [Introduction](https://fumadocs.dev/docs/mdx) for further details.
35
+
The build process includes fetching content from S3:
36
36
37
-
## Learn More
37
+
```bash
38
+
pnpm build
39
+
```
38
40
39
-
To learn more about Next.js and Fumadocs, take a look at the following
40
-
resources:
41
+
The build will fail if the content fetch fails. This ensures that the site is always built with the latest content and that any issues with the content fetch process are immediately apparent.
41
42
42
-
-[Next.js Documentation](https://nextjs.org/docs) - learn about Next.js
43
-
features and API.
44
-
-[Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
45
-
-[Fumadocs](https://fumadocs.vercel.app) - learn about Fumadocs
43
+
To use this in CI/CD environments, make sure to configure the appropriate AWS credentials as environment variables.
0 commit comments