gatsby-core-theme 44.5.0 → 44.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## [44.5.1](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.5.0...v44.5.1) (2025-10-22)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update read time ([b1f14af](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/b1f14af66a11452467663c352a1dca9143c7cffa))
7
+ * update test ([f9b63d1](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/f9b63d1a6cdcda7b273d236faebfb0ddae54e2d5))
8
+
9
+
10
+ * Merge branch 'update-read-time' into 'master' ([081c37a](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/081c37af07045f9976b6491f9f5d284b8e59c7bf))
11
+
1
12
  # [44.5.0](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.4.62...v44.5.0) (2025-10-21)
2
13
 
3
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "44.5.0",
3
+ "version": "44.5.1",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -252,7 +252,7 @@ export function getReadingTime(sections, content) {
252
252
  const nrOfWords =
253
253
  removeTags(content ? content[module.value] : module.value).split(
254
254
  " "
255
- ).length / 250;
255
+ ).length / 80;
256
256
  const minPerModule = Math.floor(nrOfWords);
257
257
  const secPerModule = Math.floor((nrOfWords % 1) * 60);
258
258
 
@@ -271,8 +271,9 @@ export function getReadingTime(sections, content) {
271
271
  minutes += mins;
272
272
  seconds = decimalSeconds;
273
273
  }
274
-
274
+ minutes > 10 ? minutes = 10 : minutes;
275
275
  return (
276
+
276
277
  getRoundMinutes(`${zeroPadding(minutes, 2)}:${zeroPadding(seconds, 2)}`) ||
277
278
  null
278
279
  );
@@ -147,7 +147,7 @@ describe('Index Processor', () => {
147
147
  const result1 = getReadingTime(page1[market][relationType][1].sections);
148
148
  page.reading_time = result1;
149
149
 
150
- expect(result1).toBe(11);
150
+ expect(result1).toBe(10);
151
151
  expect(page.reading_time).toBe(result1);
152
152
  });
153
153
  });