diff options
author | 2022-04-03 16:02:57 -0300 | |
---|---|---|
committer | 2022-04-03 14:02:57 -0500 | |
commit | dc6e89f0a32952568def085a7c6eb79fae697303 (patch) | |
tree | 0312982227102e618f6f2f239f4bf25e32625f4c /examples/blog-multiple-authors/src | |
parent | dff89a0fa3d51d1473e8a19b000ba8a76261d060 (diff) | |
download | astro-dc6e89f0a32952568def085a7c6eb79fae697303.tar.gz astro-dc6e89f0a32952568def085a7c6eb79fae697303.tar.zst astro-dc6e89f0a32952568def085a7c6eb79fae697303.zip |
chore: updated examples to v0.26.0 (#2977)
* New script behavior
* Astro.request
* Reverted `deno` to `node`
* Updated subpath
Diffstat (limited to 'examples/blog-multiple-authors/src')
-rw-r--r-- | examples/blog-multiple-authors/src/pages/authors/[author].astro | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/blog-multiple-authors/src/pages/authors/[author].astro b/examples/blog-multiple-authors/src/pages/authors/[author].astro index c2ba49d39..bb1bc3aa2 100644 --- a/examples/blog-multiple-authors/src/pages/authors/[author].astro +++ b/examples/blog-multiple-authors/src/pages/authors/[author].astro @@ -11,19 +11,18 @@ export async function getStaticPaths() { } const { allPosts } = Astro.props; -const { params, canonicalURL } = Astro.request; const title = 'Don’s Blog'; const description = 'An example blog on Astro'; /** filter posts by author, sort by date */ -const posts = allPosts.filter((post) => post.frontmatter.author === params.author).sort((a, b) => new Date(b.frontmatter.date).valueOf() - new Date(a.frontmatter.date).valueOf()); +const posts = allPosts.filter((post) => post.frontmatter.author === Astro.params.author).sort((a, b) => new Date(b.frontmatter.date).valueOf() - new Date(a.frontmatter.date).valueOf()); const author = authorData[posts[0].frontmatter.author]; --- <html lang="en"> <head> <title>{title}</title> - <MainHead {title} {description} image={posts[0].frontmatter.image} canonicalURL={canonicalURL.toString()} /> + <MainHead {title} {description} image={posts[0].frontmatter.image} canonicalURL={Astro.canonicalURL.toString()} /> <style lang="scss"> .title { |