diff --git a/_config.yml b/_config.yml index ecab751267..d9ebe19251 100644 --- a/_config.yml +++ b/_config.yml @@ -7,7 +7,6 @@ meta_generator: Hexo 7.2.0 offline: false features_available: pirsch: false - mentions_united: true # Site title: kiko.io @@ -62,6 +61,7 @@ syndication_hosts: # on extension see article.styl '.syndication-link' # Services osm_tile_server: https://tile.openstreetmap.org/ favicon_service_url: https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url={URL}&size=32 +api-proxy-base-url: https://mentions-united-api-proxy.up.railway.app # URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' diff --git a/themes/landscape/layout/_partial/post/interaction.ejs b/themes/landscape/layout/_partial/post/interaction.ejs index 26147029e8..09f9d2eb57 100644 --- a/themes/landscape/layout/_partial/post/interaction.ejs +++ b/themes/landscape/layout/_partial/post/interaction.ejs @@ -104,12 +104,14 @@ <% if (synPixelfed) { %> mentionsUnited.register(new MentionsUnitedProvider_Pixelfed({ sourceUrl: "<%- synPixelfed.url %>", - apiBaseUrl: "https://mentions-united-api-proxy.up.railway.app/pixelfed" + apiBaseUrl: "<%- config.api-proxy-base-url %>/pixelfed" })); <% } %> mentionsUnited.load() - .then(() => { return mentionsUnited.show(); }) + .then(() => { + return mentionsUnited.show(); + }) .then((count) => { let msg = document.querySelector(".article-interactions .message"); if (count === 0) { @@ -118,7 +120,7 @@ } else { msg.remove(); } - }) + }); }); diff --git a/themes/landscape/source/js/mentions-united-renderer_avatars-by-type.js b/themes/landscape/source/js/mentions-united-renderer_avatars-by-type.js index 28a712bd60..9cd879ebd1 100644 --- a/themes/landscape/source/js/mentions-united-renderer_avatars-by-type.js +++ b/themes/landscape/source/js/mentions-united-renderer_avatars-by-type.js @@ -6,9 +6,9 @@ * @see {@link https://github.com/kristofzerbe/MentionsUnited|GitHub} * * Options: - * - {String} placeholderId = ID of the element which will be replaced - * - {String} typeVerb = Type verb if interactions to show as avatars ... like, repost or else - * - {Callback} [afterRender] = JS function to call after render + * - {String} placeholderId = ID of the element which will be replaced by the generated HTML + * - {String} typeVerb = Type verb for filtering the interactions and to show as avatars ... like, repost or else + * - {Callback} [afterRender] = Function to call after the generated HTML was inserted into the page */ class MentionsUnitedRenderer_AvatarsByType extends MentionsUnited.Renderer { key = "avatars-by-type"; // must be unique across all renderer plugins for registration diff --git a/themes/landscape/source/js/mentions-united-renderer_list.js b/themes/landscape/source/js/mentions-united-renderer_list.js index af6c68d565..a9f5b5ccd0 100644 --- a/themes/landscape/source/js/mentions-united-renderer_list.js +++ b/themes/landscape/source/js/mentions-united-renderer_list.js @@ -8,7 +8,7 @@ * Options: * - {String} placeholderId = ID of the element which will be replaced with list of interactions * - {String} [skipTypes] = Comma-separated list of type-verbs to skip - * - {Callback} [afterRender] = JS function to call after render + * - {Callback} [afterRender] = Function to call after the generated HTML was inserted into the page */ class MentionsUnitedRenderer_List extends MentionsUnited.Renderer { key = "list"; // must be unique across all renderer plugins for registration diff --git a/themes/landscape/source/js/mentions-united-renderer_total-number.js b/themes/landscape/source/js/mentions-united-renderer_total-number.js index 15e7dea098..9d37514ca7 100644 --- a/themes/landscape/source/js/mentions-united-renderer_total-number.js +++ b/themes/landscape/source/js/mentions-united-renderer_total-number.js @@ -7,10 +7,10 @@ * @see {@link https://github.com/kristofzerbe/MentionsUnited|GitHub} * * Options: - * - {String} placeholderId = ID of the element which will be replaced with total number anchor + * - {String} placeholderId = ID of the element which will be replaced by the generated HTML * - {String} [pageKey] = Unique identifier of the page, e.g. slug, for caching feature * - {String} [anchorTargetId] = ID of the element to jump to on click for rendering as anchor - * - {Callback} [afterRender] = JS function to call after render + * - {Callback} [afterRender] = Function to call after the generated HTML was inserted into the page */ class MentionsUnitedRenderer_TotalNumber extends MentionsUnited.Renderer { key = "total-number"; // must be unique across all renderer plugins for registration