parent
1ecb6e544b
commit
3c084fbd79
|
@ -2,6 +2,7 @@ import { h, Component, Fragment, render } from 'preact';
|
|||
import { useEffect, useState } from 'preact/hooks';
|
||||
import { Giscus } from './giscus';
|
||||
import { BlogPost } from './blog_post';
|
||||
import { sort } from 'mathjs';
|
||||
|
||||
export interface Metadata {
|
||||
title: string;
|
||||
|
@ -47,8 +48,10 @@ const Blog = () => {
|
|||
<h1>blog & comments</h1>
|
||||
{(() => {
|
||||
if (blogPosts[0]) {
|
||||
const sortedBlogPosts = blogPosts[0];
|
||||
sortedBlogPosts.sort((a, b) => b.time - a.time);
|
||||
return <ul>
|
||||
{blogPosts[0].map((n) => {
|
||||
{sortedBlogPosts.map((n) => {
|
||||
return <li>
|
||||
<a href={"https://sad.ovh/?md=" + n.filename} onClick={
|
||||
(e) => {
|
||||
|
|
Loading…
Reference in a new issue