Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions docs/explanation/get-vs-post/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "GET vs POST in WPGraphQL"
description: "A guide on the differences between using a GET request with a query parameter versus a POST request to the /graphql endpoint."
---

## Overview

When interacting with WPGraphQL, selecting the correct HTTP method to fetch data is crucial. This guide explains the differences between using a GET request with a query parameter versus a POST request to the /graphql endpoint.

## Context
Expand All @@ -13,7 +11,7 @@ WPGraphQL is a GraphQL API for WordPress, enabling flexible and efficient data q

# Details

WPGraphQL supports querying data using [the endpoint](/docs/explanation/graphql-endpoints.md) in two primary ways:
WPGraphQL supports querying data using [the endpoint](/docs/explanation/graphql-endpoints/index.md) in two primary ways:

* **GET Request with Query Parameter**: You can query WPGraphQL by appending your GraphQL query as a query parameter to the `/graphql` endpoint. This method is useful for simple queries or testing purposes.

Expand Down
2 changes: 1 addition & 1 deletion docs/explanation/graphql-endpoints/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "WPGraphQL Endpoints"
description: "A guide on the differences between using /graphql and ?graphql WPGraphQL endpoints and how to customize them."
---

# Which WPGraphQL endpoints to use: /graphql vs ?graphql
## Which WPGraphQL endpoints to use: /graphql vs ?graphql

WPGraphQL exposes a GraphQL endpoint that developers can use to interact with the WordPress backend and retrieve data.

Expand Down
2 changes: 0 additions & 2 deletions docs/explanation/headless-authentication/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Headless Authentication"
description: "A guide on the process of verifying user identity and managing access control in a decoupled architecture where the WordPress and the frontend are separate systems."
---

# What is headless authentication?

Headless authentication refers to the process of verifying user identity and managing access control in a decoupled architecture where the content management system (WordPress) and the user-facing frontend are separate systems. Unlike traditional WordPress sites where authentication happens within a single application, headless authentication must work across systems, that may be located accross different regions.

## Why authentication changes in headless architectures
Expand Down
2 changes: 1 addition & 1 deletion docs/explanation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "High-level conceptual guides that provide background information a

I see you found the root of the Explanatory guides! Explanatory guides are a place where we step away from code and talk high-level concepts and import background information. If you are looking to grow your understanding of Headless WordPress with the toolkit, you are in the right place.

