feat: track images with git lfs
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
---
|
||||
import Layout from "../../layouts/Layout.astro";
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
---
|
||||
|
||||
<Layout title="Home"> Sup people :) </Layout>
|
||||
|
@ -1,8 +1,8 @@
|
||||
---
|
||||
import { getCollection } from "astro:content";
|
||||
import Post from "../../layouts/Post.astro";
|
||||
import Post from "@layouts/Post.astro";
|
||||
import { getLocale } from "astro-i18n-aut";
|
||||
import { filterCollection, parseSlug } from "../../i18n/utils";
|
||||
import { filterCollection, parseSlug } from "@i18n/utils";
|
||||
|
||||
const locale = getLocale(Astro.url);
|
||||
|
||||
@ -12,12 +12,9 @@ export async function getStaticPaths() {
|
||||
const paths = pages.map((page) => {
|
||||
const [slug] = parseSlug(page.id);
|
||||
|
||||
return { params: { slug }, props: {...page} };
|
||||
return { params: { slug }, props: { ...page } };
|
||||
});
|
||||
|
||||
console.log("PATHS");
|
||||
console.log(paths);
|
||||
|
||||
return paths;
|
||||
}
|
||||
|
||||
@ -26,14 +23,10 @@ const page = filterCollection(pages, locale).find((page) => {
|
||||
const [slug] = parseSlug(page.id);
|
||||
return slug === Astro.params.slug;
|
||||
});
|
||||
const formattedDate = page.data?.date?.toLocaleString(locale);
|
||||
|
||||
const { Content } = await page.render();
|
||||
---
|
||||
|
||||
{locale}
|
||||
{JSON.stringify(Astro.params)}
|
||||
<Post {...page.data}>
|
||||
<p>by {page.data.author} • {formattedDate}</p>
|
||||
<Content />
|
||||
</Post>
|
||||
|
@ -1,30 +1,27 @@
|
||||
---
|
||||
import { getCollection } from 'astro:content';
|
||||
const pages = await getCollection('blog');
|
||||
import Layout from '../../layouts/Layout.astro';
|
||||
import { getCollection } from "astro:content";
|
||||
const pages = await getCollection("blog");
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
|
||||
import { getLocale } from "astro-i18n-aut";
|
||||
import { filterCollection } from '../../i18n/utils';
|
||||
import { filterCollection } from "@i18n/utils";
|
||||
|
||||
const locale = getLocale(Astro.url);
|
||||
|
||||
const posts = filterCollection(pages, locale);
|
||||
console.log({posts, locale});
|
||||
---
|
||||
|
||||
<Layout title="Dude">
|
||||
<hr/>
|
||||
<hr />
|
||||
{
|
||||
posts.map((post) => (
|
||||
<>
|
||||
<a href={"blog/"+post.slug.split("/")[0]}>
|
||||
{post.data.title}
|
||||
</a><br/>
|
||||
<>
|
||||
<a href={"blog/" + post.slug.split("/")[0]}>{post.data.title}</a>
|
||||
<br />
|
||||
</>
|
||||
</>
|
||||
))
|
||||
}
|
||||
<hr/>
|
||||
<hr />
|
||||
</Layout>
|
||||
|
||||
|
||||
|
||||
|
@ -1,13 +1,8 @@
|
||||
---
|
||||
import Layout from '../layouts/Layout.astro';
|
||||
|
||||
|
||||
import Layout from "@layouts/Layout.astro";
|
||||
import Max from "@components/Max.astro";
|
||||
---
|
||||
|
||||
<Layout title="dude">
|
||||
|
||||
# Das ist mein Blog
|
||||
|
||||
<Max />
|
||||
</Layout>
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user