During the last month, we’ve been working on plenty of new features and bug fixes. Here you have what was included in the last release:
New features
- TwentyTwenty theme improvements
- Add pagination to the theme - Feature discussion.
- Some CSS improvements.
- Add proper status codes.
- New processor to lazy load iframes:
- New processor to execute scripts included in the content:
- Improve the
frontity create
command to make it more intuitive and let users select their starter theme. - Include
babel-macro-plugin
:- Huge thanks to
@wisammechano
here, who did the PR to solve this. - Feature discussion.
- Huge thanks to
- Add status code and error messages to data:
- Feature discussion.
- You can find an example of how to use it at mars-theme.
- Expose Koa’s context in the beforeSSR method, which allows the users to change the response object within the beforeSSR/afterSSR methods.
- Add error/Warning commands in order to have a standard way to add console warnings and throw errors.
- Add a new
decode
function to escape html strings:-
decode
function docs. - Use this function inside twentytwenty-theme.
-
- Refactor of Frontity’s Command Line Interface so the steps are more easily reused and developers can access the commands programmatically.
Bug fixes
- Second
source.populate
library call in taxonomy handler overrides previous content #245. - Array elements from package state are duplicated on
csr
#237. - Return 404 status for 404 pages #264.
- Fix TS type inconsistencies #307.
- Frontity shows
&
when ampersand is used in a title #268. -
npx frontity create
adds mars-theme’s settings even if a different theme has been set #132. - Bug causes a rejected Promise to be swallowed #296.
- UTM links are modified in Frontity’s blog #294.
To keep Frontity and its packages updated, you can follow this guide of our documentation.
Packages Changelog
frontity@1.5.1
Minor Changes
-
495771f8
#302 Thanks @michalczaplinski! - Add a newdecode
function to ‘frontity’, which unescapes the HTML.This replaces the
decode
function previously inhtml2react
.This is necessary because some of the content fro WP API can come as escaped HTML entities and we want to render it straight into react components.
-
80c1aa3a
#288 Thanks @michalczaplinski! - Add a new option--theme
which allows specifying the starter theme on the command line. If the theme is not specified, the user can pick a theme from an interactive prompt.
Patch Changes
-
80fb05f2
#325 Thanks @luisherranz! - Thedecode
function now properly decodes numeric entities.
-
74eb448e
#323 Thanks @luisherranz! - Fix missing typescript dependency in the frontity package. This package is the one responsible to inject typescript in a Frontity Project and the Frontity CLI.
-
417f2b0f
#305 Thanks @michalczaplinski! - Improve the performance of thedecode
function. Now it works like this:- It does a regexp to check if there are HTML entities.
- It does a partial replacement of common entities using the
simple-entity-decode
package. - It does a new regexp check to see if there is any entity left.
- Finally, it does a full replacement of all entities using:
-
he
in the server, which works great but it is a big library and therefore we don’t want to include it in the client. -
DomParser
in the client, which is safe to use.
-
@frontity/core@1.5.0
Minor Changes
-
a4e9e579
#309 Thanks @michalczaplinski! - Pass Koa’s context to beforeSSR action so packages can modify it. -
ed257939
#301 Thanks @wisammechano! - babel-plugin-macros was added to babel core configs
Patch Changes
-
15a8b582
#299 Thanks @DAreRodz! - Prevent array elements stored in the state to be duplicated during CSR -
495771f8
#302 Thanks @michalczaplinski! - Add a newdecode
function to ‘frontity’, which unescapes the HTML.This replaces thedecode
function previously inhtml2react
.This is necessary because some of the content fro WP API can come as escaped HTML entities and we want to render it straight into react components.
@frontity/twentytwenty-theme@1.0.0
Major Changes
-
f41c4883
#235 Thanks @segunadebayo! - Release first version of the TwentyTwenty Frontity theme.
Minor Changes
-
d19452da
#315 Thanks @iamuchejude! - Re-implement pagination in the TwentyTwenty Theme
Patch Changes
-
6f35bd2b
#63 Thanks @luisherranz! - Set TwentyTwenty license to GPLv2
-
eb9bed5a
#248 Thanks @mrmakadia94! - Update TwentyTwenty package variable
-
145210c6
#304 Thanks @michalczaplinski! - Add a new component that shows how to handledata.isError
in mars-theme and twenty-twenty theme
-
495771f8
#302 Thanks @michalczaplinski! - Decode the HTML entities using thedecode
function from ‘frontity’
-
10189c8d
#257 Thanks @michalczaplinski! - Add link underlines on hover.
Add transitions when showing and hiding the Search Bar.
Fix minor CSS bugs.
@frontity/components@1.2.0
Minor Changes
-
5431499d
#280 Thanks @iamuchejude! - Add iframe processor and component to lazy load the iframes. It supports native lazy loading and fallbacks to the Intersection Observer. -
ece68296
#256 Thanks @michalczaplinski! - Use the recommended react-intersection-observer in the component in @frontity/components. -
aaed99f5
#266 Thanks @iamuchejude! - Create script component for processor.
@frontity/tiny-router@1.1.0
Minor Changes
-
9afad1f6
#309 Thanks @michalczaplinski! - Return correct error codes on when the server responds with 4xx or 5xx.
Patch Changes
-
6566d8e7
#308 Thanks @michalczaplinski! - Update outdated TS types and correct the outdated import paths
@frontity/mars-theme@1.3.1
Patch Changes
-
145210c6
#304 Thanks @michalczaplinski! - Add a new component that shows how to handledata.isError
in mars-theme and twenty-twenty theme
@frontity/html2react@1.2.0
Minor Changes
-
5431499d
#280 Thanks @iamuchejude! - Add iframe processor and component to lazy load the iframes. It supports native lazy loading and fallbacks to the Intersection Observer. -
4c89da89
#305 Thanks @michalczaplinski! - - Decode all the HTML attributes that are strings.- Map correctly from some HTML attributes to their corresponding React props.
Patch Changes
-
495771f8
#302 Thanks @michalczaplinski! - Add a newdecode
function to ‘frontity’, which unescapes the HTML.This replaces thedecode
function previously inhtml2react
.This is necessary because some of the content fro WP API can come as escaped HTML entities and we want to render it straight into react components. -
f9059f3e
#266 Thanks @iamuchejude! - Fix execution of scripts tags e.g in embedded blocks.
@frontity/hooks@1.2.0
Minor Changes
-
1aa1fb22
#256 Thanks @michalczaplinski! - Deprecate the @frontity/hooks package and recommend https://github.com/thebuilder/react-intersection-observer instead.
Patch Changes
-
b9372580
#251 Thanks @michalczaplinski! - Bugfix for useInView hook. Fixes occasional error when attempting to find a nonexistent element in page.
@frontity/google-analytics@1.0.0
Major Changes
@frontity/yoast@1.2.0
Minor Changes
-
68b395f1
#310 Thanks @luisherranz! - Deprecate@frontity/yoast
in favor of@frontity/head-tags
Patch Changes
-
6566d8e7
#308 Thanks @michalczaplinski! - Update outdated TS types and correct the outdated import paths
@frontity/connect@1.0.4
Patch Changes
-
696dec11
#296 Thanks @michalczaplinski! - Fix a critical bug that causes promise errors to be swallowed
@frontity/analytics@1.0.0
Major Changes
Patch Changes
-
6566d8e7
#308 Thanks @michalczaplinski! - Update outdated TS types and correct the outdated import paths
@frontity/error@0.0.1
Major Changes
- Release first version of the package