Skip to content

Commit

Permalink
added draft page of customize toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
Fran-A-Dev committed Jan 28, 2025
1 parent d616e23 commit d409f56
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/pages/docs/how-to/customize-the-toolbar/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
export const metadata = {
title: "Customize The Toolbar",
};

This guide covers how to customize your site’s Toolbar utilizing the `toolbarNodes` filter.

## Steps

### Prerequisites

Ensure that you have completed the steps in the following pages before proceeding.

- [Basic setup](/docs/how-to/basic-setup)

- [Set up authentication](/docs/how-to/authentication/)

Implementing authentication is necessary so that Faust.js "knows" whether the current user has the permissions necessary to view and access the toolbar.

> [!NOTE]
> The Toolbar is currently an experimental feature that was introduced in `@faustwp/core@0.2.5`.
### Step 1. Add Toolbar to your project

The Faust Toolbar shares mostly the the same HTML as the WordPress core Toolbar. This enables the use of the same styles that exist in WordPress core, and have been provided for you to import within `@faustwp/core`.

```js title="pages/_app.js"
import "@faustwp/core/dist/css/toolbar.css";
```

Add `experimentalToolbar: true` to your project’s `faust.config.js`.

```js title="faust.config.js"
import { setConfig } from "@faustwp/core";
import templates from "./wp-templates";
import possibleTypes from "./possibleTypes.json";

export default setConfig({
experimentalToolbar: true, // Enable experimental toolbar
templates,
possibleTypes,
});
```
4 changes: 4 additions & 0 deletions src/pages/docs/nav.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"title": "Basic Setup",
"route": "/docs/how-to/basic-setup/"
},
{
"title": "Customize the Toolbar",
"route": "/docs/how-to/customize-the-toolbar/"
},
{
"title": "Generate types with GraphQL Codegen",
"route": "/docs/how-to/generate-types-with-graphql-codegen/"
Expand Down

0 comments on commit d409f56

Please # to comment.