simplify urls

This commit is contained in:
tree🌴 2024-02-12 15:33:30 +01:00
parent a452486282
commit ae8485296f
2 changed files with 5 additions and 5 deletions

View file

@ -13,7 +13,7 @@ const current = false;
<div class=`sm:flex w-full p-4 sm:p-6 bg-white/10`> <div class=`sm:flex w-full p-4 sm:p-6 bg-white/10`>
<div class="grid gap-2 sm:gap-6 sm:flex items-center"> <div class="grid gap-2 sm:gap-6 sm:flex items-center">
<h1 class="text-2xl"><a href=`/issue/${issue.week}`>Week {issue.week.split('-').reverse().join('/')}</a></h1> <h1 class="text-2xl"><a href=`/${issue.week}`>Week {issue.week.split('-').reverse().join('/')}</a></h1>
<div class=`text-xl ${current ? "text-white/50" : ""}`>{format(issue.period[0], "MMM d")} - {format(issue.period[1], "MMM d, yyyy")}</div> <div class=`text-xl ${current ? "text-white/50" : ""}`>{format(issue.period[0], "MMM d")} - {format(issue.period[1], "MMM d, yyyy")}</div>
{!issue.published && {!issue.published &&
<div class="text-white">🚧 Future edition</div> <div class="text-white">🚧 Future edition</div>

View file

@ -1,8 +1,8 @@
--- ---
import BaseLayout from '../../layouts/base.astro'; import BaseLayout from '../layouts/base.astro';
import WeekNews from '../../components/WeekNews.astro'; import WeekNews from '../components/WeekNews.astro';
import issues from '../../issues.json'; import issues from '../issues.json';
import config from '../../config.yaml'; import config from '../config.yaml';
export function getStaticPaths() { export function getStaticPaths() {
return issues.map(issue => { return issues.map(issue => {