Free & Open-Source Invoice Generator - No Sign-Up, No Ads, Instant PDF Export, 100% In-Browser, and Fully Customizable Templates.
TypeScript fintechinvoiceinvoice-generatorinvoice-pdfinvoice-templateinvoicesnextjsopen-sourcequotesreactreact-pdf-rendererself-hostedshadcn-uitailwindcsstypescript
feat: enhance README and sitemap with changelog support (#135)
Vlad Sazonau1f8f0734faba
diff --git a/README.md b/README.mdindex 819efd2..37cb4a3 100644--- a/README.md+++ b/README.md@@ -12,6 +12,7 @@- 🧮 **European VAT**: Automatic VAT calculation and formatting- 🎨 **Multiple Templates**: Including modern **Stripe-style design**- 📄 **Instant PDF**: One-click download ready for printing or sending+- 📱 **Mobile-Friendly**: Fully responsive design works perfectly on all devices**❤️ Support the project**: [Buy me a coffee](https://buymeacoffee.com/vladsazon) to help keep EasyInvoicePDF free and open-source!@@ -23,6 +24,8 @@<img width="1440" height="769" alt="stripe template" src=".github/screenshots/stripe.png" />+#### Stripe Invoice Template with Logo+<img width="1440" height="769" alt="stripe template with logo" src=".github/screenshots/stripe-with-logo.png" />## Demo Video 🎥diff --git a/src/app/changelog/[slug]/page.tsx b/src/app/changelog/[slug]/page.tsxindex b620389..136d092 100644--- a/src/app/changelog/[slug]/page.tsx+++ b/src/app/changelog/[slug]/page.tsx@@ -34,23 +34,24 @@ export async function generateMetadata({const entry = await getChangelogEntry(slug);if (!entry) {- return {- title: "Changelog Entry Not Found",- };+ throw new Error(`Changelog entry not found for slug: ${slug}`);}const formattedDate = formatChangelogDate(entry.metadata.date);return {- title: `${entry.metadata.title || `Update ${formattedDate}`} | Changelog`,- description: `Changelog entry from ${formattedDate}`,+ title: `${entry.metadata.title || `Update ${formattedDate}`}`,+ description: entry.metadata.description,authors: [{ name: "Vlad Sazonau", url: "https://x.com/vlad_sazon" }],+ alternates: {+ canonical: `https://easyinvoicepdf.com/changelog/${slug}`,+ },openGraph: {- title: `${entry.metadata.title || `Update ${formattedDate}`} | Changelog`,- description: `Changelog entry from ${formattedDate}`,+ title: `${entry.metadata.title || `Update ${formattedDate}`}`,+ description: entry.metadata.description,type: "article",publishedTime: entry.metadata.date,- siteName: `https://easyinvoicepdf.com/changelog/${slug}`,+ siteName: "EasyInvoicePDF.com",images: [{url: `${STATIC_ASSETS_URL}/easy-invoice-opengraph-image.png?v=1755773879597`,@@ -64,7 +65,7 @@ export async function generateMetadata({twitter: {card: "summary_large_image",title: `${entry.metadata.title || `Update ${formattedDate}`} | Changelog`,- description: `Changelog entry from ${formattedDate}`,+ description: entry.metadata.description,images: [{url: `${STATIC_ASSETS_URL}/easy-invoice-opengraph-image.png?v=1755773879597`,diff --git a/src/app/changelog/content/easy-invoice-pdf-launch.mdx b/src/app/changelog/content/easy-invoice-pdf-launch.mdxindex e5fad64..0557285 100644--- a/src/app/changelog/content/easy-invoice-pdf-launch.mdx+++ b/src/app/changelog/content/easy-invoice-pdf-launch.mdx@@ -1,6 +1,7 @@export const metadata = {- title:- "EasyInvoicePDF Launch - Free & Open-Source Invoice Generator with Live Preview",+ title: "EasyInvoicePDF Launch - Free & Open-Source Invoice Generator",+ description:+ "Create professional invoices instantly with real-time preview and shareable links. No registration needed.",date: "2025-03-03",version: "1.0.0",type: "major",diff --git a/src/app/changelog/content/stripe-pdf-template.mdx b/src/app/changelog/content/stripe-pdf-template.mdxindex 1bd2b98..000504e 100644--- a/src/app/changelog/content/stripe-pdf-template.mdx+++ b/src/app/changelog/content/stripe-pdf-template.mdx@@ -1,5 +1,7 @@export const metadata = {title: "Stripe Invoice Template & Landing Page Improvements",+ description:+ "Introducing a modern, Stripe-inspired invoice template with professional styling and layout optimizations",date: "2025-06-28",version: "1.1.0",type: "major",diff --git a/src/app/changelog/layout.tsx b/src/app/changelog/layout.tsxindex b1773a3..e699cb6 100644--- a/src/app/changelog/layout.tsx+++ b/src/app/changelog/layout.tsx@@ -11,7 +11,7 @@ import Link from "next/link";export const dynamic = "force-static";export const metadata: Metadata = {- title: "Changelog | Free Invoice Generator – Live Preview, No Sign-Up",+ title: "Changelog | EasyInvoicePDF - Free & Open-Source Invoice Generator",description:"Stay up to date with the latest features, improvements, and bug fixes in EasyInvoicePDF.",keywords: [@@ -21,12 +21,28 @@ export const metadata: Metadata = {"features","bug fixes","pdf invoice generator",+ "easyinvoicepdf",+ "easy invoice pdf changelog",],authors: [{ name: "Uladzislau Sazonau" }],creator: "Uladzislau Sazonau",publisher: "Uladzislau Sazonau",+ alternates: {+ canonical: "https://easyinvoicepdf.com/changelog",+ },+ robots: {+ index: true,+ follow: true,+ googleBot: {+ index: true,+ follow: true,+ "max-video-preview": -1,+ "max-image-preview": "large",+ "max-snippet": -1,+ },+ },openGraph: {- title: "Changelog | Free Invoice Generator – Live Preview, No Sign-Up",+ title: "Changelog | EasyInvoicePDF - Free & Open-Source Invoice Generator",description:"Stay up to date with the latest features, improvements, and bug fixes in EasyInvoicePDF.",siteName: "EasyInvoicePDF.com | Free Invoice Generator",diff --git a/src/app/changelog/utils.ts b/src/app/changelog/utils.tsindex a464f08..606099b 100644--- a/src/app/changelog/utils.ts+++ b/src/app/changelog/utils.ts@@ -3,7 +3,8 @@ import { join } from "path";import { z } from "zod";interface ChangelogMetadata {- title?: string;+ title: string;+ description: string;date: string;version?: string;type?: "major" | "minor" | "patch";@@ -16,6 +17,15 @@ export interface ChangelogEntry {Component: React.ComponentType;}+// Validate metadata with Zod schema+export const changelogEntryMetadataSchema = z.object({+ title: z.string().min(1, "Title is required"),+ description: z.string().min(1, "Description is required"),+ date: z.string().date(),+ version: z.string().optional(),+ type: z.enum(["major", "minor", "patch"]).optional(),+});+/*** Gets all MDX files from the content/changelog directory*/@@ -54,17 +64,9 @@ async function importChangelogFile(filename: string) {default: React.ComponentType;};- // Validate metadata with Zod schema- const metadataSchema = z.object({- title: z.string().optional(),- date: z.string().date(),- version: z.string().optional(),- type: z.enum(["major", "minor", "patch"]).optional(),- });-// Validate metadata and throw error if invalidtry {- metadataSchema.parse(dynamicModule.metadata);+ changelogEntryMetadataSchema.parse(dynamicModule.metadata);} catch (error) {if (error instanceof z.ZodError) {console.error(@@ -98,7 +100,12 @@ export async function getChangelogEntries(): Promise<ChangelogEntry[]> {for (const filename of files) {const imported = await importChangelogFile(filename);- if (!imported) continue;++ if (!imported) {+ throw new Error(+ `\n\n __________ ERROR: Failed to import changelog file ${filename} __________\n\n`,+ );+ }const { slug, module } = imported;const { metadata, default: Component } = module as {diff --git a/src/app/robots.ts b/src/app/robots.tsindex d4b96cc..6addb06 100644--- a/src/app/robots.ts+++ b/src/app/robots.ts@@ -14,6 +14,9 @@ export default function robots(): MetadataRoute.Robots {...SUPPORTED_LANGUAGES.map((locale) => `/${locale}/about`),// Allow template parameter URLs"/?template=*",+ // Allow changelog pages+ "/changelog",+ "/changelog/*",],disallow: [// Disallow shared invoice URLs, like /?data=*diff --git a/src/app/sitemap.ts b/src/app/sitemap.tsindex 245a77d..d5a8b5f 100644--- a/src/app/sitemap.ts+++ b/src/app/sitemap.ts@@ -1,33 +1,50 @@import { APP_URL } from "@/config";import { type MetadataRoute } from "next";import { SUPPORTED_LANGUAGES } from "./schema";+import { getChangelogEntries } from "./changelog/utils";-export default function sitemap(): MetadataRoute.Sitemap {+export default async function sitemap(): Promise<MetadataRoute.Sitemap> {const lastModified = new Date();const languages = Object.fromEntries(SUPPORTED_LANGUAGES.map((lang) => [lang, `${APP_URL}/${lang}/about`]),);+ const changelogEntries = await getChangelogEntries();+const sitemapEntries: MetadataRoute.Sitemap = [// Main app page (non-shared version){url: `${APP_URL}`,lastModified,- changeFrequency: "weekly",+ changeFrequency: "monthly",priority: 1,},// About pages in all languages...SUPPORTED_LANGUAGES.map((locale) => ({url: `${APP_URL}/${locale}/about`,lastModified,- changeFrequency: "weekly" as const,+ changeFrequency: "monthly" as const,priority: 1,// Add alternates for each about page for each languagealternates: {languages: languages,},})),+ // Changelog page+ {+ url: `${APP_URL}/changelog`,+ lastModified,+ changeFrequency: "weekly",+ priority: 1,+ },+ // Changelog entries+ ...changelogEntries.map((entry) => ({+ url: `${APP_URL}/changelog/${entry.slug}`,+ lastModified,+ changeFrequency: "weekly" as const,+ priority: 1,+ })),];return sitemapEntries;