feat(mindspace): add SEO/GEO delivery, page template catalog, and admin hooks
Memind CI / Test, build, and release guards (push) Has been cancelled
Memind CI / Test, build, and release guards (push) Has been cancelled
Enable optional SEO/GEO injection and discovery routes for confirmed public pages while keeping private pages noindex. Add premium page template skills, portal catalog API, template shop UI, and Baidu push gated by memind_adm config. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ensureMindSpaceConfig, loadMindSpaceConfig } from '../mindspace-config.mjs';
|
||||
import { ensureMindSpaceConfig, loadMindSpaceConfig, loadMindSpaceConfigCached } from '../mindspace-config.mjs';
|
||||
import { resolveMindSpaceRybbitConfig } from '../mindspace-rybbit.mjs';
|
||||
import { createMindSearchConfigService } from '../mindsearch-config.mjs';
|
||||
import { createMindSpaceService } from '../mindspace.mjs';
|
||||
@@ -47,6 +47,7 @@ export async function bootstrapPortalDomainServices({
|
||||
createMindSearchConfigService,
|
||||
ensureMindSpaceConfigFn = ensureMindSpaceConfig,
|
||||
loadMindSpaceConfigFn = loadMindSpaceConfig,
|
||||
loadMindSpaceConfigCachedFn = loadMindSpaceConfigCached,
|
||||
createScheduleServiceFn = createScheduleService,
|
||||
createScheduledTaskServiceFn = createScheduledTaskService,
|
||||
createPageDataServiceFn = createPageDataService,
|
||||
@@ -249,8 +250,14 @@ export async function bootstrapPortalDomainServices({
|
||||
plazaRedis,
|
||||
algorithmConfig: plazaAlgorithmConfig,
|
||||
recommendService: plazaRecommend,
|
||||
onPostPublished: (postId) =>
|
||||
plazaSeo?.notifyPostPublished(postId),
|
||||
onPostPublished: async (postId) => {
|
||||
if (!plazaSeo) return { pushed: false, reason: 'plaza_unavailable' };
|
||||
const config = await loadMindSpaceConfigCachedFn(pool, { env }).catch(() => null);
|
||||
if (!config?.seoGeo?.enabled || !config?.seoGeo.seo?.baiduPush) {
|
||||
return { pushed: false, reason: 'disabled' };
|
||||
}
|
||||
return plazaSeo.notifyPostPublished(postId);
|
||||
},
|
||||
loadFeaturedPosts: async (viewerId) => {
|
||||
if (!plazaOps) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user