> [!note] Learn More
> [!NOTE] Learn More
> For more info on how we layout our documentation and the the role played by Explanatory Guides, please read about the [_Diátaxis_](https://diataxis.fr/explanation/) approach we use.

## Contributing
Expand Down
2 changes: 0 additions & 2 deletions docs/explanation/rendering-options/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Headless WordPress Rendering Options"
description: "A guide that explores the various approaches to rendering content from a headless WordPress installation, their trade-offs, and best practices."
---

## Introduction

This document explores the various approaches to rendering content from a headless WordPress installation. As a front-end developer working with headless WordPress, you'll need to make important decisions about how to handle and display WordPress content in your frontend application. This guide aims to help you understand the available options, their trade-offs, and best practices.

### 1. Rendering Raw HTML Content from WordPress Classic Editor
Expand Down
2 changes: 0 additions & 2 deletions docs/explanation/routing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Routing in Headledd WordPress"
description: "A guide that explores the intricacies of implementing routing in a headless WordPress setup. It covers the core challenges, possible implementations, and advanced considerations for optimizing your headless WordPress site."
---

# Routing in Headless WordPress: A Comprehensive Guide

This guide explores the intricacies of implementing routing in a headless WordPress setup. We'll cover the core challenges, possible implementations, and advanced considerations for optimizing your headless WordPress site.

## Background
Expand Down
2 changes: 0 additions & 2 deletions docs/explanation/sitemaps/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Sitemaps in Headless WordPress"
description: "A guide on sitemaps in headless WordPress. It explains the challenges, and the different implementation approaches for sitemap generation."
---

## A Comprehensive Overview

## What is a Sitemap?
A sitemap is an XML file that provides a structured list of pages on a website by helping search engines discover and crawl content more efficiently. It acts as a roadmap of your website's structure, containing important metadata about each page.
Since WordPress 5.5, there's a built-in XML sitemap generator that:
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "Step-by-step guides for implementing specific features and achievi

I see you found the root of the How-to guides! How-to guides are a place where we walk you through implementing specific features of the Headless WordPress Toolkit. If you are looking to achieve a specific goal with the toolkit, you are in the right place.

> [!note] Learn More
> [!NOTE] Learn More
> For more info on how we layout our documentation and the the role played by How-to guides, please read about the [_Diátaxis_](https://diataxis.fr/how-to-guides/) approach we use.

## Contributing
Expand Down
2 changes: 0 additions & 2 deletions docs/how-to/install-toolkit-plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Installing HWP Toolkit Plugins with Composer"
description: "A guide on how to install any HWP Toolkit plugin using Composer, which is the recommended way for modern WordPress development workflows."
---

## Overview

You can install any HWP Toolkit plugin using Composer, which is the recommended way for modern WordPress development workflows.

You can also install them manually from our [Releases](https://github.com/wpengine/hwptoolkit/releases) page.
Expand Down
4 changes: 1 addition & 3 deletions docs/how-to/nextjs-pages-router/enable-apq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Enable Automatic Persisted Queries in Next.js Pages Router"
description: "Learn how to reduce latency and network strain in GraphQL queries using Automatic Persisted Queries (APQ) by hashing and reusing query hashes."
---

## Overview

GraphQL queries can use very detailed and long queries to get the appropriate data fields. These queries can increase the latency and put strain on the network. Automatic Persisted Queries (APQ) provides an effective solution to this issue, by hashing the queries and sending the hashes for repeated queries instead of sending the full query string.

To benefit APQ in your headless WordPress project both your front-end and WordPress setup should support this functionality.
Expand All @@ -16,7 +14,7 @@ This guide covers how to implement APQ with Apollo Client and WPGraphQL Smart Ca
> [!NOTE]
> Automatic Persisted Queries only helps you to reduce your request size. This technique don't cache the response you get from the server.

## 0. Prerequisites
## Prerequisites

1. A WordPress installation with
- [WPGraphQL plugin](https://wordpress.org/plugins/wp-graphql/)
Expand Down
4 changes: 1 addition & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
title: "Overview"
title: "Headless WordPress Toolkit"
description: "A modern, framework-agnostic collection of plugins and packages for building headless WordPress applications."
---

## What is the Headless WordPress Toolkit?

The Headless WordPress Toolkit is a modern, framework-agnostic toolkit for building headless WordPress applications. It provides a collection of plugins, packages, and examples to help developers make WordPress a better headless CMS.

Our goal is to provide developers with the tools they need to build fast, scalable, and secure headless applications with WordPress, without being tied to a specific frontend framework.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Core Concepts"
description: "Deep dive explanations of the HWP Previews plugin's core concepts, architecture, and systems."
---

## Overview

This article provides an in-depth exploration of the fundamental concepts that power the HWP Previews plugin, covering the template-based URL system that enables framework-agnostic preview generation, the parameter registry that makes URLs dynamic and context-aware, the flexible post type configuration system, solutions for WordPress hierarchical content challenges, and the different preview modes available to content creators.

## Core Architectural Concepts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Configure Previews"
description: "Learn how to configure preview functionality using the HWP Previews plugin in your headless WordPress application."
---

## Overview

This guide shows you how to configure preview URLs for your headless WordPress site using HWP Previews. You'll set up preview links that redirect from WordPress to your front-end application with the necessary context data.

> [!TIP]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Integrate with Faust.js"
description: "Learn how to integrate the HWP Previews plugin with Faust.js in your headless WordPress application."
---

## Overview

This guide shows you how to use HWP Previews with Faust.js. The integration happens automatically when both plugins are installed.

## Prerequisites
Expand Down
28 changes: 0 additions & 28 deletions docs/plugins/hwp-previews/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,10 @@ title: "HWP Previews"
description: "HWP Previews plugin enables seamless preview functionality for headless WordPress applications, allowing content creators to preview their changes in the frontend application before publishing."
---

## Introduction

**HWP Previews** is a headless preview solution for WordPress that provides fully configurable preview URLs via a settings interface.

This plugin bridges the preview gap in headless WordPress architectures, allowing content creators to preview their changes in the front-end application before publishing.

## Table of Contents

* [Key Features](#key-features)
* [Setup](#setup)
* [Project Structure](#project-structure)
* [Configuration](#configuration)
* [Front-End Integration](#front-end-integration)
* [Using With Faust.js](#using-with-faustjs)
* [Documentation](#documentation)
* [Contributing](#contributing)

## Key Features

### Framework Agnostic
Expand Down Expand Up @@ -132,21 +119,6 @@ To implement previews from scratch, refer to your framework's documentation:

HWP Previews automatically integrates with [Faust.js](https://faustjs.org/) when both plugins are active. See the [Integrate with Faust.js](how-to/integrate-with-faust/index.md) guide for details.

## Documentation

### How-to guides

* [Configure Previews](how-to/configure-previews/index.md)
* [Integrate with Faust.js](how-to/integrate-with-faust/index.md)

### Tutorials
* [Build Previews with Next.js and WPGraphQL](tutorial/previews-with-wpgraphql/index.md)
* [Build Previews with Next.js and REST API](tutorial/previews-with-rest/index.md)

### Explanation

* [Core Concepts](explanation/core-concepts/index.md)

## Contributing

If you feel like something is missing or you want to add documentation, we encourage you to contribute! Please check out our [Contributing Guide](https://github.com/wpengine/hwptoolkit/blob/main/CONTRIBUTING.md) for more details.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Build Previews with Next.js and REST API"
description: "Learn how to build a Next.js application with WordPress preview functionality using the REST API and Application Passwords."
---

## Overview

In this tutorial, we will build a Next.js application that displays WordPress content and enables preview functionality for draft posts. By the end, you will have a working headless WordPress setup where clicking "Preview" in WordPress opens your draft content in Next.js.

We will use Next.js Pages Router, WordPress REST API for data fetching, and WordPress Application Passwords for authentication.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "Build Previews with Next.js and WPGraphQL"
description: "Learn how to build a Next.js application with WordPress preview functionality using WPGraphQL and the HWP Previews plugin."
---

## Overview

In this tutorial, we will build a Next.js application that displays WordPress content and enables preview functionality for draft posts. By the end, you will have a working headless WordPress setup where clicking "Preview" in WordPress opens your draft content in Next.js.

We will use Next.js Draft Mode, WPGraphQL for data fetching, and WordPress Application Passwords for authentication.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "How To Guide: Add a new Settings Field"
description: "Learn how to add custom settings fields to the WPGraphQL Logging plugin admin interface and retrieve their values programmatically."
---

## Overview

In this guide, you will learn how to extend the WPGraphQL Logging plugin's admin interface by adding custom settings fields and integrating them with the logging system.

We will demonstrate how to create a new checkbox field in the admin settings, retrieve its value programmatically, and use it to control logging behavior through custom rules. This approach is useful for adding application-specific configuration options, creating conditional logging scenarios, or providing users with granular control over what gets logged in their GraphQL operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "How To Guide: Add a new Settings Tab"
description: "Learn how to add custom settings tabs to the WPGraphQL Logging plugin admin interface."
---

## Overview

In this guide, you will learn how to extend the WPGraphQL Logging plugin's admin interface by creating custom settings tabs with their own fields and configuration options.

We will demonstrate how to create a new settings tab, add custom fields to it, and integrate it with the plugin's settings system. This approach is useful for organizing related configuration options, creating plugin-specific settings sections, or providing users with dedicated interfaces for managing complex logging behaviors and integrations with external services.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "How To Guide: Update the Admin Grid"
description: "Learn how to add custom columns to the WPGraphQL Logging plugin admin logs table."
---

## Overview

This guide shows how to add a custom column to the Logs list table using the provided filters. We’ll add a Memory Peak Usage column sourced from the log entry’s `extra.memory_peak_usage`.

### Hooks overview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "How To Guide: Add Data to an Event"
description: "Learn how to add custom context data to WPGraphQL Logging event."
---

## Overview

In this guide, you will learn how to extend the logging capabilities of WPGraphQL Logging by transforming events and adding custom context data.

We will demonstrate how to modify event payloads before they are logged, which can be useful for adding application-specific metadata, changing log levels dynamically, or enriching log entries with additional debugging information that helps with monitoring and troubleshooting your GraphQL operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "How To Guide: Use the Events Pub/Sub System"
description: "Learn how to use the WPGraphQL Logging plugin's event pub/sub system to subscribe, transform, and emit events."
---

## Overview

The plugin exposes a lightweight pub/sub bus around key WPGraphQL lifecycle events and bridges them to standard WordPress actions/filters. You can:

* Subscribe (read-only) to observe event payloads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "How To Guide: Add a new Handler"
description: "This guide shows how to log to a file using a Monolog handler, either in addition to the default WordPress database handler or as a replacement. It also covers per-instance overrides."
---

## Overview

In this guide, you will learn how to extend the logging capabilities of WPGraphQL Logging by adding a new [Monolog](https://github.com/Seldaek/monolog) handler. Specifically, we will demonstrate how to send logs to a file, which can be useful for long-term storage, offline analysis, or integration with external log management systems.

## What is a Monolog Handler?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ title: "How To Guide: Add a new Processor"
description: "Learn how to add custom Monolog processors to the WPGraphQL Logging plugin to transform log records."
---

## Overview


In this guide, you will learn how to extend the logging capabilities of WPGraphQL Logging by adding a new [Monolog](https://github.com/Seldaek/monolog) processor.

Specifically, we will demonstrate how to add the current WordPress environment variable to the extra data, which can be useful for distinguishing between development, staging, and production environments in your logs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "How To Guide: Add or Remove a Rule"
description: "Learn how to create and register custom logging rules with the WPGraphQL Logging plugin."
---

## Overview

This guide shows how to create a custom logging rule that only passes when the GraphQL query contains a specific substring (like "GetPost"), how to register it with the RuleManager, and how to remove existing rules.

### Architecture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ title: "How To Guide: Update the Log Store Service"
description: "Learn how to replace the default database logging with a custom log storage implementation in the WPGraphQL Logging plugin."
---

## Overview

The WPGraphQL Logging plugin provides a robust database logging solution out of the box. However, for advanced use cases or integration with external logging systems, you can replace the default storage mechanism with your own custom implementation.

This is made possible by the `wpgraphql_logging_log_store_service` filter.
Expand Down
Loading