Frontity release: 10 September 2019

In this release, we have focused on fixing bugs and preparing the wp-source internals so we add custom post types and custom taxonomies in the settings. It’s not ready yet, but it should be very soon.

We added two new settings to wp-source:

  • postEndpoint: change the default endpoint from “posts” to other endpoint. This is useful when you want to use another post type as your default, for example “products”.
  • params: add params here that will be passed to every request. This is useful to filter fields from the REST API, change the default per_page value and so on.

We added an example of how to dynamically change the <title> tag to the mars starter theme.

And finally, we exposed both fetch and URL in the main frontity package. These are server/client safe, which means they work exactly the same both in the client that in the server. To use them, import them from frontity:

import { URL } from "frontity";

const url = new URL(location, base);
import { fetch } from "frontity";

const response = await fetch("https://...");

Features

  • mars-theme: add dynamic tags (e771ce4)
  • frontity: expose fetch and URL from frontity package (#168) (235c465)
  • wp-source: add postEndpoint and params props to state (d921b33)

Bugs

  • core: remove componentWillMount warning with react-helmet-async (0ea885b)
  • wp-source: properly populate custom post types and taxonomies (857f803)
  • wp-source: allow arrays inside params in api.get (50fcd63)
  • wp-source: fix handlers, refactor them and improve tests (#193) (c7e2bfe)
  • wp-source: properly populate custom post types and taxonomies (857f803)
  • webpack: add support for images in Windows (#196) (00aa4e1)

Versions

 - @frontity/components@1.1.11
 - @frontity/connect@1.0.2
 - @frontity/core@1.2.1
 - @frontity/file-settings@1.1.3
 - frontity@1.3.1
 - @frontity/hooks@1.1.10
 - @frontity/html2react@1.1.11
 - @frontity/mars-theme@1.2.0
 - @frontity/router@1.0.14
 - @frontity/source@1.0.13
 - @frontity/tiny-router@1.0.14
 - @frontity/types@1.1.1
 - @frontity/wp-source@1.3.1
 - @frontity/yoast@1.1.2
4 Likes