@actuate-media/plugin-seo 0.0.2 → 0.0.3
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/LICENSE +21 -21
- package/dist/og-image/index.js +6 -6
- package/dist/sitemap/index.js +22 -22
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Actuate Media
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Actuate Media
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/og-image/index.js
CHANGED
|
@@ -4,12 +4,12 @@ export async function generateOGImage(options) {
|
|
|
4
4
|
const bg = theme === "dark" ? "#0a0a0a" : "#ffffff";
|
|
5
5
|
const fg = theme === "dark" ? "#fafafa" : "#0a0a0a";
|
|
6
6
|
const muted = theme === "dark" ? "#a1a1aa" : "#71717a";
|
|
7
|
-
const html = `
|
|
8
|
-
<div style="display:flex;flex-direction:column;justify-content:flex-end;width:1200px;height:630px;padding:60px;background:${bg};font-family:system-ui,sans-serif;">
|
|
9
|
-
${siteName ? `<div style="color:${muted};font-size:24px;margin-bottom:16px;">${escapeHtml(siteName)}</div>` : ""}
|
|
10
|
-
<div style="color:${fg};font-size:${options.fontSize ?? 56}px;font-weight:700;line-height:1.2;max-width:900px;overflow:hidden;text-overflow:ellipsis;">${escapeHtml(title)}</div>
|
|
11
|
-
${description ? `<div style="color:${muted};font-size:28px;margin-top:20px;max-width:800px;overflow:hidden;text-overflow:ellipsis;">${escapeHtml(description)}</div>` : ""}
|
|
12
|
-
</div>
|
|
7
|
+
const html = `
|
|
8
|
+
<div style="display:flex;flex-direction:column;justify-content:flex-end;width:1200px;height:630px;padding:60px;background:${bg};font-family:system-ui,sans-serif;">
|
|
9
|
+
${siteName ? `<div style="color:${muted};font-size:24px;margin-bottom:16px;">${escapeHtml(siteName)}</div>` : ""}
|
|
10
|
+
<div style="color:${fg};font-size:${options.fontSize ?? 56}px;font-weight:700;line-height:1.2;max-width:900px;overflow:hidden;text-overflow:ellipsis;">${escapeHtml(title)}</div>
|
|
11
|
+
${description ? `<div style="color:${muted};font-size:28px;margin-top:20px;max-width:800px;overflow:hidden;text-overflow:ellipsis;">${escapeHtml(description)}</div>` : ""}
|
|
12
|
+
</div>
|
|
13
13
|
`;
|
|
14
14
|
return new Response(html, {
|
|
15
15
|
headers: {
|
package/dist/sitemap/index.js
CHANGED
|
@@ -33,9 +33,9 @@ export function generateSitemapIndex(collections, baseUrl) {
|
|
|
33
33
|
return ` <sitemap>\n <loc>${xmlEscape(base)}/sitemaps/${xmlEscape(slug)}.xml</loc>\n <lastmod>${new Date().toISOString()}</lastmod>\n </sitemap>`;
|
|
34
34
|
})
|
|
35
35
|
.join("\n");
|
|
36
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
37
|
-
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
38
|
-
${sitemaps}
|
|
36
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
37
|
+
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
38
|
+
${sitemaps}
|
|
39
39
|
</sitemapindex>`;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
@@ -81,9 +81,9 @@ export function generateCollectionSitemap(entries, baseUrl, collectionConfig) {
|
|
|
81
81
|
return xml;
|
|
82
82
|
})
|
|
83
83
|
.join("\n");
|
|
84
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
85
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
86
|
-
${urls}
|
|
84
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
85
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
86
|
+
${urls}
|
|
87
87
|
</urlset>`;
|
|
88
88
|
}
|
|
89
89
|
/** Generates a Google Image sitemap extension. */
|
|
@@ -108,10 +108,10 @@ export function generateImageSitemap(entries) {
|
|
|
108
108
|
return ` <url>\n <loc>${xmlEscape(entry.pageUrl)}</loc>\n${images}\n </url>`;
|
|
109
109
|
})
|
|
110
110
|
.join("\n");
|
|
111
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
112
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
113
|
-
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
|
|
114
|
-
${urls}
|
|
111
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
112
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
113
|
+
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
|
|
114
|
+
${urls}
|
|
115
115
|
</urlset>`;
|
|
116
116
|
}
|
|
117
117
|
/** Generates a Google Video sitemap extension. */
|
|
@@ -137,10 +137,10 @@ export function generateVideoSitemap(entries) {
|
|
|
137
137
|
return xml;
|
|
138
138
|
})
|
|
139
139
|
.join("\n");
|
|
140
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
141
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
142
|
-
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
|
|
143
|
-
${urls}
|
|
140
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
141
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
142
|
+
xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
|
|
143
|
+
${urls}
|
|
144
144
|
</urlset>`;
|
|
145
145
|
}
|
|
146
146
|
/** Generates a Google News sitemap. */
|
|
@@ -161,10 +161,10 @@ export function generateNewsSitemap(entries) {
|
|
|
161
161
|
return xml;
|
|
162
162
|
})
|
|
163
163
|
.join("\n");
|
|
164
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
165
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
166
|
-
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
|
|
167
|
-
${urls}
|
|
164
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
165
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
166
|
+
xmlns:news="http://www.google.com/schemas/sitemap-news/0.9">
|
|
167
|
+
${urls}
|
|
168
168
|
</urlset>`;
|
|
169
169
|
}
|
|
170
170
|
/** Generates a sitemap with hreflang annotations for multilingual content. */
|
|
@@ -177,10 +177,10 @@ export function generateHreflangSitemap(entries) {
|
|
|
177
177
|
return ` <url>\n <loc>${xmlEscape(entry.loc)}</loc>\n${links}\n </url>`;
|
|
178
178
|
})
|
|
179
179
|
.join("\n");
|
|
180
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
181
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
182
|
-
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
183
|
-
${urls}
|
|
180
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
181
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
182
|
+
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
|
183
|
+
${urls}
|
|
184
184
|
</urlset>`;
|
|
185
185
|
}
|
|
186
186
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actuate-media/plugin-seo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/actuatecms/actuatecms.git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@actuate-media/cms-core": "0.2.
|
|
25
|
+
"@actuate-media/cms-core": "0.2.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/react": "^19.0.0",
|