diff --git a/src/lib/PostPreview.svelte b/src/lib/PostPreview.svelte new file mode 100644 index 0000000..e69de29 diff --git a/src/lib/queries.js b/src/lib/queries.js index 8e11a59..ed79ce6 100644 --- a/src/lib/queries.js +++ b/src/lib/queries.js @@ -2,7 +2,10 @@ * Example of how you could re-use GROQ queries across different contexts with Javascript. * As your schema evolves, this pattern will be useful to keep your data in sync across all surfaces. */ -export function getPostsQuery(extraFilter) { +export function getPostsQuery() { + + + return `*[_type == "post"] { _id, _type, @@ -26,17 +29,3 @@ export function getPostsQuery(extraFilter) { } - // Insert the return component calling `getContent()` below - /** - * You can also re-use parts of projections as fragments. - * In this case, we're defining that, to render an author card, we need their name, slug & image. - */ - export const POST_CARD_FRAGMENT = ` - _id, - _type, - _createdAt, - _updatedAt, - title, - slug, - coverImage - ` \ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 785bbe3..ee747a3 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -5,8 +5,10 @@ import '../app.css'; - // Navigation links are generated based on this object - const nav = [ +/* Navigation links are generated based on this object. + Nav items are added by adding and object to the nav array. + Underscore _ should be added instead of whitespace, and it is then removed when the nav item is instantiated. + */ const nav = [ { name: "index", subPages: [], @@ -40,7 +42,7 @@ {#each nav as main,i} {#if i != 0} {#if !nav[i].subPages[0]} -
{post.body}
- + {#each post.body as block} + {#if } + + {/if} + <>{block} + {/each} + + + read more... {/each} \ No newline at end of file diff --git a/src/routes/learnings/[slug]/+page.svelte b/src/routes/learnings/[slug]/+page.svelte new file mode 100644 index 0000000..500c791 --- /dev/null +++ b/src/routes/learnings/[slug]/+page.svelte @@ -0,0 +1,2 @@ +why is this being weird
\ No newline at end of file