Implement blog sorting

This commit is contained in:
Dilson's Pickles
2023-09-12 20:51:59 +10:00
parent 5b60cdad64
commit cbbf318476
3 changed files with 31 additions and 9 deletions

View File

@@ -15,8 +15,7 @@ const publishedBlogPosts = await getCollection("blog", ({ data }) => {
<div class="grid grid-cols-12 my-4 sm:my-8 md:my-12 gap-y-8 sm:gap-8 md:gap-12">
{
publishedBlogPosts.map((post) => {
console.log("hello");
publishedBlogPosts.sort((a, b) => b.data.publishDate.getTime() - a.data.publishDate.getTime()).map((post) => {
return (
<NEWBlogPostCard
href={post.slug}

View File

@@ -0,0 +1,22 @@
---
title: A new blog
author: Leo Wattenberg
description: A lot of our work has been focused on getting Audacity ready for a version 4. As such, a lot of under-the-hood work has been happening - in technical terms - reducing dependency on wxWidgets, library extractions and general refactoring. This work will continue for the next few releases in parallel with feature development.
cover: "./our-new-website.jpg"
coverAlt: "A picture of Audacity 3.3"
publishDate: 2025-09-12
draft: false
---
![A picture of Audacity's 'Snap-to' dropdown](./beats-and-bars.png)
A lot of our work has been focused on getting Audacity ready for a version 4. As such, a lot of under-the-hood work has been happening - in technical terms - reducing dependency on wxWidgets, library extractions and general refactoring. This work will continue for the next few releases in parallel with feature development.
By and large Audacity 3.3 is a quiet update, with most of the work being done under the hood. Some noteworthy changes:
* Some built-in effects are realtime capable now
* A new **Shelf Filter** effect has been added, its in the EQ & Filters category
* An initial (beta) version of a [beats and measures](https://support.audacityteam.org/music/aligning-music-to-beats-and-measures) feature has been added, you can enable it via View → Toolbars → Time Signature Toolbar (beta), then right-clicking the timeline to change to beats and measures, and then changing the snapping and time and selection toolbar clocks to a beats format.
* A new vertical ruler (**Linear (dB)**) has been added, you can enable it by right-clicking on the vertical ruler.
* **Project Rate** has been moved to the Audio Setup button → Audio Settings and renamed Project Sample Rate.
More changes can be found in the changelog: [Audacity 3.3 Audacity Support](https://support.audacityteam.org/additional-resources/changelog/audacity-3.3)

View File

@@ -6,19 +6,20 @@ import { getCollection } from "astro:content";
const publishedBlogPosts = await getCollection("blog", ({ data }) => {
return data.draft !== true;
});
---
<BaseLayout title="Audacity | Blog">
<section class="pt-8 pb-16">
<div class="max-w-screen-xl mx-6 sm:mx-12 md:mx-16 xl:mx-auto">
<h2 class="text-left sm:text-center">
Blog posts
</h2>
<div class="grid grid-cols-12 my-4 sm:my-8 md:my-12 gap-y-8 sm:gap-8 md:gap-12">
<h2 class="text-left sm:text-center">Blog posts</h2>
<div
class="grid grid-cols-12 my-4 sm:my-8 md:my-12 gap-y-8 sm:gap-8 md:gap-12"
>
{
publishedBlogPosts.map((post) => {
publishedBlogPosts.sort((a, b) => b.data.publishDate.getTime() - a.data.publishDate.getTime()).map((post) => {
return (
<NEWBlogPostCard
href={post.slug}