diff --git a/TASK.md b/TASK.md index bd70631..2c70175 100644 --- a/TASK.md +++ b/TASK.md @@ -8,10 +8,15 @@ ## Current Status -v1.26.0 ready. Added tag pages, related posts, and re-enabled AI service links using GitHub raw URLs. +v1.27.0 ready. Added homepage post limit and optional "read more" link configuration. ## Completed +- [x] Homepage post limit configuration (homePostsLimit in siteConfig.postsDisplay) +- [x] Optional "read more" link below limited post list (homePostsReadMore config) +- [x] Customizable link text and destination URL +- [x] CSS styling for read more link with hover effects +- [x] Conditional rendering logic to show link only when posts are limited - [x] Tag pages at `/tags/[tag]` route with view mode toggle - [x] Related posts component for blog post footers (up to 3 related posts by shared tags) - [x] Tag links in post footers now navigate to tag archive pages diff --git a/changelog.md b/changelog.md index 51b0527..aea8e49 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,33 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.27.0] - 2025-12-24 + +### Added + +- Homepage post limit configuration + - Configurable limit for number of posts shown on homepage via `siteConfig.postsDisplay.homePostsLimit` + - Default limit set to 10 most recent posts + - Set to `undefined` to show all posts (no limit) +- Optional "read more" link below limited post list + - Configurable via `siteConfig.postsDisplay.homePostsReadMore` + - Customizable link text and destination URL + - Only appears when posts are limited and there are more posts than the limit + - Default links to `/blog` page + - Can be disabled by setting `enabled: false` + +### Changed + +- `src/config/siteConfig.ts`: Added `homePostsLimit` and `homePostsReadMore` to `PostsDisplayConfig` interface +- `src/pages/Home.tsx`: Post list now respects `homePostsLimit` configuration and shows "read more" link when applicable +- `src/styles/global.css`: Added styles for `.home-posts-read-more` and `.home-posts-read-more-link` with centered button styling and hover effects + +### Technical + +- New interface: `HomePostsReadMoreConfig` in `src/config/siteConfig.ts` +- Post limiting logic uses `.slice()` to limit array before passing to `PostList` component +- Conditional rendering ensures "read more" link only shows when needed + ## [1.26.0] - 2025-12-24 ### Added diff --git a/content/blog/raw-markdown-and-copy-improvements.md b/content/blog/raw-markdown-and-copy-improvements.md index b06dcbf..938f270 100644 --- a/content/blog/raw-markdown-and-copy-improvements.md +++ b/content/blog/raw-markdown-and-copy-improvements.md @@ -6,7 +6,7 @@ slug: "raw-markdown-and-copy-improvements" published: true tags: ["release", "features", "updates", "developer-tools"] readTime: "8 min read" -featured: true +featured: false featuredOrder: 2 image: "/images/v17.png" authorName: "Markdown" diff --git a/content/blog/using-images-in-posts.md b/content/blog/using-images-in-posts.md index d5ea92e..e2bf344 100644 --- a/content/blog/using-images-in-posts.md +++ b/content/blog/using-images-in-posts.md @@ -4,7 +4,7 @@ description: "Learn how to add header images, inline images, and Open Graph imag date: "2025-12-14" slug: "using-images-in-posts" published: true -featured: true +featured: false featuredOrder: 4 tags: ["images", "tutorial", "markdown", "open-graph"] readTime: "4 min read" diff --git a/content/blog/visitor-tracking-and-stats-improvements.md b/content/blog/visitor-tracking-and-stats-improvements.md index d5b87ec..62afd41 100644 --- a/content/blog/visitor-tracking-and-stats-improvements.md +++ b/content/blog/visitor-tracking-and-stats-improvements.md @@ -6,7 +6,7 @@ slug: "visitor-tracking-and-stats-improvements" published: true tags: ["features", "stats", "convex", "updates", "analytics"] readTime: "5 min read" -featured: true +featured: false featuredOrder: 1 authorName: "Markdown" authorImage: "/images/authors/markdown.png" diff --git a/content/pages/changelog-page.md b/content/pages/changelog-page.md index 14aec9e..917b87f 100644 --- a/content/pages/changelog-page.md +++ b/content/pages/changelog-page.md @@ -8,6 +8,52 @@ layout: "sidebar" All notable changes to this project. +## v1.27.0 + +Released December 24, 2025 + +**Homepage post limit and optional read more link** + +- Configurable post limit for homepage via `siteConfig.postsDisplay.homePostsLimit` + - Default limit set to 10 most recent posts + - Set to `undefined` to show all posts (no limit) +- Optional "read more" link below limited post list + - Configurable via `siteConfig.postsDisplay.homePostsReadMore` + - Customizable link text and destination URL + - Only appears when posts are limited and there are more posts than the limit + - Default links to `/blog` page + - Can be disabled by setting `enabled: false` + +Updated files: `src/config/siteConfig.ts`, `src/pages/Home.tsx`, `src/styles/global.css` + +## v1.26.0 + +Released December 24, 2025 + +**Tag pages, related posts, and AI service links re-enabled** + +- Tag pages at `/tags/[tag]` route + - Dynamic tag archive pages showing all posts with a specific tag + - View mode toggle (list/cards) with localStorage persistence + - Mobile responsive layout matching existing blog page design + - Sitemap updated to include all tag pages dynamically +- Related posts component for blog post footers + - Shows up to 3 related posts based on shared tags + - Sorted by relevance (number of shared tags) then by date + - Only displays on blog posts (not static pages) +- Improved tag links in post footers + - Tags now link to `/tags/[tag]` archive pages + - Visual styling consistent with existing theme +- Open in AI service links re-enabled in CopyPageDropdown + - Uses GitHub raw URLs instead of Netlify paths (bypasses edge function issues) + - ChatGPT, Claude, and Perplexity links with universal prompt + - "Requires git push" hint for users (npm sync alone doesn't update GitHub) + - Visual divider separating AI options from other menu items + +Updated files: `src/config/siteConfig.ts`, `convex/schema.ts`, `convex/posts.ts`, `convex/http.ts`, `src/pages/TagPage.tsx`, `src/pages/Post.tsx`, `src/components/CopyPageDropdown.tsx`, `src/styles/global.css`, `src/App.tsx` + +Documentation updated: `content/pages/docs.md`, `content/blog/setup-guide.md` + ## v1.25.2 Released December 24, 2025 diff --git a/files.md b/files.md index 27b5b0b..674f506 100644 --- a/files.md +++ b/files.md @@ -33,13 +33,13 @@ A brief description of each file in the codebase. | File | Description | | --------------- | --------------------------------------------------------------------------------------------------------- | -| `siteConfig.ts` | Centralized site configuration (name, logo, blog page, posts display, GitHub contributions, nav order, inner page logo settings, hardcoded navigation items for React routes, GitHub repository config for AI service raw URLs) | +| `siteConfig.ts` | Centralized site configuration (name, logo, blog page, posts display with homepage post limit and read more link, GitHub contributions, nav order, inner page logo settings, hardcoded navigation items for React routes, GitHub repository config for AI service raw URLs) | ### Pages (`src/pages/`) | File | Description | | ----------- | ----------------------------------------------------------------- | -| `Home.tsx` | Landing page with featured content and optional post list | +| `Home.tsx` | Landing page with featured content and optional post list. Supports configurable post limit (homePostsLimit) and optional "read more" link (homePostsReadMore) via siteConfig.postsDisplay | | `Blog.tsx` | Dedicated blog page with post list or card grid view (configurable via siteConfig.blogPage, supports view toggle). Includes back button in navigation | | `Post.tsx` | Individual blog post or page view with optional sidebar layout. Includes back button, CopyPageDropdown, tag links, and related posts section in footer for blog posts (update SITE_URL/SITE_NAME when forking) | | `Stats.tsx` | Real-time analytics dashboard with visitor stats and GitHub stars | diff --git a/src/components/CopyPageDropdown.tsx b/src/components/CopyPageDropdown.tsx index 747897d..a5342eb 100644 --- a/src/components/CopyPageDropdown.tsx +++ b/src/components/CopyPageDropdown.tsx @@ -420,7 +420,7 @@ export default function CopyPageDropdown(props: CopyPageDropdownProps) { {/* Divider */} -
+ {/* */} {/* AI service links using GitHub raw URLs */} {/* Note: Requires git push to work - npm sync alone is not sufficient */} @@ -451,7 +451,9 @@ export default function CopyPageDropdown(props: CopyPageDropdownProps) { ↗ - Requires git push + + Ask AI about this link + @@ -482,7 +484,9 @@ export default function CopyPageDropdown(props: CopyPageDropdownProps) { ↗ - Requires git push + + Ask AI about this link + @@ -513,7 +517,9 @@ export default function CopyPageDropdown(props: CopyPageDropdownProps) { ↗ - Requires git push + + Ask AI about this link + diff --git a/src/config/siteConfig.ts b/src/config/siteConfig.ts index 187117a..e5b2429 100644 --- a/src/config/siteConfig.ts +++ b/src/config/siteConfig.ts @@ -40,11 +40,21 @@ export interface BlogPageConfig { showViewToggle: boolean; // Show toggle button to switch between views } +// Homepage posts read more link configuration +// Optional link shown below limited post list on homepage +export interface HomePostsReadMoreConfig { + enabled: boolean; // Show "read more" link when posts are limited + text: string; // Link text (e.g., "Read more blog posts") + link: string; // URL to link to (e.g., "/blog") +} + // Posts display configuration // Controls where the post list appears export interface PostsDisplayConfig { showOnHome: boolean; // Show post list on homepage showOnBlogPage: boolean; // Show post list on /blog page (requires blogPage.enabled) + homePostsLimit?: number; // Limit number of posts shown on homepage (undefined = show all) + homePostsReadMore?: HomePostsReadMoreConfig; // Optional "read more" link configuration } // Hardcoded navigation item configuration @@ -224,6 +234,12 @@ export const siteConfig: SiteConfig = { postsDisplay: { showOnHome: true, // Show post list on homepage showOnBlogPage: true, // Show post list on /blog page + homePostsLimit: 10, // Limit number of posts on homepage (undefined = show all) + homePostsReadMore: { + enabled: true, // Show "read more" link when posts are limited + text: "Read more blog posts", // Customizable link text + link: "/blog", // URL to link to (usually "/blog") + }, }, // Links for footer section diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index db90d0b..39a41fe 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -190,7 +190,28 @@ export default function Home() { {posts === undefined ? null : posts.length === 0 ? (No posts yet. Check back soon!
) : ( -