mirror of
https://github.com/Xevion/undefined.behavio.rs.git
synced 2025-12-06 09:16:53 -06:00
Enable prefetch, add specifiers in Summary component
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import { defineConfig } from "astro/config";
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
import sitemap from "@astrojs/sitemap";
|
||||
|
||||
import robotsTxt from "astro-robots-txt";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: 'https://undefined.behavio.rs',
|
||||
integrations: [tailwind(), sitemap(), robotsTxt({
|
||||
})],
|
||||
prefetch: true,
|
||||
integrations: [tailwind(), sitemap(), robotsTxt()],
|
||||
markdown: {
|
||||
shikiConfig: {
|
||||
// Choose from Shiki's built-in themes (or add your own)
|
||||
|
||||
@@ -1,40 +1,46 @@
|
||||
---
|
||||
interface Props {
|
||||
url: string;
|
||||
date: Date;
|
||||
title: string;
|
||||
tags: string[];
|
||||
description: string;
|
||||
url: string;
|
||||
date: Date;
|
||||
title: string;
|
||||
tags: string[];
|
||||
description: string;
|
||||
}
|
||||
|
||||
const { url, date, title, tags, description } = Astro.props;
|
||||
---
|
||||
|
||||
<div class="clear-both">
|
||||
<div class="text-center uppercase mb-4 ml-8 py-1 border-y border-white leading-4 float-right">
|
||||
<a href={url}>
|
||||
<time datetime={date.toISOString()}>
|
||||
<span>
|
||||
{ date.toLocaleDateString("en-US", {month: "short"}) }
|
||||
</span>
|
||||
<br>
|
||||
<span class="text-[2em] leading-7">
|
||||
{ date.getDate().toString().padStart(2, "0") }
|
||||
</span>
|
||||
<br>
|
||||
<span>
|
||||
{ date.getFullYear() }</span>
|
||||
</time>
|
||||
</a>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<h2 class="font-medium inline underline decoration-white/50 mr-1"><a href={url}>{ title }</a></h2>
|
||||
<i class="space-x-2">
|
||||
{tags.map((tag) => (
|
||||
<a href={`/tags/${tag}`}>
|
||||
{ tag }
|
||||
</a>
|
||||
))}
|
||||
</i>
|
||||
</div>
|
||||
{ description }
|
||||
</div>
|
||||
<div
|
||||
class="text-center uppercase mb-4 ml-8 py-1 border-y border-white leading-4 float-right"
|
||||
>
|
||||
<a href={url} data-astro-prefetch>
|
||||
<time datetime={date.toISOString()}>
|
||||
<span>
|
||||
{date.toLocaleDateString("en-US", { month: "short" })}
|
||||
</span>
|
||||
<br />
|
||||
<span class="text-[2em] leading-7">
|
||||
{date.getDate().toString().padStart(2, "0")}
|
||||
</span>
|
||||
<br />
|
||||
<span> {date.getFullYear()}</span>
|
||||
</time>
|
||||
</a>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<h2 class="font-medium inline underline decoration-white/50 mr-1">
|
||||
<a href={url} data-astro-prefetch>{title}</a>
|
||||
</h2>
|
||||
<i class="space-x-2">
|
||||
{
|
||||
tags.map((tag) => (
|
||||
<a data-astro-prefetch href={`/tags/${tag}`}>
|
||||
{tag}
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</i>
|
||||
</div>
|
||||
{description}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user