Skip to content

Commit 7137991

Browse files
Fix blog post link and formatting
Corrects link and formatting issues in blog post summaries, removing asterisks and applying bold formatting where appropriate.
1 parent 4593ed8 commit 7137991

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/components/BlogContent.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ const BlogContent: React.FC<BlogContentProps> = ({ content }) => {
3131

3232
// Convert list items into proper lists
3333
.replace(/<li class="ml-6 list-disc">(.*?)<\/li>(?:\n<li class="ml-6 list-disc">(.*?)<\/li>)+/gs,
34-
match => `<ul class="mb-6">${match}</ul>`);
34+
match => `<ul class="mb-6">${match}</ul>`)
35+
36+
// Fix article footers - replace asterisks with proper styling
37+
.replace(/\*(This post summarizes.*?visit the original article\.)\*/g,
38+
'<p class="blog-footer text-muted-foreground italic mt-6">$1</p>')
39+
.replace(/\*(This post summarizes.*?visit the original article\.)(.*?)\*/g,
40+
'<p class="blog-footer text-muted-foreground italic mt-6">$1 <a href="$2" class="text-primary hover:underline" target="_blank" rel="noopener noreferrer">Read more</a></p>');
3541

3642
return { __html: html };
3743
};

src/lib/data.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
export interface BlogPost {
32
id: string;
43
title: string;
@@ -68,7 +67,7 @@ This automation initiative:
6867
6968
---
7069
71-
*This post summarizes our detailed engineering blog post. For complete technical details and implementation specifics, please visit the [original article](https://mattermost.com/blog/automate-eks-node-rotation/).*
70+
This post summarizes our detailed engineering blog post. For complete technical details and implementation specifics, please visit the original article: https://mattermost.com/blog/automate-eks-node-rotation/
7271
`
7372
},
7473
{
@@ -120,7 +119,7 @@ Our SLO journey continues with plans to:
120119
- Expand the framework to internal services
121120
- Foster a culture of shared responsibility
122121
123-
*This post summarizes our detailed engineering blog post. For complete technical details, metrics queries, and implementation specifics, please visit the original article. https://mattermost.com/blog/sloth-for-slo-monitoring-and-alerting-with-prometheus/ *
122+
This post summarizes our detailed engineering blog post. For complete technical details, metrics queries, and implementation specifics, please visit the original article: https://mattermost.com/blog/sloth-for-slo-monitoring-and-alerting-with-prometheus/
124123
`
125124
},
126125
{
@@ -175,7 +174,7 @@ Our forward-looking strategy includes:
175174
176175
Our experience with spot instances taught us valuable lessons about balancing cost savings with operational stability. While the potential for savings was attractive, we found that the unpredictability and management complexity didn't align with our operational objectives.
177176
178-
*This post is a summary of our detailed engineering blog post. For the complete technical details and implementation specifics, please visit the original article. https://mattermost.com/blog/mattermosts-cloud-optimization-journey/*
177+
This post is a summary of our detailed engineering blog post. For the complete technical details and implementation specifics, please visit the original article: https://mattermost.com/blog/mattermosts-cloud-optimization-journey/
179178
`
180179
}
181180
];
@@ -267,4 +266,3 @@ The contributions and the reasoning are available at [GitHub](https://github.com
267266
`
268267
}
269268
];
270-

0 commit comments

Comments
 (0)