-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial implementation of decap * improve configuration * contentlayer experiment * setup oauth flow via github for decap * remove contentlayer files * sort out paths and add back md dir for pages * add page as a document type * setup site url so that it points to our temporary Vercel deployment URL https://toiletmap-git-ob-decap-public-convenience-ltd.vercel.app/ * setup frontmatter and collection for mdx pages * add blog posts to config * first draft of blog setup * create posts index page * show a no posts available message to our users * contentlayer -> content-collections * improving styles for the blog pages * Delete Blog Post “hello” * Create Blog Post “test-post” * decap changes * remove .content-collections * fix the build * remove configuration for individual pages * fix header styling, remove pages fully from content collections * change decap config to refer to prod
- Loading branch information
Showing
23 changed files
with
2,903 additions
and
1,306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { defineCollection, defineConfig } from '@content-collections/core'; | ||
import { compileMarkdown } from '@content-collections/markdown'; | ||
|
||
const posts = defineCollection({ | ||
name: 'posts', | ||
directory: 'content/posts', | ||
include: '**/*.md', | ||
schema: (z) => ({ | ||
title: z.string(), | ||
date: z.string(), | ||
author: z.string(), | ||
profileSocialUrl: z.string().optional(), | ||
profilePictureUrl: z.string().optional(), | ||
}), | ||
transform: async (document, context) => { | ||
// @ts-expect-error -- TODO: fix this | ||
const html = await compileMarkdown(context, document); | ||
return { | ||
...document, | ||
slug: document._meta.fileName.split('.')[0], | ||
url: `/posts/${document._meta.fileName.split('.')[0]}`, | ||
html, | ||
}; | ||
}, | ||
}); | ||
|
||
export default defineConfig({ | ||
collections: [posts], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.