diff options
author | 2022-07-08 22:08:32 +0200 | |
---|---|---|
committer | 2022-07-08 22:08:32 +0200 | |
commit | 59e8c71786fd1c154904b3fefa7d26d88f4d92d2 (patch) | |
tree | 3a352e838b25a402c608913aeca21f471d75a826 /examples/blog/src/pages/index.astro | |
parent | 1f9e4857ff2b2cb7db89d619618cdf546cd3b3dc (diff) | |
download | astro-59e8c71786fd1c154904b3fefa7d26d88f4d92d2.tar.gz astro-59e8c71786fd1c154904b3fefa7d26d88f4d92d2.tar.zst astro-59e8c71786fd1c154904b3fefa7d26d88f4d92d2.zip |
Format astro files in examples (#3862)
Diffstat (limited to 'examples/blog/src/pages/index.astro')
-rw-r--r-- | examples/blog/src/pages/index.astro | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/examples/blog/src/pages/index.astro b/examples/blog/src/pages/index.astro index 1e1264533..b278c5510 100644 --- a/examples/blog/src/pages/index.astro +++ b/examples/blog/src/pages/index.astro @@ -1,21 +1,24 @@ --- // Component Imports -import BaseHead from '../components/BaseHead.astro'; -import BlogHeader from '../components/BlogHeader.astro'; -import BlogPostPreview from '../components/BlogPostPreview.astro'; +import BaseHead from "../components/BaseHead.astro"; +import BlogHeader from "../components/BlogHeader.astro"; +import BlogPostPreview from "../components/BlogPostPreview.astro"; // Component Script: // You can write any JavaScript/TypeScript that you'd like here. // It will run during the build, but never in the browser. // All variables are available to use in the HTML template below. -let title = 'Example Blog'; -let description = 'The perfect starter for your perfect blog.'; -let permalink = 'https://example.com/'; +let title = "Example Blog"; +let description = "The perfect starter for your perfect blog."; +let permalink = "https://example.com/"; // Data Fetching: List all Markdown posts in the repo. -let allPosts = await Astro.glob('./posts/*.md'); -allPosts = allPosts.sort((a, b) => new Date(b.frontmatter.publishDate).valueOf() - new Date(a.frontmatter.publishDate).valueOf()); +let allPosts = await Astro.glob("./posts/*.md"); +allPosts = allPosts.sort( + (a, b) => + new Date(b.frontmatter.publishDate).valueOf() - new Date(a.frontmatter.publishDate).valueOf() +); // Full Astro Component Syntax: // https://docs.astro.build/core-concepts/astro-components/ |