mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
docs: update changelog page with v1.24.3 and v1.24.4 releases
- Added v1.24.4 entry documenting showInNav field and hardcodedNavItems configuration - Added v1.24.3 entry documenting inner page logo configuration - Includes configuration examples and updated file lists - Maintains consistent format with existing changelog entries
This commit is contained in:
@@ -11,6 +11,7 @@ export const getAllPages = query({
|
||||
title: v.string(),
|
||||
published: v.boolean(),
|
||||
order: v.optional(v.number()),
|
||||
showInNav: v.optional(v.boolean()),
|
||||
excerpt: v.optional(v.string()),
|
||||
image: v.optional(v.string()),
|
||||
featured: v.optional(v.boolean()),
|
||||
@@ -26,8 +27,14 @@ export const getAllPages = query({
|
||||
.withIndex("by_published", (q) => q.eq("published", true))
|
||||
.collect();
|
||||
|
||||
// Filter out pages where showInNav is explicitly false
|
||||
// Default to true for backwards compatibility (undefined/null = show in nav)
|
||||
const visiblePages = pages.filter(
|
||||
(page) => page.showInNav !== false,
|
||||
);
|
||||
|
||||
// Sort by order (lower numbers first), then by title
|
||||
const sortedPages = pages.sort((a, b) => {
|
||||
const sortedPages = visiblePages.sort((a, b) => {
|
||||
const orderA = a.order ?? 999;
|
||||
const orderB = b.order ?? 999;
|
||||
if (orderA !== orderB) return orderA - orderB;
|
||||
@@ -40,6 +47,7 @@ export const getAllPages = query({
|
||||
title: page.title,
|
||||
published: page.published,
|
||||
order: page.order,
|
||||
showInNav: page.showInNav,
|
||||
excerpt: page.excerpt,
|
||||
image: page.image,
|
||||
featured: page.featured,
|
||||
@@ -103,6 +111,7 @@ export const getPageBySlug = query({
|
||||
content: v.string(),
|
||||
published: v.boolean(),
|
||||
order: v.optional(v.number()),
|
||||
showInNav: v.optional(v.boolean()),
|
||||
excerpt: v.optional(v.string()),
|
||||
image: v.optional(v.string()),
|
||||
featured: v.optional(v.boolean()),
|
||||
@@ -130,6 +139,7 @@ export const getPageBySlug = query({
|
||||
content: page.content,
|
||||
published: page.published,
|
||||
order: page.order,
|
||||
showInNav: page.showInNav,
|
||||
excerpt: page.excerpt,
|
||||
image: page.image,
|
||||
featured: page.featured,
|
||||
@@ -151,6 +161,7 @@ export const syncPagesPublic = mutation({
|
||||
content: v.string(),
|
||||
published: v.boolean(),
|
||||
order: v.optional(v.number()),
|
||||
showInNav: v.optional(v.boolean()),
|
||||
excerpt: v.optional(v.string()),
|
||||
image: v.optional(v.string()),
|
||||
featured: v.optional(v.boolean()),
|
||||
@@ -189,6 +200,7 @@ export const syncPagesPublic = mutation({
|
||||
content: page.content,
|
||||
published: page.published,
|
||||
order: page.order,
|
||||
showInNav: page.showInNav,
|
||||
excerpt: page.excerpt,
|
||||
image: page.image,
|
||||
featured: page.featured,
|
||||
|
||||
@@ -41,6 +41,7 @@ export default defineSchema({
|
||||
content: v.string(),
|
||||
published: v.boolean(),
|
||||
order: v.optional(v.number()), // Display order in nav
|
||||
showInNav: v.optional(v.boolean()), // Show in navigation menu (default: true)
|
||||
excerpt: v.optional(v.string()), // Short excerpt for card view
|
||||
image: v.optional(v.string()), // Thumbnail/OG image URL for featured cards
|
||||
featured: v.optional(v.boolean()), // Show in featured section
|
||||
|
||||
Reference in New Issue
Block a user