From 005668b46f2feacd70f0f01cc14281e02f60452b Mon Sep 17 00:00:00 2001 From: garrettmills Date: Tue, 7 Jan 2025 23:46:46 -0500 Subject: [PATCH] Add OUTLINE_* env vars to K8s spec and fix markmark blog impl to use FQ urls --- deploy/deployment.yaml | 18 ++++++++++++++++++ src/app/services/blog/MarkMarkBlog.service.ts | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/deploy/deployment.yaml b/deploy/deployment.yaml index 5805740..6ccc5b6 100644 --- a/deploy/deployment.yaml +++ b/deploy/deployment.yaml @@ -110,3 +110,21 @@ spec: name: garrettmills-dev-secrets key: COREID_BASE optional: false + - name: OUTLINE_API_URL + valueFrom: + secretKeyRef: + name: garrettmills-dev-secrets + key: OUTLINE_API_URL + optional: false + - name: OUTLINE_API_KEY + valueFrom: + secretKeyRef: + name: garrettmills-dev-secrets + key: OUTLINE_API_KEY + optional: false + - name: OUTLINE_MM_DOCUMENT_ID + valueFrom: + secretKeyRef: + name: garrettmills-dev-secrets + key: OUTLINE_MM_DOCUMENT_ID + optional: false diff --git a/src/app/services/blog/MarkMarkBlog.service.ts b/src/app/services/blog/MarkMarkBlog.service.ts index 4424179..f57ee6c 100644 --- a/src/app/services/blog/MarkMarkBlog.service.ts +++ b/src/app/services/blog/MarkMarkBlog.service.ts @@ -2,7 +2,6 @@ import * as RSSFeed from 'feed' import {Awaitable, collect, Collection, Inject, Maybe, Singleton} from '@extollo/lib' import {AbstractBlog, BlogBackend, BlogPost, BlogPostFrontMatter, isBlogPostFrontMatter} from './AbstractBlog.service' import {MarkMarkService} from '../MarkMark.service' -import {Link} from '../../../markmark/types' import {MarkMarkRenderer} from '../../../markmark/markmark.renderer' @Singleton() @@ -83,8 +82,9 @@ export class MarkMarkBlog extends AbstractBlog { } getUrl(post: BlogPost): string { + const appUrl = this.routing.getAppUrl().toRemote let prefix = this.getBackend().routePrefix if ( !prefix.startsWith('/') ) prefix = `/${prefix}` - return `${prefix}/#link-${post.slug}` + return `${appUrl}${prefix}/#link-${post.slug}` } }