diff options
author | 2022-03-29 07:35:03 -0400 | |
---|---|---|
committer | 2022-03-29 07:35:03 -0400 | |
commit | ecc6a4833f68eaf78bd5d619ff7c54b952c96b15 (patch) | |
tree | 95175d87fd2002ab441a968970512a1293c48874 /examples/blog-multiple-authors/src | |
parent | 030fd48bdd917206f32c78c88a3fe2a2d9191101 (diff) | |
download | astro-ecc6a4833f68eaf78bd5d619ff7c54b952c96b15.tar.gz astro-ecc6a4833f68eaf78bd5d619ff7c54b952c96b15.tar.zst astro-ecc6a4833f68eaf78bd5d619ff7c54b952c96b15.zip |
Implement the Astro.request RFC (#2913)
* Implement the Astro.request RFC
* Disable console warnings eslint
* Use our logger
* Adds a changeset
* Fix tests that depend on params, canonicalURL, URL
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
Diffstat (limited to 'examples/blog-multiple-authors/src')
4 files changed, 6 insertions, 6 deletions
diff --git a/examples/blog-multiple-authors/src/layouts/post.astro b/examples/blog-multiple-authors/src/layouts/post.astro index fd8fcefa6..bbfc7b335 100644 --- a/examples/blog-multiple-authors/src/layouts/post.astro +++ b/examples/blog-multiple-authors/src/layouts/post.astro @@ -4,7 +4,7 @@ import Nav from '../components/Nav.astro'; import authorData from '../data/authors.json'; const { content } = Astro.props; -let canonicalURL = Astro.request.canonicalURL; +let canonicalURL = Astro.canonicalURL; --- <html lang={content.lang || 'en'}> diff --git a/examples/blog-multiple-authors/src/pages/about.astro b/examples/blog-multiple-authors/src/pages/about.astro index ad101368b..f1097a6f4 100644 --- a/examples/blog-multiple-authors/src/pages/about.astro +++ b/examples/blog-multiple-authors/src/pages/about.astro @@ -4,7 +4,7 @@ import Nav from '../components/Nav.astro'; let title = 'About'; let description = 'About page of an example blog on Astro'; -let canonicalURL = Astro.request.canonicalURL; +let canonicalURL = Astro.canonicalURL; --- <html lang="en"> diff --git a/examples/blog-multiple-authors/src/pages/index.astro b/examples/blog-multiple-authors/src/pages/index.astro index 518424b99..0c8d701ea 100644 --- a/examples/blog-multiple-authors/src/pages/index.astro +++ b/examples/blog-multiple-authors/src/pages/index.astro @@ -12,7 +12,7 @@ import authorData from '../data/authors.json'; // All variables are available to use in the HTML template below. let title = 'Don’s Blog'; let description = 'An example blog on Astro'; -let canonicalURL = Astro.request.canonicalURL; +let canonicalURL = Astro.canonicalURL; // Data Fetching: List all Markdown posts in the repo. let allPosts = await Astro.glob('./post/*.md'); diff --git a/examples/blog-multiple-authors/src/pages/posts/[...page].astro b/examples/blog-multiple-authors/src/pages/posts/[...page].astro index da9b06fc5..7711a940c 100644 --- a/examples/blog-multiple-authors/src/pages/posts/[...page].astro +++ b/examples/blog-multiple-authors/src/pages/posts/[...page].astro @@ -28,9 +28,9 @@ export async function getStaticPaths({ paginate, rss }) { } // page -let title = 'Don’s Blog'; -let description = 'An example blog on Astro'; -let canonicalURL = Astro.request.canonicalURL; +const title = 'Don’s Blog'; +const description = 'An example blog on Astro'; +const { canonicalURL } = Astro; const { page } = Astro.props; --- |