diff --git a/src/blogs/ai-that-serves-you-the-personal-agent-revolution.md b/src/blogs/ai-that-serves-you-the-personal-agent-revolution.md index be42fe7..bd13e08 100644 --- a/src/blogs/ai-that-serves-you-the-personal-agent-revolution.md +++ b/src/blogs/ai-that-serves-you-the-personal-agent-revolution.md @@ -9,6 +9,7 @@ description: "Unlike corporate AI that serves shareholders, Personal Agents work featured: false draft: false cat: "blog" +slug: "ai-that-serves-you-the-personal-agent-revolution" --- Unlike corporate AI that serves shareholders, Personal Agents work exclusively for you. Learn how this changes everything about AI interaction. diff --git a/src/blogs/building-trust-in-a-zero-knowledge-world.md b/src/blogs/building-trust-in-a-zero-knowledge-world.md index f144acd..2c145b5 100644 --- a/src/blogs/building-trust-in-a-zero-knowledge-world.md +++ b/src/blogs/building-trust-in-a-zero-knowledge-world.md @@ -9,6 +9,7 @@ description: "How HERO's zero-knowledge architecture enables trust without compr featured: false draft: false cat: "blog" +slug: "building-trust-in-a-zero-knowledge-world" --- How HERO's zero-knowledge architecture enables trust without compromising privacy. A deep dive into the cryptographic foundations of digital sovereignty. diff --git a/src/blogs/freezone_dispute-resolution.md b/src/blogs/freezone_dispute-resolution.md index 8772bfa..d6dfb76 100644 --- a/src/blogs/freezone_dispute-resolution.md +++ b/src/blogs/freezone_dispute-resolution.md @@ -1,5 +1,6 @@ --- title: Dispute Resolution (AI & People) +slug: dispute-resolution-ai-and-people description: Explore the innovative dispute resolution mechanisms available within a digital freezone, combining AI efficiency with human oversight. image: /src/assets/disputeresolution.jpg --- diff --git a/src/blogs/freezone_keep-your-assets-safe.md b/src/blogs/freezone_keep-your-assets-safe.md index d3bc38a..18509f1 100644 --- a/src/blogs/freezone_keep-your-assets-safe.md +++ b/src/blogs/freezone_keep-your-assets-safe.md @@ -1,7 +1,8 @@ --- title: Keep Your Assets Safe Now and in Future +slug: keep-your-assets-safe-now-and-in-future description: Discover how a digital freezone provides robust protection for your assets against current and future threats. -image: /src/assets/theworld.jpg +image: /src/assets/world.jpg --- In an era of increasing digital threats and economic uncertainties, securing your assets is more critical than ever. A digital freezone offers a fortified environment designed to protect your digital wealth, ensuring its safety both today and in the years to come. diff --git a/src/blogs/freezone_legal-and-financial-sovereignty.md b/src/blogs/freezone_legal-and-financial-sovereignty.md index 3717eaf..c36ae09 100644 --- a/src/blogs/freezone_legal-and-financial-sovereignty.md +++ b/src/blogs/freezone_legal-and-financial-sovereignty.md @@ -1,5 +1,6 @@ --- title: Legal and Financial Sovereignty +slug: legal-and-financial-sovereignty description: Understand how a digital freezone provides unparalleled legal and financial sovereignty for your operations. image: /src/assets/freezone.jpg --- diff --git a/src/blogs/freezone_ultimate-convenience-and-features.md b/src/blogs/freezone_ultimate-convenience-and-features.md index 8563d96..8de0650 100644 --- a/src/blogs/freezone_ultimate-convenience-and-features.md +++ b/src/blogs/freezone_ultimate-convenience-and-features.md @@ -1,5 +1,6 @@ --- title: Ultimate in Convenience and Features +slug: ultimate-in-convenience-and-features description: Experience unparalleled convenience and a rich suite of features designed to make your business life fun again within a digital freezone. image: /src/assets/stresssfree.jpg --- diff --git a/src/blogs/from-centralized-to-sovereign-the-evolution-of-digital-identity.md b/src/blogs/from-centralized-to-sovereign-the-evolution-of-digital-identity.md index 50b2951..8cdf263 100644 --- a/src/blogs/from-centralized-to-sovereign-the-evolution-of-digital-identity.md +++ b/src/blogs/from-centralized-to-sovereign-the-evolution-of-digital-identity.md @@ -9,6 +9,7 @@ description: "Tracing the journey from corporate-controlled identities to blockc featured: false draft: false cat: "blog" +slug: "from-centralized-to-sovereign-the-evolution-of-digital-identity" --- Tracing the journey from corporate-controlled identities to blockchain-verified, user-owned digital personas. The future is sovereign. diff --git a/src/blogs/peer-to-peer-communication-cutting-out-the-middleman.md b/src/blogs/peer-to-peer-communication-cutting-out-the-middleman.md index 748cfb1..23e1081 100644 --- a/src/blogs/peer-to-peer-communication-cutting-out-the-middleman.md +++ b/src/blogs/peer-to-peer-communication-cutting-out-the-middleman.md @@ -8,6 +8,7 @@ image: "/src/assets/heart.jpg" featured: false draft: false cat: "blog" +slug: "peer-to-peer-communication-cutting-out-the-middleman" --- How HERO enables direct communication between Personal Agents without corporate intermediaries. The future of private messaging is here. diff --git a/src/blogs/quantum-safe-storage-protecting-your-digital-legacy.md b/src/blogs/quantum-safe-storage-protecting-your-digital-legacy.md index fd9b435..8c39f8d 100644 --- a/src/blogs/quantum-safe-storage-protecting-your-digital-legacy.md +++ b/src/blogs/quantum-safe-storage-protecting-your-digital-legacy.md @@ -8,6 +8,7 @@ image: "/src/assets/balls.jpg" featured: false draft: false cat: "blog" +slug: "quantum-safe-storage-protecting-your-digital-legacy" --- As quantum computing threatens traditional encryption, HERO's quantum-safe storage ensures your data remains secure for generations. diff --git a/src/blogs/the-economics-of-digital-sovereignty.md b/src/blogs/the-economics-of-digital-sovereignty.md index 0b44aae..52895c3 100644 --- a/src/blogs/the-economics-of-digital-sovereignty.md +++ b/src/blogs/the-economics-of-digital-sovereignty.md @@ -9,6 +9,7 @@ description: "Why paying $20/month for digital freedom is the best investment yo featured: false draft: false cat: "blog" +slug: "the-economics-of-digital-sovereignty" --- Why paying $20/month for digital freedom is the best investment you'll ever make. Breaking down the true cost of corporate data harvesting. diff --git a/src/blogs/the-future-of-digital-sovereignty-why-personal-agents-matter.md b/src/blogs/the-future-of-digital-sovereignty-why-personal-agents-matter.md index dfa39d3..727ffe5 100644 --- a/src/blogs/the-future-of-digital-sovereignty-why-personal-agents-matter.md +++ b/src/blogs/the-future-of-digital-sovereignty-why-personal-agents-matter.md @@ -9,6 +9,7 @@ description: "In an era where tech giants control our digital lives, Personal Ag featured: true draft: false cat: "blog" +slug: "the-future-of-digital-sovereignty-why-personal-agents-matter" --- In an era where tech giants control our digital lives, Personal Agents represent a fundamental shift toward individual sovereignty and privacy. Discover how HERO is leading this revolution. diff --git a/src/pages/Blog.jsx b/src/pages/Blog.jsx index 89a0434..afc1c8f 100644 --- a/src/pages/Blog.jsx +++ b/src/pages/Blog.jsx @@ -10,9 +10,10 @@ import { Buffer } from 'buffer'; // Explicitly import Buffer // Import images import blogBackground from '../assets/myhero.jpg'; +import defaultPostImage from '../assets/myhero.jpg'; // Using an existing image as a fallback // Use Vite's import.meta.glob to import all markdown files -const modules = import.meta.glob('../blogs/*.md', { as: 'raw', eager: true }); +const modules = import.meta.glob('../blogs/*.md', { query: '?raw', import: 'default', eager: true }); const Blog = () => { const [posts, setPosts] = useState([]); @@ -35,8 +36,8 @@ const Blog = () => { loadedPosts.push({ ...frontmatter, slug, - // Ensure image path is correct for Vite - image: frontmatter.image ? new URL(frontmatter.image, import.meta.url).href : '/src/assets/default.jpg' + // Ensure image path is correct for Vite, use defaultPostImage as fallback + image: frontmatter.image ? new URL(frontmatter.image, import.meta.url).href : defaultPostImage }); } } @@ -251,13 +252,12 @@ const Blog = () => {
- {blogPosts.map((post, index) => ( - + {blogPosts.map((post) => ( + @@ -269,7 +269,6 @@ const Blog = () => { />
-
{post.tags.slice(0, 2).map((tag) => ( @@ -366,3 +365,4 @@ const Blog = () => { export default Blog; + diff --git a/src/pages/BlogPost.jsx b/src/pages/BlogPost.jsx index f4e1682..ac40010 100644 --- a/src/pages/BlogPost.jsx +++ b/src/pages/BlogPost.jsx @@ -16,32 +16,25 @@ const BlogPost = () => { useEffect(() => { const loadPost = async () => { try { - const allModules = import.meta.glob('../blogs/*.md', { as: 'raw', eager: true }); - let foundContent = null; + const allModules = import.meta.glob('../blogs/*.md', { query: '?raw', import: 'default', eager: true }); + let foundPost = null; - const possibleFileNames = [ - `capability_${slug}.md`, - `component_${slug}.md`, - `tech_${slug}.md`, - `${slug}.md` // For general blog posts - ]; + for (const path in allModules) { + const content = allModules[path]; + const { data: frontmatter, content: markdownContent } = matter(content); + + // Generate slug from filename if not present in frontmatter + const postSlug = frontmatter.slug || path.split('/').pop().replace('.md', ''); - for (const fileName of possibleFileNames) { - const filePath = `../blogs/${fileName}`; - if (allModules[filePath]) { - foundContent = allModules[filePath]; + // Check if the generated slug matches the URL slug + if (postSlug === slug) { + foundPost = { frontmatter, content: markdownContent }; break; } } - if (foundContent) { - const content = foundContent; - const { data: frontmatter, content: markdownContent } = matter(content); - - setPost({ - frontmatter, - content: markdownContent - }); + if (foundPost) { + setPost(foundPost); } else { setError('Post not found'); }