mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
update: moved footer to footer.md and docs updated
This commit is contained in:
@@ -491,7 +491,7 @@ export const siteConfig: SiteConfig = {
|
||||
},
|
||||
|
||||
// Footer configuration
|
||||
// Footer content can be set in frontmatter (footer field) or use defaultContent here
|
||||
// Footer content is loaded from content/pages/footer.md (synced via npm run sync)
|
||||
// Use showFooter: false in frontmatter to hide footer on specific posts/pages
|
||||
footer: {
|
||||
enabled: true, // Global toggle for footer
|
||||
@@ -499,10 +499,8 @@ export const siteConfig: SiteConfig = {
|
||||
showOnPosts: true, // Default: show footer on blog posts (override with frontmatter)
|
||||
showOnPages: true, // Default: show footer on static pages (override with frontmatter)
|
||||
showOnBlogPage: true, // Show footer on /blog page
|
||||
// Default footer markdown (used when frontmatter footer field is not provided)
|
||||
defaultContent: `Built with [Convex](https://convex.dev) for real-time sync and deployed on [Netlify](https://netlify.com). Read the [project on GitHub](https://github.com/waynesutton/markdown-site) to fork and deploy your own. View [real-time site stats](/stats).
|
||||
|
||||
Created by [Wayne](https://x.com/waynesutton) with Convex, Cursor, and Claude Opus 4.5. Follow on [Twitter/X](https://x.com/waynesutton), [LinkedIn](https://www.linkedin.com/in/waynesutton/), and [GitHub](https://github.com/waynesutton). This project is licensed under the MIT [License](https://github.com/waynesutton/markdown-site?tab=MIT-1-ov-file).`,
|
||||
// Default footer markdown (fallback if footer.md doesn't exist - edit content/pages/footer.md instead)
|
||||
defaultContent: undefined,
|
||||
},
|
||||
|
||||
// Homepage configuration
|
||||
@@ -577,6 +575,7 @@ Created by [Wayne](https://x.com/waynesutton) with Convex, Cursor, and Claude Op
|
||||
},
|
||||
{ platform: "twitter", url: "https://x.com/waynesutton" },
|
||||
{ platform: "linkedin", url: "https://www.linkedin.com/in/waynesutton/" },
|
||||
{ platform: "discord", url: "https://www.convex.dev/community/" },
|
||||
],
|
||||
copyright: {
|
||||
siteName: "MarkDown Sync is open-source", // Update with your site/company name
|
||||
|
||||
@@ -28,6 +28,9 @@ export default function Blog() {
|
||||
// Fetch all blog featured posts for hero + featured row
|
||||
const blogFeaturedPosts = useQuery(api.posts.getBlogFeaturedPosts);
|
||||
|
||||
// Fetch footer content from Convex (synced via markdown)
|
||||
const footerPage = useQuery(api.pages.getPageBySlug, { slug: "footer" });
|
||||
|
||||
// State for view mode toggle (list or cards)
|
||||
const [viewMode, setViewMode] = useState<"list" | "cards">(
|
||||
siteConfig.blogPage.viewMode,
|
||||
@@ -218,7 +221,7 @@ export default function Blog() {
|
||||
)}
|
||||
|
||||
{/* Footer section */}
|
||||
{showFooter && <Footer />}
|
||||
{showFooter && <Footer content={footerPage?.content} />}
|
||||
|
||||
{/* Social footer section */}
|
||||
{siteConfig.socialFooter?.enabled && siteConfig.socialFooter.showOnBlogPage && (
|
||||
|
||||
@@ -4092,6 +4092,11 @@ export default siteConfig;
|
||||
<span>Show on pages</span>
|
||||
</label>
|
||||
</div>
|
||||
<p className="config-field-note" style={{ marginTop: "0.75rem" }}>
|
||||
Footer content is managed via{" "}
|
||||
<code>content/pages/footer.md</code>. Run{" "}
|
||||
<code>npm run sync</code> to update.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* AI Chat Settings */}
|
||||
|
||||
@@ -100,6 +100,9 @@ export default function Home() {
|
||||
// Fetch home intro content from Convex (synced via markdown)
|
||||
const homeIntro = useQuery(api.pages.getPageBySlug, { slug: "home-intro" });
|
||||
|
||||
// Fetch footer content from Convex (synced via markdown)
|
||||
const footerPage = useQuery(api.pages.getPageBySlug, { slug: "footer" });
|
||||
|
||||
// State for view mode toggle (list or cards)
|
||||
const [viewMode, setViewMode] = useState<"list" | "cards">(
|
||||
siteConfig.featuredViewMode,
|
||||
@@ -408,7 +411,7 @@ export default function Home() {
|
||||
|
||||
{/* Footer section */}
|
||||
{siteConfig.footer.enabled && siteConfig.footer.showOnHomepage && (
|
||||
<Footer content={siteConfig.footer.defaultContent} />
|
||||
<Footer content={footerPage?.content} />
|
||||
)}
|
||||
|
||||
{/* Social footer section */}
|
||||
|
||||
Reference in New Issue
Block a user