Missing firstPage
(#658)
This commit is contained in:
parent
d46746c34f
commit
c48acb3d84
1 changed files with 1 additions and 0 deletions
|
@ -16,6 +16,7 @@ let description = 'An example blog on Astro';
|
||||||
// Data Fetching: List all Markdown posts in the repo.
|
// Data Fetching: List all Markdown posts in the repo.
|
||||||
let allPosts = Astro.fetchContent('./post/*.md');
|
let allPosts = Astro.fetchContent('./post/*.md');
|
||||||
allPosts.sort((a, b) => new Date(b.date) - new Date(a.date));
|
allPosts.sort((a, b) => new Date(b.date) - new Date(a.date));
|
||||||
|
let firstPage = allPosts.slice(0, 2);
|
||||||
|
|
||||||
// Full Astro Component Syntax:
|
// Full Astro Component Syntax:
|
||||||
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
|
// https://github.com/snowpackjs/astro/blob/main/docs/core-concepts/astro-components.md
|
||||||
|
|
Loading…
Reference in a new issue