fix: update webmention API URLs for new moderation plugin
Change all webmention fetch URLs from /webmentions-api/api/mentions to /webmentions/api/mentions to match the new @rmdes/indiekit-endpoint-webmention-io plugin which replaces both the upstream viewer and the proxy plugin. Build-time feed now fetches from local Indiekit API instead of webmention.io directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -164,7 +164,7 @@ export default function (eleventyConfig) {
|
|||||||
const wmDomain = siteUrl.replace("https://", "").replace("http://", "");
|
const wmDomain = siteUrl.replace("https://", "").replace("http://", "");
|
||||||
eleventyConfig.addPlugin(pluginWebmentions, {
|
eleventyConfig.addPlugin(pluginWebmentions, {
|
||||||
domain: siteUrl,
|
domain: siteUrl,
|
||||||
feed: `https://webmention.io/api/mentions.jf2?domain=${wmDomain}&token=${process.env.WEBMENTION_IO_TOKEN}`,
|
feed: `http://127.0.0.1:8080/webmentions/api/mentions?per-page=10000`,
|
||||||
key: "children",
|
key: "children",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -358,7 +358,7 @@ function interactionsApp() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Use our server-side proxy which has the token
|
// Use our server-side proxy which has the token
|
||||||
const url = `/webmentions-api/api/mentions?per-page=${this.perPage}&page=${this.page}`;
|
const url = `/webmentions/api/mentions?per-page=${this.perPage}&page=${this.page}`;
|
||||||
|
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
@@ -402,7 +402,7 @@ function interactionsApp() {
|
|||||||
this.page++;
|
this.page++;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const url = `/webmentions-api/api/mentions?per-page=${this.perPage}&page=${this.page}`;
|
const url = `/webmentions/api/mentions?per-page=${this.perPage}&page=${this.page}`;
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
if (!response.ok) throw new Error(`HTTP ${response.status}`);
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -18,8 +18,8 @@
|
|||||||
// stores targets inconsistently (Bridgy sends different formats)
|
// stores targets inconsistently (Bridgy sends different formats)
|
||||||
const targetWithSlash = target.endsWith('/') ? target : target + '/';
|
const targetWithSlash = target.endsWith('/') ? target : target + '/';
|
||||||
const targetWithoutSlash = target.endsWith('/') ? target.slice(0, -1) : target;
|
const targetWithoutSlash = target.endsWith('/') ? target.slice(0, -1) : target;
|
||||||
const apiUrl1 = `/webmentions-api/api/mentions?target=${encodeURIComponent(targetWithSlash)}&per-page=100`;
|
const apiUrl1 = `/webmentions/api/mentions?target=${encodeURIComponent(targetWithSlash)}&per-page=100`;
|
||||||
const apiUrl2 = `/webmentions-api/api/mentions?target=${encodeURIComponent(targetWithoutSlash)}&per-page=100`;
|
const apiUrl2 = `/webmentions/api/mentions?target=${encodeURIComponent(targetWithoutSlash)}&per-page=100`;
|
||||||
|
|
||||||
// Check if build-time webmentions section exists
|
// Check if build-time webmentions section exists
|
||||||
const hasBuildTimeSection = document.getElementById('webmentions') !== null;
|
const hasBuildTimeSection = document.getElementById('webmentions') !== null;
|
||||||
|
|||||||
Reference in New Issue
Block a user