Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🀍

Feature/resolve feature graphic of blog post (#1168)

Thomas Kaul7fa4e6ebd206
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cd1aea8874..155aeba356 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Set up `ng-extract-i18n-merge` to improve the i18n extraction and merge workflow
- Set up language localization for German (`de`)
+- Resolved the feature graphic of the blog post
### Changed
diff --git a/apps/api/src/app/frontend.middleware.ts b/apps/api/src/app/frontend.middleware.ts
index 54bdcd49a6..6064f0f832 100644
--- a/apps/api/src/app/frontend.middleware.ts
+++ b/apps/api/src/app/frontend.middleware.ts
@@ -1,13 +1,33 @@
import * as path from 'path';
import { DEFAULT_LANGUAGE_CODE } from '@ghostfolio/common/config';
-import { Injectable, NestMiddleware } from '@nestjs/common';
+import { Injectable, Logger, NestMiddleware } from '@nestjs/common';
import { NextFunction, Request, Response } from 'express';
@Injectable()
export class FrontendMiddleware implements NestMiddleware {
use(req: Request, res: Response, next: NextFunction) {
- if (req.path.startsWith('/api/') || this.isFileRequest(req.url)) {
+ if (req.url.includes('cover.png')) {
+ Logger.log(`Referer: ${req.headers.referer}`, 'FrontendMiddleware');
+
+ // Resolve feature graphic for blog post
+ if (req.headers.referer?.includes('500-stars-on-github')) {
+ res.sendFile(
+ path.join(
+ __dirname,
+ '..',
+ 'client',
+ 'assets',
+ 'images',
+ 'blog',
+ '500-stars-on-github.jpg'
+ )
+ );
+ } else {
+ // Skip
+ next();
+ }
+ } else if (req.path.startsWith('/api/') || this.isFileRequest(req.url)) {
// Skip
next();
} else if (req.path.startsWith('/de/')) {
diff --git a/apps/client/src/app/pages/blog/2022/08/500-stars-on-github/500-stars-on-github-page.html b/apps/client/src/app/pages/blog/2022/08/500-stars-on-github/500-stars-on-github-page.html
index 5807210ab6..68aa4c8ba5 100644
--- a/apps/client/src/app/pages/blog/2022/08/500-stars-on-github/500-stars-on-github-page.html
+++ b/apps/client/src/app/pages/blog/2022/08/500-stars-on-github/500-stars-on-github-page.html
@@ -4,7 +4,7 @@
<article>
<div class="mb-4 text-center">
<h1 class="mb-1">500 Stars</h1>
- <div class="mb-3 text-muted"><small>2022-08-13</small></div>
+ <div class="mb-3 text-muted"><small>2022-08-18</small></div>
<img
alt="500 Stars on GitHub Teaser"
class="rounded w-100"
diff --git a/apps/client/src/app/pages/blog/blog-page.html b/apps/client/src/app/pages/blog/blog-page.html
index e62b095617..871af06a52 100644
--- a/apps/client/src/app/pages/blog/blog-page.html
+++ b/apps/client/src/app/pages/blog/blog-page.html
@@ -12,7 +12,7 @@
>
<div class="flex-grow-1">
<div class="h6 m-0 text-truncate">500 Stars on GitHub</div>
- <div class="d-flex text-muted">2022-08-10</div>
+ <div class="d-flex text-muted">2022-08-18</div>
</div>
<div class="align-items-center d-flex">
<ion-icon
diff --git a/apps/client/src/assets/sitemap.xml b/apps/client/src/assets/sitemap.xml
index 805947e3fb..1bc1b3bbba 100644
--- a/apps/client/src/assets/sitemap.xml
+++ b/apps/client/src/assets/sitemap.xml
@@ -6,70 +6,70 @@
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://ghostfol.io</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/de/blog/2021/07/hallo-ghostfolio</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/about</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/about/changelog</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/blog</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/blog/2021/07/hello-ghostfolio</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/blog/2022/01/ghostfolio-first-months-in-open-source</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/blog/2022/07/ghostfolio-meets-internet-identity</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/blog/2022/07/how-do-i-get-my-finances-in-order</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/blog/2022/08/500-stars-on-github</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/demo</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/faq</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/features</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/markets</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/pricing</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/register</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
<url>
<loc>https://ghostfol.io/en/resources</loc>
- <lastmod>2022-08-13T00:00:00+00:00</lastmod>
+ <lastmod>2022-08-18T00:00:00+00:00</lastmod>
</url>
</urlset>
diff --git a/apps/client/src/index.html b/apps/client/src/index.html
index 970431f9dc..acbda874ed 100644
--- a/apps/client/src/index.html
+++ b/apps/client/src/index.html
@@ -19,10 +19,7 @@
name="twitter:description"
content="Ghostfolio is a lightweight wealth management application for individuals to keep track of stocks, ETFs or cryptocurrencies"
/>
- <meta
- name="twitter:image"
- content="https://ghostfol.io/en/assets/cover.png"
- />
+ <meta name="twitter:image" content="https://ghostfol.io/assets/cover.png" />
<meta
name="twitter:title"
content="Ghostfolio – Open Source Wealth Management Software"
@@ -38,11 +35,8 @@
/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://ghostfol.io" />
- <meta
- property="og:image"
- content="https://ghostfol.io/en/assets/cover.png"
- />
- <meta property="og:updated_time" content="2022-05-28T00:00:00+00:00" />
+ <meta property="og:image" content="https://ghostfol.io/assets/cover.png" />
+ <meta property="og:updated_time" content="2022-08-18T00:00:00+00:00" />
<meta
property="og:site_name"
content="Ghostfolio – Open Source Wealth Management Software"