Skip to content

Commit

Permalink
fixed metas plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Oct 9, 2023
1 parent 93c2117 commit a09d2fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Any BREAKING CHANGE between minor versions will be documented here in upper case
### Added
- The second argument of the `page.data.url()` function has the default URL value.

### Changed
- Removed schema.org meta tags in metas plugin, because they are are not valid.
Probably it needs a new specific plugin.

### Fixed
- Ignore error checking Lume version in offline environments [#496].
- Updated dependencies: `deno_dom`, `katex`, `preact`, `sass`, `svg2png`, `terser`.
Expand Down
5 changes: 0 additions & 5 deletions plugins/metas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ export default function (userOptions?: Partial<Options>): Plugin {
);
addMeta(document, "name", "twitter:site", twitter);

// Schema.org
addMeta(document, "itemprop", "name", title);
addMeta(document, "itemprop", "description", description, 155);
addMeta(document, "itemprop", "image", image || icon);

// SEO
addMeta(document, "name", "description", description, 155);
addMeta(document, "name", "keywords", keywords?.join(", "));
Expand Down
9 changes: 0 additions & 9 deletions tests/__snapshots__/metas.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ snapshot[`metas plugin 3`] = `
<meta property="og:image" content="http://localhost/my-image.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@myUser">
<meta itemprop="name" content="Custom title">
<meta itemprop="description" content="A very long custom description with a lot of text that will be truncated to a maximum of 155 characters and then append &quot;&quot; to the end. Lorem ipsum dolor…">
<meta itemprop="image" content="http://localhost/my-image.png">
<meta name="description" content="A very long custom description with a lot of text that will be truncated to a maximum of 155 characters and then append &quot;&quot; to the end. Lorem ipsum dolor…">
<meta name="keywords" content="one, two">
<meta name="robots" content="index, follow">
Expand Down Expand Up @@ -179,9 +176,6 @@ snapshot[`metas plugin 3`] = `
<meta property="og:image" content="http://localhost/page-2/my-image.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@myUser">
<meta itemprop="name" content="Relative paths">
<meta itemprop="description" content="Tests the use of relative path (to page.data.url) when filling out the og:image or og:icon URL">
<meta itemprop="image" content="http://localhost/page-2/my-image.png">
<meta name="description" content="Tests the use of relative path (to page.data.url) when filling out the og:image or og:icon URL">
<meta name="keywords" content="one, two">
<meta name="robots" content="noindex, nofollow, noarchive">
Expand Down Expand Up @@ -256,9 +250,6 @@ snapshot[`metas plugin 3`] = `
<meta property="og:image" content="http://localhost/page-3/use-cover-as-meta-image.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@myUser">
<meta itemprop="name" content="Title from page data">
<meta itemprop="description" content="This is page excerpt will be used as meta description.">
<meta itemprop="image" content="http://localhost/page-3/use-cover-as-meta-image.png">
<meta name="description" content="This is page excerpt will be used as meta description.">
<meta name="keywords" content="one, two">
<meta name="robots" content="this robots will be overrided">
Expand Down

0 comments on commit a09d2fb

Please sign in to comment.