Creating an index page for all posts
See original GitHub issueI’d like to have the blog/
page broken up to where I have
-
https://my-site.com/blog/
is containing all of the created posts -
https://my-site.com/blog/this-is-a-post
is a specific post.
I know I can pass a different template to blog/route.js
…
module.exports = {
template: 'BlogPost.svelte',
permalink: ({ request }) => `blog/${request.slug}/`,
all: () => [],
data: {},
};
…but how do I create a singular index page? Simply have a Blog.svelte
file for the default route?
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (8 by maintainers)
Top Results From Across the Web
How to create the blog posts index page in WordPress
Blog Posts Index page as Internal Page ; Step 1) Create a page called “Blog” or “Articles” or “Name it what-ever-you-want”. ; step...
Read more >creating an index page of posts - WordPress.org
So — how do I create an index page for all the Posts in this Category? Ideally I'd like to display the post...
Read more >Creating an Index on WordPress.com | The Daily Post
Sometimes, though, you might want to create a more specific index of your contents than category pages or monthly archives allow.
Read more >Creating an index for recipes or other content
A recipe or content index is a great way to organize your blog posts so visitors can quickly browse your content. Create a...
Read more >WordPress Index Plugin: Create an Index of Your Website ...
Create an index of WordPress pages, blog posts, or any custom post type (e.g. e-commerce products, events, documents, portfolio case studies ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think I follow the issue. Here is how you would specify different templates in the
route.js
and you can do something similar based on some field in frontmatter of the individual post from withinBlogPost.svelte
.Route.js
:Blog.svelte
I have the exact same issue and I’ve tried the latter method to no avail. The blog posts load correctly after having been passed through the
Blog.svelte
equivalent, but the index just throws aNot Found
on me incessantly.My blog folder is
informatii-utile
(which has all the.md
files inside), my routing proxy isInformatiiUtile.svelte
and the two templates areBlogIndex.svelte
andBlogPosts.svelte
. Exact structure is shown here.I will be reproducing the relevant files here in hopes that someone might help:
route.js
InformatiiUtile.svelte
Thank you in advance!