atinux / content-wind

A lightweight Nuxt theme to build a Markdown driven website. Powered by Nuxt Content, TailwindCSS and Iconify.
https://content-wind.nuxt.space
MIT License
810 stars 56 forks source link

How to generate List pages #61

Closed snimavat closed 1 year ago

snimavat commented 1 year ago

First of all thanks for this amazing project, it has almost every thing i need to generate a static blog site. However i dont see lists/indexes being generated automatically for a directory

Eg i have

content/blog/1.post-one.md
content/blog/2.post-two.md

I managed to get the blog/ link at top navigation, but could not figureout how to get it to generate a blog list page based on files in tht directory.

I am new to nuxt and I am not sure if this is supported, or if it is supposed to generate it.

I believe, this is would be one of the basic requirement for most sites to have ability to generate index pages.

Either an example, or a link to how this can be achieved, or a clarification about it will save new users lot of time.

Again, thanks for this wonderful project

atinux commented 1 year ago

So far you can create a content/blog.md page and link manually to your blog post.

one solution would be to create a components/content/BlogList.vue component and use it in content/blog.md

See https://github.com/nuxt-themes/alpine/blob/main/components/content/ArticlesList.vue

And https://raw.githubusercontent.com/nuxt-themes/alpine/main/.starters/default/content/2.articles.md