@riebeckite/plugin-seo 0.0.18 → 0.0.20
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/README.md +1 -1
- package/README_ja.md +2 -1
- package/dist/index.js +4 -4
- package/dist/src/metadata.d.ts +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
package/README_ja.md
CHANGED
|
@@ -57,8 +57,9 @@ export default defineConfig({
|
|
|
57
57
|
- `buildArticleSeo`、`buildWebsiteSeo`: ページの SEO 情報を構築する
|
|
58
58
|
- `renderSitemap`、`renderRobots`、`renderRssFeed`、`renderAtomFeed`、`renderJsonFeed`: 公開用ファイルを描画する
|
|
59
59
|
- `calculateReadingTime`: 読了時間を計算する
|
|
60
|
+
- URL・本文・フィードの補助: `buildAbsoluteUrl`、`buildPostUrl`、`getDescription`、`filterFeedEntries`、`getEntryPublishedTime`、`getEntryUpdatedTime`、`getHtmlLanguage`
|
|
60
61
|
- 型: `SeoPluginOptions`、`FeedOptions`、`SeoMetadata`、`WebsiteSeoInput`、`RenderableFeedEntry`
|
|
61
62
|
|
|
62
63
|
## 関連資料
|
|
63
64
|
|
|
64
|
-
- [プラグインシステム](../../../docs/docs/reference/plugin-api.md)
|
|
65
|
+
- [プラグインシステム](../../../docs/docs/reference/plugin-api.ja.md)
|
package/dist/index.js
CHANGED
|
@@ -191,7 +191,7 @@ function buildArticleSeo(config, permalink, post, headTags, language) {
|
|
|
191
191
|
jsonLd
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
function buildWebsiteSeo(config, input, headTags) {
|
|
194
|
+
function buildWebsiteSeo(config, input, headTags, language) {
|
|
195
195
|
const siteName = config.site.title;
|
|
196
196
|
const canonicalUrl = buildAbsoluteUrl(config, input.path);
|
|
197
197
|
const description = input.description || config.site.description;
|
|
@@ -204,7 +204,7 @@ function buildWebsiteSeo(config, input, headTags) {
|
|
|
204
204
|
name: siteName,
|
|
205
205
|
description,
|
|
206
206
|
url: canonicalUrl,
|
|
207
|
-
inLanguage:
|
|
207
|
+
inLanguage: resolveInLanguage(config, language)
|
|
208
208
|
})
|
|
209
209
|
];
|
|
210
210
|
if (!hasBreadcrumbListHeadTag(headTags)) {
|
|
@@ -283,7 +283,7 @@ import { definePlugin } from "@riebeckite/core";
|
|
|
283
283
|
function renderSitemap(config, entries) {
|
|
284
284
|
const urls = [
|
|
285
285
|
{ loc: buildAbsoluteUrl(config, "/"), lastmod: void 0 },
|
|
286
|
-
...filterFeedEntries(config, entries).filter((entry) => entry.permalink !== "/").map((entry) => ({
|
|
286
|
+
...filterFeedEntries(config, entries, entries.length).filter((entry) => entry.permalink !== "/").map((entry) => ({
|
|
287
287
|
loc: buildPostUrl(config, entry.permalink),
|
|
288
288
|
lastmod: getEntryUpdatedTime(entry)
|
|
289
289
|
}))
|
|
@@ -382,7 +382,7 @@ function seo(options = {}) {
|
|
|
382
382
|
options,
|
|
383
383
|
seo: {
|
|
384
384
|
buildArticleSeo: (config, permalink, post, headTags, language) => buildArticleSeo(config, permalink, post, headTags, language),
|
|
385
|
-
buildWebsiteSeo: (config, input, headTags) => buildWebsiteSeo(config, input, headTags),
|
|
385
|
+
buildWebsiteSeo: (config, input, headTags, language) => buildWebsiteSeo(config, input, headTags, language),
|
|
386
386
|
buildAbsoluteUrl,
|
|
387
387
|
buildPostUrl,
|
|
388
388
|
getDescription,
|
package/dist/src/metadata.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PluginHeadTag, PostContent, ResolvedRiebeckiteConfig, SeoMetadata, WebsiteSeoInput } from "@riebeckite/core";
|
|
2
2
|
export declare function buildArticleSeo(config: ResolvedRiebeckiteConfig, permalink: string, post: PostContent, headTags?: readonly PluginHeadTag[], language?: string): SeoMetadata;
|
|
3
|
-
export declare function buildWebsiteSeo(config: ResolvedRiebeckiteConfig, input: WebsiteSeoInput, headTags?: readonly PluginHeadTag[]): SeoMetadata;
|
|
3
|
+
export declare function buildWebsiteSeo(config: ResolvedRiebeckiteConfig, input: WebsiteSeoInput, headTags?: readonly PluginHeadTag[], language?: string): SeoMetadata;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riebeckite/plugin-seo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@riebeckite/core": "0.0.
|
|
17
|
+
"@riebeckite/core": "0.0.20"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"tsx": "^4.22.4",
|
|
21
|
-
"@riebeckite/test": "0.0.
|
|
21
|
+
"@riebeckite/test": "0.0.20"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|