Skip to content

Commit a9871b4

Browse files
authored
Merge pull request #507 from wpengine/chore-add-yaml-example-readme-files
chore: Add frontmatter metadata to example README files
2 parents bb13d9e + 66b311b commit a9871b4

File tree

20 files changed

+95
-292
lines changed

20 files changed

+95
-292
lines changed

docs/nav.json

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

examples/angular/template-hierarchy-data-fetching/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Angular Template Hierarchy and Data fetching Example"
3+
description: "In this example we show how to implement the **WordPress Template Hierarchy in Angular** for use with a Headless WordPress backend using WPGraphQL."
4+
---
5+
16
# Angular Template Hierarchy and Data fetching Example
27

38
In this example we show how to implement the **WordPress Template Hierarchy in Angular** for use with a Headless WordPress backend using WPGraphQL.

examples/astro/previews/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Astro Headless WordPress Previews Example"
3+
description: "In this example, we show how to implement **Headless WordPress Previews in Astro** using the **`hwp-previews`** plugin and WPGraphQL. This setup allows content creators to preview draft posts directly in the Astro frontend from the WordPress admin panel. We use **URQL** for all routing and fetching page content."
4+
---
5+
16
# Astro Headless WordPress Previews Example 🚀
27

38
In this example, we show how to implement **Headless WordPress Previews in Astro** using the **`hwp-previews`** plugin and WPGraphQL. This setup allows content creators to preview draft posts directly in the Astro frontend from the WordPress admin panel. We use **URQL** for all routing and fetching page content.

examples/astro/template-hierarchy-data-fetching-urql/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Astro Template HIerarchy and Data fetching w/URQL Example"
3+
description: "In this example we show how to implement the WP Template Hierarchy in Astro for use with a Headless WordPress backend using WPGraphQL. We use URQL for all routing and fetching page content."
4+
---
5+
16
# Astro Template HIerarchy and Data fetching w/URQL Example
27

38
In this example we show how to implement the WP Template Hierarchy in Astro for use with a Headless WordPress backend using WPGraphQL. We use URQL for all routing and fetching page content.

examples/next/apollo-authentication/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Next.js pages Apollo Authentication"
3+
description: "This example demonstrates authentication with username and password in a headless WordPress setup, running Next.js as a frontend framework. Example is using WPGraphQL and WPGraphQL Headless Login plugins to enable authentication features."
4+
---
5+
16
# Next.js pages Apollo Authentication
27

38
This example demonstrates authentication with username and password in a headless WordPress setup, running Next.js as a frontend framework. Example is using WPGraphQL and WPGraphQL Headless Login plugins to enable authentication features.

examples/next/apollo-client-data-fetch/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Example: Fetching data from WordPress with Apollo Client in Next.js"
3+
description: "This example demonstrates various approaches to integrate WordPress as a headless CMS with a Next.js frontend using Apollo Client. It showcases different data fetching strategies, state management techniques, and modern web development patterns in a real-world application context."
4+
---
5+
16
# Example: Fetching data from WordPress with Apollo Client in Next.js
27

38
This example demonstrates various approaches to integrate WordPress as a headless CMS with a Next.js frontend using Apollo Client. It showcases different data fetching strategies, state management techniques, and modern web development patterns in a real-world application context.

examples/next/apollo-client-filesystem-routing/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Next.js + WPGraphQL Headless CMS"
3+
description: "This is a Next.js project integrated with **WPGraphQL** and **WPGraphQL for ACF** to build a headless WordPress-powered site."
4+
---
5+
16
# Next.js + WPGraphQL Headless CMS
27

38
This is a [Next.js](https://nextjs.org) project integrated with **WPGraphQL** and **WPGraphQL for ACF** to build a headless WordPress-powered site.

examples/next/client-app-router-fetch-data/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Example: Next.js App Router using the Fetch API"
3+
description: "An example headless WordPress application using Next.js App Router and the fetch API to fetch data from WordPress using WPGraphQL It showcases different data fetching strategies, state management techniques, and modern web development patterns in a real-world application context. This also contains a full example using wp-env and sample data."
4+
---
5+
16
# Example: Next.js App Router using the Fetch API
27

38
# Table of Contents

examples/next/client-multisite-app-router-fetch-data/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Example: Multisite Next.js App Router using the Fetch API"
3+
description: "An example mulitsite headless WordPress application using Next.js App Router and the fetch API to fetch data from WordPress using WPGraphQL. It showcases different data fetching strategies, state management techniques, and modern web development patterns in a real-world application context. This also contains a full example using wp-env and sample data."
4+
---
5+
16
# Example: Multisite Next.js App Router using the Fetch API
27

38
# Table of Contents

examples/next/custom-sitemap-apollo/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: "Example: Create a custom WordPress sitemap with WPGraphQL and Apollo Client"
3+
description: "This example demonstrates how to generate a custom sitemap in a headless WordPress application using the Next.js framework. The example app fetches data from WordPress using Apollo Client and WPGraphQL. Since WPGraphQL doesn't support sitemaps natively, we are extending it with a custom plugin, which is included in this example as well. This plugin exposes new fields to fetch the sitemap index, with data identical to what's rendered on the native WordPress sitemap. Another field exposed by this plugin allows you to request sitemap subpages by specifying the types and pages. The plugin also adds featured image data, enabling you to create [Image Sitemaps](https://developers.google.com/search/docs/crawling-indexing/sitemaps/image-sitemaps)."
4+
---
5+
16
# Example: Create a custom WordPress sitemap with WPGraphQL and Apollo Client
27

38
## Overview

0 commit comments

Comments
 (0)