@riebeckite/plugin-article-metadata 0.0.46 → 0.0.48

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.
@@ -1,5 +1,5 @@
1
1
  // components/article-metadata.tsx
2
- import { calculateReadingTime } from "@riebeckite/core";
2
+ import { calculateReadingTime, resolveEntryDate } from "@riebeckite/core";
3
3
  import {
4
4
  buildTaxonomyTagHref,
5
5
  resolveTaxonomyOptionsFromConfig
@@ -15,11 +15,13 @@ function ArticleMetadata({
15
15
  if (!article) return null;
16
16
  const tags = normalizeTags(article.post.frontmatter.tags);
17
17
  const createdDate = formatDate(
18
- article.post.frontmatter.published ?? article.post.frontmatter.date ?? article.post.frontmatter.created,
18
+ resolveEntryDate(article.post.frontmatter),
19
19
  locale
20
20
  );
21
21
  const updatedDate = formatDate(article.post.frontmatter.updated, locale);
22
- const readingTimeMinutes = calculateReadingTime(article.post.html ?? "");
22
+ const readingTimeMinutes = calculateReadingTime(
23
+ article.post.plainText ?? article.post.html ?? ""
24
+ );
23
25
  const taxonomy = site ? resolveTaxonomyOptionsFromConfig(site.config) : null;
24
26
  if (!createdDate && !updatedDate && !readingTimeMinutes && tags.length === 0) {
25
27
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riebeckite/plugin-article-metadata",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -21,10 +21,10 @@
21
21
  "./style.css": "./style.css"
22
22
  },
23
23
  "dependencies": {
24
- "hono": "^4.12.25",
25
- "@riebeckite/plugin-taxonomy": "0.0.46",
26
- "@riebeckite/core": "0.0.46",
27
- "@riebeckite/ui": "0.0.46"
24
+ "hono": "^4.13.18",
25
+ "@riebeckite/core": "0.0.48",
26
+ "@riebeckite/plugin-taxonomy": "0.0.48",
27
+ "@riebeckite/ui": "0.0.48"
28
28
  },
29
29
  "files": [
30
30
  "LICENSE",