summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Brian Hinton <briannhinton@gmail.com> 2021-06-28 08:23:18 -0400
committerGravatar GitHub <noreply@github.com> 2021-06-28 07:23:18 -0500
commit0c6edf1fe05e1fa3888994dfb84dcda9ee5a46fc (patch)
tree0d1466ac51e190d2b8ebafc7ac02b996cd5f339f
parent3c4e6c5913f5697a04dcc0a8d6c9b9166aee0be9 (diff)
downloadastro-0c6edf1fe05e1fa3888994dfb84dcda9ee5a46fc.tar.gz
astro-0c6edf1fe05e1fa3888994dfb84dcda9ee5a46fc.tar.zst
astro-0c6edf1fe05e1fa3888994dfb84dcda9ee5a46fc.zip
bug: changed initialization order of the author (#563)
-rw-r--r--examples/blog/src/pages/$author.astro3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/blog/src/pages/$author.astro b/examples/blog/src/pages/$author.astro
index e06d8bc94..ff80344e4 100644
--- a/examples/blog/src/pages/$author.astro
+++ b/examples/blog/src/pages/$author.astro
@@ -8,7 +8,6 @@ import Pagination from '../components/Pagination.astro';
let title = 'Don’s Blog';
let description = 'An example blog on Astro';
let canonicalURL = Astro.request.canonicalURL;
-const author = authorData[collection.params.author];
// collection
import authorData from '../data/authors.json';
@@ -42,6 +41,8 @@ export async function createCollection() {
routes,
};
}
+
+const author = authorData[collection.params.author];
---
<html>