Skip to content

Releases: wpengine/faustjs

plugin/faustwp/v0.7.7

04 Apr 14:44
b1b320d
Compare
Choose a tag to compare

Patch Changes

6a75593: Fixes a PHP 8 warning that occured on post types not registered with WP GraphQL #812

plugin/faustwp/v0.7.6

15 Mar 19:20
00fc9ec
Compare
Choose a tag to compare

Patch Changes

  • 420d0b4: Remove trailing slash from frontend uri.
  • 037b57b: Ensure sitemap URLs use the WordPress domain and not the headless frontend domain. Fixes a conflict with Yoast SEO that prevented post links from being added to the posts sitemap.

@faustjs/next@0.15.5

15 Mar 18:56
00fc9ec
Compare
Choose a tag to compare

Patch Changes

  • 732623e: Added the robotsTxt config option in handleSitemapRequests that allows you to specify the content of your /robots.txt route. You can use the following snippet to create a /robots.txt route:

    handleSitemapRequests(req, {
      wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
      sitemapIndexPath: '/wp-sitemap.xml',
      async robotsTxt(sitemapUrl) {
        return `
            User-agent: *
            Allow: /
    
            Sitemap: ${sitemapUrl}
          `;
      },
    });

    Notice robotsTxt is an async function that takes sitemapUrl as an argument. sitemapUrl can then be used to specify the URL to your sitemap in your robots.txt content.

  • 7e98ca6: Added support for sitemaps! Sitemaps in Faust.js work with Next.js middleware. You can create a piece of middleware at src/pages/_middleware.ts with the following content:

    import { handleSitemapRequests } from '@faustjs/next/middleware';
    import { NextRequest, NextResponse } from 'next/server';
    
    export default async function middleware(req: NextRequest) {
      const sitemapRequest = await handleSitemapRequests(req, {
        wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
        sitemapIndexPath: '/wp-sitemap.xml',
      });
    
      if (sitemapRequest) {
        return sitemapRequest;
      }
    
      return NextResponse.next();
    }

    The handleSitemapRequests API requires wpUrl and sitemapIndexPath to be defined. There is optional properties you can define to suit your needs. The config is as follows:

    import { handleSitemapRequests } from '@faustjs/next';
    
    handleSitemapRequests(middlewareReq, {
      // REQUIRED: Your WordPress URL
      wpUrl: process.env.NEXT_PUBLIC_WORDPRESS_URL,
      // REQUIRED: The path to your sitemap index file on WordPress
      sitemapIndexPath: '/wp-sitemap.xml',
      /**
       * OPTIONAL: Sitemap paths to ignore. Useful if you don't want to include sitemaps for users, categories, etc.
       */
      sitemapPathsToIgnore: [
        '/wp-sitemap-posts-page-1.xml',
        '/wp-sitemap-posts-post-*', // Specify a wildcard a tthe end to avoid multiple indices if necessary
      ],
      /**
       * OPTIONAL: List of Next.js pages to include in your sitemap.
       */
      pages: [
        {
          path: '/about', // required
          priority: 0.75, // optional
          changefreq: 'monthly', // optional
          lastmod: new Date().toISOString(), // optional
        },
      ],
      /**
       * OPTIONAL: Replace WP urls with the headless frontend. `true` by default.
       */
      replaceUrls: true,
    });

plugin/faustwp/v0.7.5

01 Mar 19:57
ed0f2da
Compare
Choose a tag to compare

Patch Changes

  • b7af359: Simplify generation of preview links. Fixes an issue where preview links were missing slashes with certain permalink structures. Thanks @torounit!
  • 662c377: Plugin settings are now validated and sanitized before saving.
  • c730348: Disables access to the site editor when themes are disabled

@faustjs/next@0.15.4

01 Mar 19:55
ed0f2da
Compare
Choose a tag to compare

Patch Changes

  • d2b2b39: Fixed previews when trailingSlash is enabled in Next.js config
  • Updated dependencies [d2b2b39]
    • @faustjs/core@0.15.4

@faustjs/core@0.15.4

01 Mar 19:55
ed0f2da
Compare
Choose a tag to compare

Patch Changes

  • d2b2b39: Fixed previews when trailingSlash is enabled in Next.js config

plugin/faustwp/v0.7.4

14 Feb 18:31
893b19a
Compare
Choose a tag to compare

Patch Changes

  • 1dcd987: Removes unused event callbacks for rewrite rule and post status changes. The is_events_enabled() function has also been removed.
  • 5c69b68: ConditionalTags has been deprecated as it was introduced in an older version of the framework when routing was done from the NextTemplateLoader. Now that we are using Next.js pages for routing, conditionalTags are no longer needed.
  • 7d156ba: Add a documentation link that explains "Features" checkbox settings in more detail

@faustjs/next@0.15.3

14 Feb 18:24
893b19a
Compare
Choose a tag to compare

Patch Changes

  • 1d386de: Check for FaustContext before calling GQty queries and throw an error if it's not provided.

plugin/faustwp/v0.7.3

26 Jan 17:18
7d75cda
Compare
Choose a tag to compare

Patch Changes

  • ab4a661: Fixed issue where file editor was unable to save

@faustjs/core@0.15.2

06 Jan 20:04
21231d4
Compare
Choose a tag to compare

Patch Changes

  • c004310: Fixed a bug where expired refresh tokens were not being cleared from the browser cookie, possibly resulting in infinite loops during authentication, or an inability to request authenticated content.