diff --git a/next/content/talks/collaborer.md b/next/content/talks/collaborer.md new file mode 100644 index 0000000..595c53b --- /dev/null +++ b/next/content/talks/collaborer.md @@ -0,0 +1,6 @@ +--- +title: Collaborer avec d'autres métiers +date: "2020-04-21" +url: https://nech.pl/bigday2020-video +slides: https://nech.pl/bigday2020 +--- diff --git a/next/content/talks/musicologist.md b/next/content/talks/musicologist.md new file mode 100644 index 0000000..6f2eea6 --- /dev/null +++ b/next/content/talks/musicologist.md @@ -0,0 +1,6 @@ +--- +title: The Musicologist, or Search as a Conversation +date: '2017-11-23' +url: https://www.youtube.com/watch?v=3eb4KMNcOII +--- + diff --git a/next/lib/posts.js b/next/lib/posts.js index 36ecae3..c44cb73 100644 --- a/next/lib/posts.js +++ b/next/lib/posts.js @@ -1,6 +1,6 @@ import {getAllContentData, getAllContentIds, getContentData} from './utils' -export function getSortedPostsData() { +export function getPostsData() { return getAllContentData('posts', true) } diff --git a/next/lib/talks.js b/next/lib/talks.js new file mode 100644 index 0000000..3a198d1 --- /dev/null +++ b/next/lib/talks.js @@ -0,0 +1,13 @@ +import {getAllContentData, getAllContentIds, getContentData} from './utils' + +export function getTalksData() { + return getAllContentData('talks', true) +} + +export function getAllPostIds() { + return getAllContentIds("talks") +} + +export async function getPostData(id) { + return getContentData("talks", id) +} diff --git a/next/pages/index.js b/next/pages/index.js index a116856..202651d 100644 --- a/next/pages/index.js +++ b/next/pages/index.js @@ -3,18 +3,21 @@ import Link from "next/link"; import Date from "../components/date"; import Layout from "../components/layout"; import utilStyles from "../styles/utils.module.css"; -import { getSortedPostsData } from "../lib/posts"; +import { getPostsData } from "../lib/posts"; +import { getTalksData } from "../lib/talks"; export async function getStaticProps() { - const allPostsData = getSortedPostsData(); + const allPostsData = getPostsData(); + const allTalksData = getTalksData(); return { props: { allPostsData, + allTalksData, }, }; } -export default function Home({ allPostsData }) { +export default function Home({ allPostsData, allTalksData }) { return (
@@ -59,6 +62,22 @@ export default function Home({ allPostsData }) {

+

Talks

+
    + {allTalksData.map(({ id, date, title, url, slides }) => ( +
  • + + {title} + +
    + + + +
  • + ))} +
+
+

Blog

    {allPostsData.map(({ id, date, title }) => (