From e424680fc013c291bd7eea4dc63b96401e5126a8 Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Wed, 21 Jul 2021 04:42:31 -0500 Subject: Added a timestamp and sorts posts by timestamp --- pages/logs/[directory].tsx | 4 +++- pages/logs/index.module.scss | 12 ++++++++++++ pages/logs/index.tsx | 12 +++++++----- pages/logs/logs.md | 2 -- 4 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 pages/logs/index.module.scss (limited to 'pages/logs') diff --git a/pages/logs/[directory].tsx b/pages/logs/[directory].tsx index 00fe78d..c3760f7 100644 --- a/pages/logs/[directory].tsx +++ b/pages/logs/[directory].tsx @@ -1,4 +1,3 @@ -import path from 'path'; import { GetStaticProps, GetStaticPropsContext } from 'next'; import React, { FC } from 'react'; import { getPosts, getMarkdown, Post, getPostFromDirectory } from '../../utils/Posts'; @@ -11,10 +10,13 @@ interface Props { } const Page : FC = ({ post, markdown }) => { + const { lastUpdated } = post.meta; + return ( <> = ({ posts }) => { - console.log(posts); + + return( -
    + +
      { posts.map(({ directory, meta }) => (
    • {meta.name}
    • diff --git a/pages/logs/logs.md b/pages/logs/logs.md index 5515287..c177646 100644 --- a/pages/logs/logs.md +++ b/pages/logs/logs.md @@ -2,5 +2,3 @@ Eclectic thoughts, miscellany, and discursive drivel -- [Packaging Nebula for Debian](/logs/packaging-nebula-for-debian) -- [Installing cGit behind NGINX on Ubuntu](/logs/cgit-nginx-ubuntu) -- cgit v1.2.3