diff --git a/app/posts/page.tsx b/app/posts/page.tsx index f09c59f..0e5aa12 100644 --- a/app/posts/page.tsx +++ b/app/posts/page.tsx @@ -1,5 +1,5 @@ import { type Metadata } from 'next/types'; -import { allPosts } from 'contentlayer/generated'; +import { allPosts, allInformatics } from 'contentlayer/generated'; import { compareDesc } from 'date-fns'; import { blogConfig } from '@/config'; diff --git a/components/navigation-bar.tsx b/components/navigation-bar.tsx index a732ff8..b3bd219 100644 --- a/components/navigation-bar.tsx +++ b/components/navigation-bar.tsx @@ -23,7 +23,7 @@ export function NavigationBar({ className }: NavigationBarProps) { href="/posts" className="font-semibold hover:text-accent dark:hover:text-accent-dark" > - Статьи + Все статьи {allPages.map((page) => ( ({ + name: 'Informatics', + filePathPattern: `posts/informatics/**/*.mdx`, + contentType: 'mdx', + fields: { + title: { + type: 'string', + description: 'The title of the post', + required: true, + }, + date: { + type: 'date', + description: 'When the post was published', + required: true, + }, + excerpt: { + type: 'string', + description: 'Short summary of the post', + required: true, + }, + tags: { + type: 'list', + of: { type: 'string' }, + description: 'A list of keywords that relate to the post', + required: true, + }, + }, + computedFields: { + url: { + type: 'string', + description: 'The URL of the post, e.g. /posts/my-post', + resolve: (post) => `/posts/informatics/${post._raw.flattenedPath}`, + }, + ...computedFields, + }, +})); + export const Post = defineDocumentType(() => ({ name: 'Post', filePathPattern: `posts/**/*.mdx`, @@ -89,7 +126,7 @@ export const Page = defineDocumentType(() => ({ export default makeSource({ contentDirPath: './content', - documentTypes: [Post, Page], + documentTypes: [Post, Page, Informatics], mdx: { remarkPlugins: [ /** diff --git a/public/sitemap-0.xml b/public/sitemap-0.xml index d959ce6..11e36b8 100644 --- a/public/sitemap-0.xml +++ b/public/sitemap-0.xml @@ -1,8 +1,10 @@ -https://edu.krasnikov.pro/posts2023-09-09T20:05:09.923Zdaily0.7 -https://edu.krasnikov.pro/posts/olimp/practice-test-10-11-robotics2023-09-09T20:05:09.924Zdaily0.7 -https://edu.krasnikov.pro/posts/olimp/practice-test-5-6-robotics2023-09-09T20:05:09.924Zdaily0.7 -https://edu.krasnikov.pro/about2023-09-09T20:05:09.924Zdaily0.7 -https://edu.krasnikov.pro2023-09-09T20:05:09.924Zdaily0.7 +https://edu.krasnikov.pro/about2023-09-12T22:31:35.044Zdaily0.7 +https://edu.krasnikov.pro/posts/informatics/python-data-types-solution2023-09-12T22:31:35.045Zdaily0.7 +https://edu.krasnikov.pro/posts/informatics/word-creating-tables2023-09-12T22:31:35.045Zdaily0.7 +https://edu.krasnikov.pro/posts/olimp/practice-test-10-11-robotics2023-09-12T22:31:35.045Zdaily0.7 +https://edu.krasnikov.pro/posts/olimp/practice-test-5-6-robotics2023-09-12T22:31:35.045Zdaily0.7 +https://edu.krasnikov.pro/posts2023-09-12T22:31:35.045Zdaily0.7 +https://edu.krasnikov.pro2023-09-12T22:31:35.045Zdaily0.7 \ No newline at end of file