nuxt-themes / alpine

The minimalist blog theme, powered by Nuxt & Markdown.
https://alpine.nuxt.space
MIT License
284 stars 57 forks source link

Articles list does not automatically re-render when linked to second directory #188

Closed msrody closed 4 months ago

msrody commented 4 months ago

This site uses the articles-list component for two different pages to reference content in two different directories supporting two different types of content.

In articles.md is use:

articles-list{path="articles"}

to reference articles in my /articles directory.

In communications.md, I use:

articles-list{path="communications"}

to reference communications content in my /communications directory.

When one of those pages is accessed, the last accessed articles-list content is displayed and requires a manual refresh in the browser, in order to get the correct or updated content list. After I manually refresh the page, I get the expected content for that page.

For example, if I last looked at the Communications page and go to the Articles page, the Communications list would be the first thing I see. I will not see the Articles list unless I refresh the browser.

So it appears that the component is not re-rendered when the new directory is accessed. I am wondering if the component also needs a path key to get it to correctly re-render, though I have not figured out how to do that so I really have no idea if that's the solution.

Atinux commented 4 months ago

One solution to debug @msrody is to create your own components/content/ArticlesList.vue and copy/paste https://github.com/nuxt-themes/alpine/blob/main/components/content/ArticlesList.vue inside.

Then hack around to find the main cause of it.

msrody commented 4 months ago

We did get it working. There was a "bug" with the articles list component key not looking at the path statement. That has been corrected so now it works in the most recent version.

Michael S. Rody Personal E-mail: @.*** Facebook: www.facebook.com/mike.rody Cell: +6287876565241 http://voice.google.com/calls?a=nc,%2B6287876565241 US Number: +1.425.954.5436 Skype: msrody

On Sat, Mar 2, 2024 at 4:28 AM Sébastien Chopin @.***> wrote:

One solution to debug @msrody https://github.com/msrody is to create your own components/content/ArticlesList.vue and copy/paste https://github.com/nuxt-themes/alpine/blob/main/components/content/ArticlesList.vue inside.

Then hack around to find the main cause of it.

— Reply to this email directly, view it on GitHub https://github.com/nuxt-themes/alpine/issues/188#issuecomment-1973944675, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKCWLCMI7OYYXEGNRWZERRTYWDXHRAVCNFSM6AAAAABDZRHFRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZTHE2DINRXGU . You are receiving this because you were mentioned.Message ID: @.***>